phpMyAdmin Version: 3.3.4
MySQL Server version: 5.1.37sp1-enterprise-gpl-pro
PHP version: 5+
When I set the current database to "test" in phpMyAdmin and click on the "SQL" tab and run:
call ShowFoo;
I do _not_ receive a display of the result set from stored procedure "ShowFoo".
Previously, I had created stored procedure "ShowFoo" in the "test" database with:
DELIMITER //
CREATE PROCEDURE ShowFoo()
BEGIN
SELECT 'foo';
END //
DELIMITER ;
There is a work-around. When I set the database to "localhost" rather than "test", click on the "SQL" tab, and run:
call test.ShowFoo;
then I _do_ successfully receive a display of the result set ("foo"). (Note that I placed "test." before "ShowFoo" this time.)
Surprisingly, if I set the database to "test" and use that same SQL, (1) I do _not_ see the result set and
(2) the current database reverts from "test" to "localhost". In contrast, running a command such as "show tables;"
does _not_ revert the current database to "localhost".
As another variation, I tried using "use test;" before calling the stored procedure. Running the SQL:
use test;
call test.ShowFoo;
results in the error message:
#2014 - Commands out of sync; you can't run this command now
It does not depend on whether the current database is "localhost" or "test".
Furthermore, it does not matter whether or not "test." precedes "ShowFoo".
In contrast, when I run:
use test;
show tables;
I receive the result set and do _not_ receive an error message, so there
is no problem with the "use" statement preceding another statement.
The problem occurs only when calling a stored procedure.
I can reproduce the problem but I want to clarify that your are not setting the database to localhost, your are just setting the phpMyAdmin interface so that no database is selected.
This bug was fixed in repository and will be part of a future release; thanks for reporting.