Menu

#2537 (ok 2.11.4) Wrong error when a string contains semicolon

fixed
None
1
2013-06-11
2007-09-20
No

When entering

SELECT * FROM foo WHERE bar = ';'

or even

SELECT ';'

in an SQL window, I get the following error message:

Error

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unclosed quote @ 30
STR: '
SQL: SELECT * FROM foo WHERE bar = ';

SQL query: Documentation

SELECT * FROM foo WHERE bar = ';

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1

Both statements are valid SQL and work without problems in the MySQL command line client.

Discussion

  • Marc Delisle

    Marc Delisle - 2007-10-03
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2007-10-04
    • summary: Wrong error message when a string contains semicolon ; --> (ok 2.11.2) Wrong error when a string contains semicolon
    • priority: 5 --> 1
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2007-10-04

    Logged In: YES
    user_id=210714
    Originator: NO

    Fixed in subversion, thanks for reporting.

     
  • Marc Delisle

    Marc Delisle - 2007-10-08
    • assigned_to: lem9 --> nobody
    • priority: 1 --> 5
    • summary: (ok 2.11.2) Wrong error when a string contains semicolon --> Wrong error when a string contains semicolon
    • status: open-fixed --> open
     
  • Marc Delisle

    Marc Delisle - 2007-10-08

    Logged In: YES
    user_id=210714
    Originator: NO

    I'll revert my fix, since it does not handle multi-statement queries.

     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580
    Originator: NO

    the problem is that phpMyAdmin removes the last char (in booth cases the last quote) if there is at least one delimiter (;) somewhere in the query

     
  • Sebastian Mendel

    • assigned_to: nobody --> cybot_tm
     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580
    Originator: NO

    Fixed in subversion, thanks for reporting.

     
  • Sebastian Mendel

    • priority: 5 --> 1
    • summary: Wrong error when a string contains semicolon --> (ok 2.11.4) Wrong error when a string contains semicolon
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2008-01-12
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

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