mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 01:54:00 +02:00
Create and use database only for export of all databases
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@242 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
12
dump.inc.php
12
dump.inc.php
@@ -40,12 +40,6 @@ function dump($db) {
|
||||
}
|
||||
}
|
||||
|
||||
$result = $mysql->query("SHOW CREATE DATABASE " . idf_escape($db));
|
||||
if ($result) {
|
||||
echo $mysql->result($result, 1) . ";\n";
|
||||
$result->free();
|
||||
}
|
||||
echo "USE " . idf_escape($db) . ";\n";
|
||||
echo "SET CHARACTER SET utf8;\n\n";
|
||||
$result = $mysql->query("SHOW TABLE STATUS");
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
@@ -76,6 +70,12 @@ if (!strlen($_GET["db"])) {
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
if ($row["Database"] != "information_schema" || $mysql->server_info < 5) {
|
||||
if ($mysql->select_db($row["Database"])) {
|
||||
$result = $mysql->query("SHOW CREATE DATABASE " . idf_escape($db));
|
||||
if ($result) {
|
||||
echo $mysql->result($result, 1) . ";\n";
|
||||
$result->free();
|
||||
}
|
||||
echo "USE " . idf_escape($db) . ";\n";
|
||||
dump($row["Database"]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user