another day, another error….
I was migrating a MySql database from one server to a new server.
In the new server, calling one of the stored procedures of the database from the phpMyAdmin interface I obtained the following error:
#2014 – Commands out of sync; you can’t run this command now
Two were the strange things:
- Executed in the old server the stored procedure always worked without problems
- Called from the Perl application the stored procedure works also in the new server (but as I have said it doesn’t work when called directly from phpMyAdmin)
I can’t publish stored procedure’s code, but after making some debugging sessions, it turned out that the problem was the last line of the stored procedure, which was something like this:
SELECT 0 AS DUMMY FROM tableX WHERE 1=0;
It was a completely useless statement, and once removed, the stored procedure worked!
Only for your info:
- Old server MySql version: 5.1.73
- New server is MariaDB version 5.5.56