patch #1253478, variable initialization and code cleanup

This commit is contained in:
Marc Delisle
2005-08-08 20:22:11 +00:00
parent 57fc27c0bd
commit 1e054e1fe7
2 changed files with 50 additions and 44 deletions

View File

@@ -15,6 +15,8 @@ $Source$
* libraries/mysql_charsets.lib.php, /relation_cleanup.lib.php, * libraries/mysql_charsets.lib.php, /relation_cleanup.lib.php,
/tbl_move_copy.php: patch #1253461 (code cleanup), /tbl_move_copy.php: patch #1253461 (code cleanup),
thanks to Sebastian Mendel thanks to Sebastian Mendel
* libraries/sqlparser.lib.php: patch #1253478, variable initialization
and code cleanup, thanks to Sebastian Mendel
2005-08-07 Marc Delisle <lem9@users.sourceforge.net> 2005-08-07 Marc Delisle <lem9@users.sourceforge.net>
* Documentation.html: Save button for PDF schema coordinates, * Documentation.html: Save button for PDF schema coordinates,

View File

@@ -715,6 +715,8 @@ if ($is_minimum_common == FALSE) {
$subresult_empty = $subresult; $subresult_empty = $subresult;
$seek_queryend = FALSE; $seek_queryend = FALSE;
$seen_end_of_table_ref = FALSE; $seen_end_of_table_ref = FALSE;
$number_of_brackets_in_extract = 0;
$number_of_brackets_in_group_concat = 0;
// for SELECT EXTRACT(YEAR_MONTH FROM CURDATE()) // for SELECT EXTRACT(YEAR_MONTH FROM CURDATE())
// we must not use CURDATE as a table_ref // we must not use CURDATE as a table_ref
@@ -1299,6 +1301,8 @@ if ($is_minimum_common == FALSE) {
$in_from = FALSE; $in_from = FALSE;
$in_group_concat = FALSE; $in_group_concat = FALSE;
$unsorted_query = ''; $unsorted_query = '';
$first_reserved_word = '';
$current_identifier = '';
for ($i = 0; $i < $size; $i++) { for ($i = 0; $i < $size; $i++) {
//DEBUG echo "trace loop2 <b>" . $arr[$i]['data'] . "</b> (" . $arr[$i]['type'] . ")<br />"; //DEBUG echo "trace loop2 <b>" . $arr[$i]['data'] . "</b> (" . $arr[$i]['type'] . ")<br />";
@@ -1615,7 +1619,6 @@ if ($is_minimum_common == FALSE) {
// ON UPDATE CURRENT_TIMESTAMP // ON UPDATE CURRENT_TIMESTAMP
if ($upper_data == 'ON') { if ($upper_data == 'ON') {
unset($clause);
if ($arr[$i+1]['type'] == 'alpha_reservedWord') { if ($arr[$i+1]['type'] == 'alpha_reservedWord') {
$second_upper_data = strtoupper($arr[$i+1]['data']); $second_upper_data = strtoupper($arr[$i+1]['data']);
if ($second_upper_data == 'DELETE') { if ($second_upper_data == 'DELETE') {
@@ -1656,7 +1659,8 @@ if ($is_minimum_common == FALSE) {
if (!empty($value)) { if (!empty($value)) {
$foreign[$foreign_key_number][$clause] = $value; $foreign[$foreign_key_number][$clause] = $value;
} }
} unset($clause);
} // endif (isset($clause))
} }
} }