Report syntax error when there is a broken comment (bug #905066).

This commit is contained in:
Michal Čihař
2004-05-13 19:35:53 +00:00
parent 9f07dee9a7
commit 9ef6f98cb1
103 changed files with 109 additions and 0 deletions

View File

@@ -422,6 +422,12 @@ if ($is_minimum_common == FALSE) {
if (($first == ',') || ($first == ';') || ($first == '.') || ($first == '*')) {
$count2 = $count1 + 1;
$punct_data = $first;
} else if (($last2 == '--') && $l == 2) {
// Nijel: probably broken ANSI comment here (bug #905066)
$debugstr = $GLOBALS['strSQPBugSyntaxError'] . ' @ ' . ($count1+1) . "\n"
. 'STR: ' . $punct_data;
PMA_SQP_throwError($debugstr, $sql);
return $sql;
} else if (($last2 == '/*') || ($last2 == '--')) {
$count2 -= 2;
$punct_data = PMA_substr($sql, $count1, $count2 - $count1);