bug 716679

This commit is contained in:
Marc Delisle
2003-06-05 17:35:51 +00:00
parent f7793a2dba
commit 84be37b7d3
2 changed files with 7 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ $Source$
2003-06-05 Marc Delisle <lem9@users.sourceforge.net>
* Documentation.html: new faq 6.20 about CREATE TEMPORARY TABLES
* libraries/sqlparser.lib.php3: bug 716679, parsing of negation operator
2003-06-05 Michal Cihar <nijel@users.sourceforge.net>
* libraries/display_export.lib.php3, libraries/functions.js: Some

View File

@@ -428,7 +428,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
$first2 = $punct_data[0] . $punct_data[1];
$last2 = $punct_data[$l - 2] . $punct_data[$l - 1];
$last = $punct_data[$l - 1];
if (($first == ',') || ($first == ';') || ($first == '.') || ($first = '*')) {
if (($first == ',') || ($first == ';') || ($first == '.') || ($first == '*')) {
$count2 = $count1 + 1;
$punct_data = $first;
} else if (($last2 == '/*') || ($last2 == '--')) {
@@ -437,7 +437,11 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
} else if (($last == '-') || ($last == '+') || ($last == '!')) {
$count2--;
$punct_data = $GLOBALS['PMA_substr']($sql, $count1, $count2 - $count1);
} else {
// TODO: for negation operator, split in 2 tokens ?
// "select x&~1 from t"
// becomes "select x & ~ 1 from t" ?
} else if ($last != '~') {
$debugstr = $GLOBALS['strSQPBugUnknownPunctuation'] . ' @ ' . ($count1+1) . "\n"
. 'STR: ' . $punct_data;
PMA_SQP_throwError($debugstr, $sql);