ChangeLog read_dump.php3 sql.php3 libraries/common.lib.php3 libraries/sqlparser.lib.php3: Fixed bug #641765, see mailing list post

This commit is contained in:
Robin Johnson
2003-01-13 06:59:45 +00:00
parent 6d14f56346
commit a66c941f35
5 changed files with 31 additions and 4 deletions

View File

@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2002-01-12 Robin Johnson <robbat2@users.sourceforge.net>
* read_dump.php3, sql.php3,libraries/common.lib.php3,
libraries/sqlparser.lib.php3:
- Fixed bug #641765, see mailing list post
2003-01-11 Alexander M. Turek <rabus@users.sourceforge.net> 2003-01-11 Alexander M. Turek <rabus@users.sourceforge.net>
* server_*.php3: * server_*.php3:
- The messages are now displayed by server_links.inc.php3, so - The messages are now displayed by server_links.inc.php3, so

View File

@@ -323,6 +323,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
$is_modify_link = TRUE, $back_url = '') $is_modify_link = TRUE, $back_url = '')
{ {
global $cfg; global $cfg;
global $SQP_errorString;
if (empty($GLOBALS['is_header_sent'])) { if (empty($GLOBALS['is_header_sent'])) {
include('./header.inc.php3'); include('./header.inc.php3');
@@ -335,13 +336,27 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
$the_query = $GLOBALS['sql_query']; $the_query = $GLOBALS['sql_query'];
} }
$parsed_sql = PMA_SQP_parse($the_query); // --- Added to solve bug #641765
// Robbat2 - 12 January 2003, 9:46PM
if (isset($SQP_errorString) && !empty($SQP_errorString)) {
$parsed_sql = $the_query;
} else {
$parsed_sql = PMA_SQP_parse($the_query);
}
// ---
echo '<p><b>'. $GLOBALS['strError'] . '</b></p>' . "\n"; echo '<p><b>'. $GLOBALS['strError'] . '</b></p>' . "\n";
// if the config password is wrong, or the MySQL server does not // if the config password is wrong, or the MySQL server does not
// respond, do not show the query that would reveal the // respond, do not show the query that would reveal the
// username/password // username/password
if (!empty($the_query) && !strstr($the_query, 'connect')) { if (!empty($the_query) && !strstr($the_query, 'connect')) {
// --- Added to solve bug #641765
// Robbat2 - 12 January 2003, 9:46PM
if (isset($SQP_errorString) && !empty($SQP_errorString)) {
flush();
echo $SQP_errorString;
}
// ---
echo '<p>' . "\n"; echo '<p>' . "\n";
echo ' ' . $GLOBALS['strSQLQuery'] . '&nbsp;:&nbsp;' . "\n"; echo ' ' . $GLOBALS['strSQLQuery'] . '&nbsp;:&nbsp;' . "\n";
if ($is_modify_link && isset($db)) { if ($is_modify_link && isset($db)) {
@@ -364,6 +379,8 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
echo '<pre>' . "\n" echo '<pre>' . "\n"
. $error_message . "\n" . $error_message . "\n"
. '</pre>' . "\n"; . '</pre>' . "\n";
if (!empty($back_url)) { if (!empty($back_url)) {
echo '<a href="' . $back_url . '">' . $GLOBALS['strBack'] . '</a>'; echo '<a href="' . $back_url . '">' . $GLOBALS['strBack'] . '</a>';
} }

View File

@@ -84,15 +84,19 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
$debugstr = 'ERROR: ' . $message . "\n"; $debugstr = 'ERROR: ' . $message . "\n";
$debugstr .= 'SQL: ' . $sql; $debugstr .= 'SQL: ' . $sql;
echo $GLOBALS['strSQLParserUserError'] . '<br />' . "\n" global $SQP_errorString;
$SQP_errorString = '<p>'.$GLOBALS['strSQLParserUserError'] . '</p>' . "\n"
. '<pre>' . "\n" . '<pre>' . "\n"
. $debugstr . "\n" . $debugstr . "\n"
. '</pre>' . "\n"; . '</pre>' . "\n";
/*
// Removed to solve bug #641765 - Robbat2 - 12 January 2003, 9:46PM
flush(); flush();
if (PMA_PHP_INT_VERSION >= 40200 && @function_exists('ob_flush')) { if (PMA_PHP_INT_VERSION >= 40200 && @function_exists('ob_flush')) {
ob_flush(); ob_flush();
} }
*/
} // end of the "PMA_SQP_throwError()" function } // end of the "PMA_SQP_throwError()" function

View File

@@ -369,7 +369,6 @@ if (!$cfg['AllowUserDropDatabase']
} }
define('PMA_CHK_DROP', 1); define('PMA_CHK_DROP', 1);
/** /**
* Executes the query * Executes the query
*/ */
@@ -432,6 +431,7 @@ if ($sql_query != '') {
} // end if } // end if
/** /**
* MySQL error * MySQL error
*/ */

View File

@@ -85,7 +85,8 @@ if (isset($btnDrop) || isset($navig)) {
$parsed_sql = PMA_SQP_parse((get_magic_quotes_gpc() ? stripslashes($sql_query) : $sql_query)); $parsed_sql = PMA_SQP_parse((get_magic_quotes_gpc() ? stripslashes($sql_query) : $sql_query));
$analyzed_sql = PMA_SQP_analyze($parsed_sql); $analyzed_sql = PMA_SQP_analyze($parsed_sql);
$sql_query = PMA_SQP_formatHtml($parsed_sql, 'query_only'); // Bug #641765 - Robbat2 - 12 January 2003, 10:49PM
//$sql_query = PMA_SQP_formatHtml($parsed_sql, 'query_only');
// here we are sure that SELECT is uppercase // here we are sure that SELECT is uppercase
$is_select = eregi('^SELECT[[:space:]]+', $sql_query); $is_select = eregi('^SELECT[[:space:]]+', $sql_query);