diff --git a/libraries/sqlparser.lib.php3 b/libraries/sqlparser.lib.php3
index 8437253ab..ba78122b3 100644
--- a/libraries/sqlparser.lib.php3
+++ b/libraries/sqlparser.lib.php3
@@ -61,6 +61,58 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
} // end if... else...
+ function PMA_SQP_throwError($message,$sql)
+ {
+ $debugstr = '';
+ $debugstr .= 'ERROR: ' . $message . "\n";
+ $debugstr .= 'SQL: ' . $sql;
+
+ echo $GLOBALS['strSQLParserUserError'] . "
\n
" . $debugstr . ""; + + flush(); + if (PMA_PHP_INT_VERSION >= 42000 && @function_exists('ob_flush')) { + ob_flush(); + } + + } + + function PMA_SQP_BUG($message,$sql) + { + + $debugstr = ''; + $debugstr .= 'ERROR: ' . $message . "\n"; + $debugstr .= 'CVS: $Id$' . "\n"; + $debugstr .= 'MySQL: '.PMA_MYSQL_STR_VERSION . "\n"; + $debugstr .= 'USR OS,AGENT,VER: ' . PMA_USR_OS . ' ' . PMA_USR_BROWSER_AGENT . ' ' . PMA_USR_BROWSER_VER . "\n"; + $debugstr .= 'PMA: ' . PMA_VERSION . "\n"; + $debugstr .= 'PHP VER,OS: ' . PMA_PHP_STR_VERSION . ' ' . PHP_OS . "\n"; + $debugstr .= 'SQL: ' . $sql; + $encodedstr = $debugstr; + if (PMA_PHP_INT_VERSION >= 40001 && @function_exists('gzcompress')) { + $encodedstr = gzcompress($debugstr, 9); + } + $encodedstr = nl2br(chunk_split(base64_encode($encodedstr))); + + echo $GLOBALS['strSQLParserBugMessage'] . "
" + . $debugstr + . '----' . $GLOBALS['strEndRaw'] .'----' . "
' . "\n";
- echo 'You seem to have found a bug in the SQL parser.
Please submit a bug report with the data chunk below:
' . "\n" . '--BEGIN CUT--
' . "\n";
- $debugstr = '$Id$
' . "\n";
- $debugstr .= 'Why did we get here? ' . $count1 . ' ' . $count2 . ' ' . $len . '
' . "\n";
- $debugstr .= 'Leftover: ' . substr($sql, $count1, $count2 - $count1) . '
' . "\n";
- $debugstr .= 'A: ' . $count1 . ' ' . $count2 . '
' . "\n";
- $debugstr .= 'SQL: ' . $sql;
- if (PMA_PHP_INT_VERSION >= 40001 && @function_exists('gzcompress')) {
- $debugstr = gzcompress($debugstr, 9);
- }
- $encodedstr = nl2br(chunk_split(base64_encode($debugstr)));
- echo $encodedstr . "\n";
- echo '---END CUT---
' . "\n\n";
- echo '