diff options
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r-- | client/mysqldump.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index dc87338aac2..c2c1aa6fc6c 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -5090,6 +5090,14 @@ static int dump_selected_tables(char *db, char **table_names, int tables) if (opt_xml) print_xml_tag(md_result_file, "", "\n", "database", "name=", db, NullS); + + /* obtain dump of routines (procs/functions) */ + if (opt_routines && mysql_get_server_version(mysql) >= 50009) + { + DBUG_PRINT("info", ("Dumping routines for database %s", db)); + dump_routines_for_db(db); + } + if (opt_single_transaction && mysql_get_server_version(mysql) >= 50500) { verbose_msg("-- Setting savepoint...\n"); @@ -5099,7 +5107,6 @@ static int dump_selected_tables(char *db, char **table_names, int tables) DBUG_RETURN(1); } } - /* Dump each selected table */ for (pos= dump_tables; pos < end; pos++) { @@ -5161,12 +5168,6 @@ static int dump_selected_tables(char *db, char **table_names, int tables) DBUG_PRINT("info", ("Dumping events for database %s", db)); dump_events_for_db(db); } - /* obtain dump of routines (procs/functions) */ - if (opt_routines && mysql_get_server_version(mysql) >= 50009) - { - DBUG_PRINT("info", ("Dumping routines for database %s", db)); - dump_routines_for_db(db); - } free_root(&glob_root, MYF(0)); if (opt_xml) { |