In case of multi statement query, result of last command is not shown when here is a comment after it.
For example following does not work:
SELECT * FROM `actor` WHERE 1;
SELECT `actor_id`, `first_name`, `last_name`, `last_update` FROM `actor` WHERE 1; # foo
While this works as expected:
SELECT * FROM `actor` WHERE 1;
SELECT `actor_id`, `first_name`, `last_name`, `last_update` FROM `actor` WHERE 1;
Hi, what is the result you get when you execute the first set of statements. Is it just the notification 'Your SQL query has been executed successfully', but no results?
what would be the expected output when i run a query with a comment after it?
I didnt get any results when i add comment after the query and I'm getting the following in my sql query text area.
the sql statement was this
select* from test;#aa
NO results displayed, but only the following message displayed in the sql query text area.
select* from test;# Rows: 3
#aa
# MySQL returned an empty result set (i.e. zero rows).
Both queries should produce same result - showing table with result of second query.
The parser has this behavior because of the presence of a semi-colon just before the comment. So I would say phpMyAdmin is doing the expected behavior, just showing the result of the last statement which is a comment.
I know why it happens, but I don't think this is behaviour what user expects.
And actually I was pointed to this issue by some users.
So the import parser should remember the previous statement and if the last statement is only a comment, execute the previous statement?
what about displaying results of last query which actually gave results?
This bug was fixed in repository and will be part of a future release; thanks for reporting.