Navigation Menu

Skip to content

Commit

Permalink
creating database while exporting at database level
Browse files Browse the repository at this point in the history
  • Loading branch information
ayusun committed May 16, 2013
1 parent 4113d9e commit d8b9a0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions export.php
Expand Up @@ -720,6 +720,9 @@ function PMA_exportOutputHandler($line)
if (! $export_plugin->exportDBHeader($db)) {
break;
}
if (! $export_plugin->exportDBCreate($db)) {
break;
}

if (method_exists($export_plugin, 'exportRoutines')
&& strpos($GLOBALS['sql_structure_or_data'], 'structure') !== false
Expand Down
4 changes: 2 additions & 2 deletions libraries/plugins/export/ExportSql.class.php
Expand Up @@ -706,7 +706,7 @@ public function exportDBCreate($db)
return false;
}
}
$create_query = 'CREATE DATABASE '
$create_query = 'CREATE DATABASE IF NOT EXISTS '
. (isset($GLOBALS['sql_backquotes'])
? PMA_Util::backquoteCompat($db, $compat) : $db);
$collation = PMA_getDbCollation($db);
Expand Down Expand Up @@ -1873,4 +1873,4 @@ public function exportData($db, $table, $crlf, $error_url, $sql_query)

return true;
} // end of the 'exportData()' function
}
}

0 comments on commit d8b9a0b

Please sign in to comment.