bug 636563
This commit is contained in:
@@ -7,6 +7,8 @@ $Source$
|
||||
|
||||
2002-11-13 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* libraries/sqlparser.lib.php3: bug 636575 (unquoted identifiers)
|
||||
* libraries/sqlparser.lib.php3, libraries/common.lib.php3, sql.php3:
|
||||
bug 636563 undefined variable when deleting a row
|
||||
|
||||
2002-11-11 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||
* libaries/common.lib.php3: Fixed bug #636345 (Error when modifying table
|
||||
|
@@ -1278,7 +1278,7 @@ if (typeof(document.getElementById) != 'undefined'
|
||||
} else if (!empty($GLOBALS['validatequery'])) {
|
||||
// skip the extra bit here
|
||||
} else {
|
||||
echo PMA_formatSql(PMA_SQP_parse($GLOBALS['sql_limit_to_append']));
|
||||
echo ' ' . PMA_formatSql(PMA_SQP_parse($GLOBALS['sql_limit_to_append']));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -622,15 +622,15 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
|
||||
|
||||
// must be sorted
|
||||
$supported_query_types = array(
|
||||
'SELECT'
|
||||
/*
|
||||
// Support for these additional query types will come later on.
|
||||
'DELETE',
|
||||
'INSERT',
|
||||
'REPLACE',
|
||||
'SELECT',
|
||||
'SELECT'
|
||||
'TRUNCATE',
|
||||
'UPDATE'
|
||||
/*
|
||||
// Support for these additional query types will come later on.
|
||||
// They are not needed yet
|
||||
'EXPLAIN',
|
||||
'DESCRIBE',
|
||||
'SHOW',
|
||||
@@ -989,7 +989,11 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
|
||||
|
||||
$class .= 'syntax_' . $arr['type'];
|
||||
|
||||
return '<span class="' . $class . '">' . htmlspecialchars($arr['data']) . '</span>' . "\n";
|
||||
//TODO: check why adding a "\n" after the </span> would cause extra
|
||||
// blanks to be displayed:
|
||||
// SELECT p . person_name
|
||||
|
||||
return '<span class="' . $class . '">' . htmlspecialchars($arr['data']) . '</span>';
|
||||
} // end of the "PMA_SQP_formatHtml_colorize()" function
|
||||
|
||||
|
||||
@@ -1188,7 +1192,12 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
|
||||
&& PMA_STR_binarySearchInArr(strtoupper($arr[$i - 1]['data']), $keywords_no_newline, $keywords_no_newline_cnt)))
|
||||
&& ($typearr[1] != 'punct_level_plus')
|
||||
&& (!PMA_STR_binarySearchInArr($upper, $keywords_no_newline, $keywords_no_newline_cnt))) {
|
||||
$before .= $space_alpha_reserved_word;
|
||||
// do not put a space before the first token, because
|
||||
// we use a lot of eregi() checking for the first
|
||||
// reserved word at beginning of query
|
||||
if ($i > 0) {
|
||||
$before .= $space_alpha_reserved_word;
|
||||
}
|
||||
} else {
|
||||
$before .= ' ';
|
||||
}
|
||||
|
10
sql.php3
10
sql.php3
@@ -81,8 +81,12 @@ if (isset($btnDrop) || isset($navig)) {
|
||||
/**
|
||||
* Reformat the query
|
||||
*/
|
||||
$parsed_sql = PMA_SQP_parse((get_magic_quotes_gpc() ? stripslashes($sql_query) : $sql_query));
|
||||
|
||||
$sql_query = (get_magic_quotes_gpc() ? stripslashes($sql_query) : $sql_query);
|
||||
$parsed_sql = PMA_SQP_parse($sql_query);
|
||||
$is_select = eregi('^SELECT[[:space:]]+', $sql_query);
|
||||
$analyzed_sql = PMA_SQP_analyze($parsed_sql);
|
||||
|
||||
$sql_query = PMA_SQP_formatHtml($parsed_sql, 'query_only');
|
||||
|
||||
// If the query is a Select, extract the db and table names and modify
|
||||
@@ -96,7 +100,6 @@ $sql_query = PMA_SQP_formatHtml($parsed_sql, 'query_only');
|
||||
// - do not show a table name in the page header
|
||||
// - do not display the sub-pages links)
|
||||
|
||||
$is_select = eregi('^SELECT[[:space:]]+', $sql_query);
|
||||
if ($is_select) {
|
||||
eregi('^SELECT[[:space:]]+(.*)[[:space:]]+FROM[[:space:]]+(`[^`]+`|[A-Za-z0-9_$]+)([\.]*)(`[^`]*`|[A-Za-z0-9_$]*)', $sql_query, $tmp);
|
||||
|
||||
@@ -473,9 +476,6 @@ else {
|
||||
$dontlimitchars = 0;
|
||||
}
|
||||
|
||||
//$parsed_sql = PMA_SQP_parse($sql_query);
|
||||
//$analyzed_sql = PMA_SQP_analyze($parsed_sql);
|
||||
|
||||
PMA_displayTable($result, $disp_mode, $analyzed_sql);
|
||||
mysql_free_result($result);
|
||||
|
||||
|
Reference in New Issue
Block a user