diff --git a/ChangeLog b/ChangeLog index b6cb88d5c..3565858e7 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ $Source$ 2002-12-11 Marc Delisle * lang/galician: update, thanks to Xosé Calvo + * libraries/sqlparser.lib.php3: bug 649665 undefined vars with UNION, + but there is still some work to do about how to split a UNION 2002-12-10 Michal Cihar * lang/czech*.php3: Updated translation. diff --git a/libraries/sqlparser.lib.php3 b/libraries/sqlparser.lib.php3 index f7368e027..177214a43 100644 --- a/libraries/sqlparser.lib.php3 +++ b/libraries/sqlparser.lib.php3 @@ -2,7 +2,6 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: - /** SQL Parser Functions for phpMyAdmin * * Copyright 2002 Robin Johnson @@ -573,6 +572,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) { ); $subresult_empty = $subresult; $seek_queryend = FALSE; + $seen_end_of_table_ref = FALSE; /* Description of analyzer results * @@ -612,6 +612,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) { // 'LOCK IN SHARE MODE', // 'ORDER BY', // 'PROCEDURE', +// 'UNION', // 'WHERE' // ); $words_ending_table_ref = array( @@ -622,9 +623,10 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) { 'LOCK', 'ORDER', 'PROCEDURE', + 'UNION', 'WHERE' ); - $words_ending_table_ref_cnt = count($words_ending_table_ref); + $words_ending_table_ref_cnt = 9; //count($words_ending_table_ref); // must be sorted $supported_query_types = array( @@ -660,6 +662,8 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) { } // end if (type == punct_queryend) } // end if ($seek_queryend) + // TODO: when we find a UNION, should we split + // in another subresult? if ($arr[$i]['type'] == 'punct_queryend') { $result[] = $subresult; $subresult = $subresult_empty;