diff --git a/ChangeLog b/ChangeLog index f657c574f..c4994066d 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-04-27 Garvin Hicking + * read_dump.php: Fixed bug #942390 - When entering a "USE database" + query together with multiple other queries, the db was reset to + the first one. + 2004-04-26 Marc Delisle * config.inc.php, left.php, Documentation.html, libraries/config_import.lib.php, libraries/common.lib.php: @@ -37,7 +42,7 @@ $Source$ 2004-04-20 Michal Cihar * libraries/tbl_change.js, css/phpmyadmin.css.php: Added time editing to calendar. - + 2004-04-19 Alexander M. Turek * lang/german-*.inc.php: Clarification. * config.inc.php, Documentation.html, libraries/config_import.lib.php: @@ -50,11 +55,11 @@ $Source$ 2004-04-19 Marcel Tschopp * libraries/export/sql.php, libraries/export/latex.php: Fixed a few mysqli-specific export-bugs - + 2004-04-19 Marc Delisle * sql.php: bug 780516: capitalizing keywords: we no longer put the formatted query into $sql_query, due to better pattern matching - + 2004-04-19 Michal Cihar * libraries/tbl_change.js: Better return value formatting. * Documentation.html: Mentioned header and footer customization. @@ -87,7 +92,7 @@ $Source$ 2004-04-16 Marc Delisle * lang/french update - * scripts/create-release.sh: daily snapshots + * scripts/create-release.sh: daily snapshots 2004-04-16 Michal Cihar * libraries/common.lib.php, libraries/export/sql.php: ANSI compatible @@ -128,7 +133,7 @@ $Source$ * libraries/export/csv.php: Do not strip export too much (bug #913988). * libraries/export/xml.php: Use PMA_DBI_fetch_row and drop PHP 3 compatibility code. - + 2004-04-13 Marc Delisle * libraries/relation.lib.php: bug 930445 when PMA_table_info not defined, thanks to Philippe Jausions (jausions) @@ -138,22 +143,22 @@ $Source$ 2004-04-12 Marcel Tschopp * left.php, tbl_properties_structure.php, libraries/mysql_charsets.lib.php, - libraries/relation.lib.php: Changed some queries to use + libraries/relation.lib.php: Changed some queries to use MYSQLI_STORE_RESULT. 2004-04-10 Marcel Tschopp - * db_datadict.php, db_details_db_info.php, db_details_qbe.php, - db_details_structure.php, db_printview.php, left.php, main.php, - pdf_pages.php, read_dump.php, server_privileges.php, sql.php, - tbl_change.php, tbl_indexes.php, tbl_properties_structure.php, - tbl_relation.php, tbl_select.php, libraries/database_interface.lib.php, - libraries/db_table_exists.lib.php, libraries/mysql_charsets.lib.php, + * db_datadict.php, db_details_db_info.php, db_details_qbe.php, + db_details_structure.php, db_printview.php, left.php, main.php, + pdf_pages.php, read_dump.php, server_privileges.php, sql.php, + tbl_change.php, tbl_indexes.php, tbl_properties_structure.php, + tbl_relation.php, tbl_select.php, libraries/database_interface.lib.php, + libraries/db_table_exists.lib.php, libraries/mysql_charsets.lib.php, libraries/relation.lib.php, libraries/dbi/mysqli.dbi.lib.php: Changed some queries to use MYSQLI_STORE_RESULT. phpMyAdmin now works with MYSQLI_USE_RESULT as default. - * libraries/display_tbl.lib.php: Use PMA_DBI_fetch_row instead of + * libraries/display_tbl.lib.php: Use PMA_DBI_fetch_row instead of PMA_DBI_fetch_array. - + 2004-04-07 Marc Delisle * tbl_select.php, lang/*: feature 788608: new features for Search: DISTINCT, IS NULL, IS NOT NULL, NOT LIKE, multiple select for ENUM, @@ -170,7 +175,7 @@ $Source$ thanks to Wandering Zombie (wanderingzombie). 2004-04-07 Marcel Tschopp - * multi_submits.inc.php, lang/german: bug 930714, wrong spelling and + * multi_submits.inc.php, lang/german: bug 930714, wrong spelling and query display. Thanks to Daniel Marschall (blackdrake) 2004-04-07 Marc Delisle @@ -190,10 +195,10 @@ $Source$ * lang/lithuanian: Updated, thanks to Vilius Zigmantas (viliusz). 2004-04-03 Olivier Mueller - * server_privileges.php, libraries/server_privileges.js: added + * server_privileges.php, libraries/server_privileges.js: added (un)checkall links to the "Global privileges" edition form. Todo: make it work even if JS is disabled + local links - for the "Data" and "Structure" checkboxes groups. + for the "Data" and "Structure" checkboxes groups. 2004-04-02 Alexander M. Turek * lang/german-*.inc.php: Fixed a typo. diff --git a/read_dump.php b/read_dump.php index c2af81eba..2f418ce0a 100644 --- a/read_dump.php +++ b/read_dump.php @@ -293,6 +293,11 @@ if ($sql_query != '') { $info_count++; } + // If a 'USE ' SQL-clause was found and the query succeeded, set our current $db to the new one + if ($result != FALSE && preg_match('@^USE[[:space:]]*([^[:space]+)@i', $a_sql_query, $match)) { + $db = trim($match[0]); + } + if (!isset($reload) && preg_match('@^(DROP|CREATE)[[:space:]]+(IF EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)@i', $a_sql_query)) { $reload = 1; }