From ece4453a0471c3cbebfe9ffde1849205b3354049 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 23 Nov 2007 18:24:19 +0000 Subject: [PATCH] bug #1793948 [parser] ROW_FORMAT incorrectly parsed --- ChangeLog | 1 + libraries/sqlparser.data.php | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2cc0980b0..7e0898df8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -41,6 +41,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - [display] Division by zero when showing all records (page selector) - bug #1828265 [privileges] No weird characters in generated password - bug #1759194 [import] open_basedir warning +- bug #1793948 [parser] ROW_FORMAT incorrectly parsed 2.11.2.2 (2007-11-20) - bug #1835123 [security] fixed XSS vulnerability on login page, diff --git a/libraries/sqlparser.data.php b/libraries/sqlparser.data.php index 79efc4f9d..a111d4024 100644 --- a/libraries/sqlparser.data.php +++ b/libraries/sqlparser.data.php @@ -545,9 +545,9 @@ $PMA_SQPdata_reserved_word = array ( 'MAX_USER_CONNECTIONS', 'MEDIUM', 'MERGE', - 'MIN_ROWS', 'MINUTE', 'MINUTE_SECOND', + 'MIN_ROWS', 'MODE', 'MODIFY', 'MONTH', @@ -607,8 +607,8 @@ $PMA_SQPdata_reserved_word = array ( 'RLIKE', 'ROLLBACK', 'ROW', - 'ROW_FORMAT', 'ROWS', + 'ROW_FORMAT', 'SECOND', 'SELECT', 'SEPARATOR', @@ -683,6 +683,23 @@ $PMA_SQPdata_reserved_word = array ( * @global integer MySQL reserved words count */ $PMA_SQPdata_reserved_word_cnt = 281; +/** + * The previous array must be sorted so that the binary search work. + * Sometimes a word is not added in the correct order, so + * this debugging code shows the problem. The same should be + * done for all arrays. + */ +/* +$original = $PMA_SQPdata_reserved_word; +sort($PMA_SQPdata_reserved_word); +$difference = array_diff_assoc($original, $PMA_SQPdata_reserved_word); +echo '
';
+print_r($difference);
+echo '
'; +echo '
';
+print_r($PMA_SQPdata_reserved_word);
+echo '
'; +*/ /** * words forbidden to be used as column or table name wihtout quotes