Menu

#482 (ok 3.2.3) A fix for bug 2846239

closed-accepted
Parsing (8)
1
2009-10-30
2009-09-16
No

It seems that double character delimiters weren't supported by the parser. This patch fixes that by adding one condition to the multiple character punctuation checking part of the parser, requiring it to approve $GLOBALS['sql_delimiter']. (Note: this only works if you use the Delimiter feature and not if you directly type in the delimiter statement into your SQL statement.)

Also, as the poster (fisharebest) mentioned, the code is confusing a String with an array. Shouldn't the lines 499, 616, and 630 in sqlparser.lib.php contain "return $sql_array" instead of "return $sql"? I did not add this to the patch, since the consistency of it always showing up near error-catching seems like a design choice. Is it?

Thanks,
Thomas

Discussion

  • Thomas Pulickal

    Thomas Pulickal - 2009-09-16

    Please apply from phpMyAdmin root directory; affects sqlparser.lib.php

     
  • Marc Delisle

    Marc Delisle - 2009-09-17
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2009-09-17
    • priority: 5 --> 1
    • summary: A fix for bug 2846239 --> (ok 3.2.3) A fix for bug 2846239
    • status: open --> open-accepted
     
  • Marc Delisle

    Marc Delisle - 2009-09-17

    Patch merged, thanks. Also, parser now returns an array in case of errors; your suggestion seems correct.

     
  • Marc Delisle

    Marc Delisle - 2009-10-30
    • status: open-accepted --> closed-accepted
     
MongoDB Logo MongoDB