fixed bug #942390 - multiple queries with one having "use database" didn't
set the database correctly and was overriden for the next query
This commit is contained in:
@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2004-04-27 Garvin Hicking <pma@supergarv.de>
|
||||
* 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 <lem9@users.sourceforge.net>
|
||||
* config.inc.php, left.php, Documentation.html,
|
||||
libraries/config_import.lib.php, libraries/common.lib.php:
|
||||
|
@@ -293,6 +293,11 @@ if ($sql_query != '') {
|
||||
$info_count++;
|
||||
}
|
||||
|
||||
// If a 'USE <db>' 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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user