From 906ab3211229927371596cb4145b55b2e52eb110 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Thu, 13 Aug 2015 07:20:12 +0530 Subject: [PATCH] Exporting metadata should be done last since it uses a USE statement Signed-off-by: Madhura Jayaratne --- libraries/export.lib.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/export.lib.php b/libraries/export.lib.php index fdbb8cab8f..f3548fc6d5 100644 --- a/libraries/export.lib.php +++ b/libraries/export.lib.php @@ -740,6 +740,10 @@ function PMA_exportDatabase( } + if (! $export_plugin->exportDBFooter($db)) { + return; + } + // export metadata related to this db if (isset($GLOBALS['sql_metadata'])) { // Types of metadata to export. @@ -752,9 +756,6 @@ function PMA_exportDatabase( } } - if (! $export_plugin->exportDBFooter($db)) { - return; - } if ($separate_files == 'database') { PMA_saveObjectInBuffer('extra'); }