Menu

#3025 (ok 3.3.4) Results for query are not displayed

3.3.3
fixed
1
2014-08-21
2010-04-13
No

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;

Discussion

  • Madhura Jayaratne

    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?

     
  • sutharshan

    sutharshan - 2010-04-14

    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).

     
  • Michal Čihař

    Michal Čihař - 2010-04-15

    Both queries should produce same result - showing table with result of second query.

     
  • Marc Delisle

    Marc Delisle - 2010-05-30

    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.

     
  • Michal Čihař

    Michal Čihař - 2010-06-01

    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.

     
  • Marc Delisle

    Marc Delisle - 2010-06-01

    So the import parser should remember the previous statement and if the last statement is only a comment, execute the previous statement?

     
  • Michal Čihař

    Michal Čihař - 2010-06-01

    what about displaying results of last query which actually gave results?

     
  • Marc Delisle

    Marc Delisle - 2010-06-13
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2010-06-13

    This bug was fixed in repository and will be part of a future release; thanks for reporting.

     
  • Marc Delisle

    Marc Delisle - 2010-06-13
    • milestone: --> 3.3.3
    • priority: 5 --> 1
    • summary: Results for query are not displayed --> (ok 3.3.4) Results for query are not displayed
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2010-06-28
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed