From 0305d314e2b57289ce091af2364fdc49ef821aea Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 20 May 2007 19:00:38 +0000 Subject: [PATCH] bug #1715709 export in SQL format always includes procedures and functions --- ChangeLog | 1 + libraries/config.default.php | 1 + libraries/export/sql.php | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e1209d2ed..16b4236e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,7 @@ $HeadURL$ - bug #1721002 db rename -> undefined cfgRelation, thanks to Juergen Wind - bug #1721571 CREATE database privilege not always detected, thanks to Gordon McNaughton +- bug #1715709 export in SQL format always includes procedures and functions 2.10.1.0 (2007-04-23) ===================== diff --git a/libraries/config.default.php b/libraries/config.default.php index 39d5867a7..cb9ba6af2 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -328,6 +328,7 @@ $cfg['Export']['sql_use_transaction'] = FALSE; $cfg['Export']['sql_drop_database'] = FALSE; $cfg['Export']['sql_drop_table'] = FALSE; $cfg['Export']['sql_if_not_exists'] = FALSE; +$cfg['Export']['sql_procedure_function'] = FALSE; $cfg['Export']['sql_auto_increment'] = TRUE; $cfg['Export']['sql_backquotes'] = TRUE; $cfg['Export']['sql_dates'] = FALSE; diff --git a/libraries/export/sql.php b/libraries/export/sql.php index b455af0bd..eebd89e7c 100644 --- a/libraries/export/sql.php +++ b/libraries/export/sql.php @@ -68,6 +68,8 @@ if (isset($plugin_list)) { array('type' => 'bool', 'name' => 'auto_increment', 'text' => 'strAddAutoIncrement'); $plugin_list['sql']['options'][] = array('type' => 'bool', 'name' => 'backquotes', 'text' => 'strUseBackquotes'); + $plugin_list['sql']['options'][] = + array('type' => 'bool', 'name' => 'procedure_function', 'text' => sprintf($GLOBALS['strAddClause'], 'CREATE PROCEDURE / FUNCTION')); /* MIME stuff etc. */ $plugin_list['sql']['options'][] = @@ -312,7 +314,7 @@ function PMA_exportDBFooter($db) unset($GLOBALS['sql_constraints']); } - if (PMA_MYSQL_INT_VERSION >= 50000 && isset($GLOBALS['sql_structure'])) { + if (PMA_MYSQL_INT_VERSION >= 50000 && isset($GLOBALS['sql_structure']) && isset($GLOBALS['sql_procedure_function'])) { $procs_funcs = ''; $procedure_names = PMA_DBI_get_procedures_or_functions($db, 'PROCEDURE');