diff options
author | Jim Winstead <jimw@mysql.com> | 2009-07-13 12:11:16 -0700 |
---|---|---|
committer | Jim Winstead <jimw@mysql.com> | 2009-07-13 12:11:16 -0700 |
commit | 62a4848d09f8fc81e35127ffe07d431fb8a2a60c (patch) | |
tree | 2c16863bd863c75d1a5827b99e320e258a585948 /client/mysqldump.c | |
parent | 8b6ca5bf30b2b728b32ccf37235d72750da4ec97 (diff) | |
parent | 2a4e1220c8a382e4f7d15da714d465558b0de685 (diff) | |
download | mariadb-git-62a4848d09f8fc81e35127ffe07d431fb8a2a60c.tar.gz |
Merge bug fixes
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r-- | client/mysqldump.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index 6b2c2a06834..6d45d901b33 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -3821,6 +3821,10 @@ static int dump_all_databases() return 1; while ((row= mysql_fetch_row(tableres))) { + if (mysql_get_server_version(mysql) >= 50003 && + !my_strcasecmp(&my_charset_latin1, row[0], "information_schema")) + continue; + if (dump_all_tables_in_db(row[0])) result=1; } @@ -3835,6 +3839,10 @@ static int dump_all_databases() } while ((row= mysql_fetch_row(tableres))) { + if (mysql_get_server_version(mysql) >= 50003 && + !my_strcasecmp(&my_charset_latin1, row[0], "information_schema")) + continue; + if (dump_all_views_in_db(row[0])) result=1; } @@ -3941,10 +3949,6 @@ int init_dumping_tables(char *qdatabase) static int init_dumping(char *database, int init_func(char*)) { - if (mysql_get_server_version(mysql) >= 50003 && - !my_strcasecmp(&my_charset_latin1, database, "information_schema")) - return 1; - if (mysql_select_db(mysql, database)) { DB_error(mysql, "when selecting the database"); @@ -4003,6 +4007,7 @@ static int dump_all_tables_in_db(char *database) DBUG_RETURN(1); if (opt_xml) print_xml_tag(md_result_file, "", "\n", "database", "name=", database, NullS); + if (lock_tables) { DYNAMIC_STRING query; @@ -4236,7 +4241,10 @@ static int dump_selected_tables(char *db, char **table_names, int tables) } end= pos; - if (lock_tables) + /* Can't LOCK TABLES in INFORMATION_SCHEMA, so don't try. */ + if (lock_tables && + !(mysql_get_server_version(mysql) >= 50003 && + !my_strcasecmp(&my_charset_latin1, db, "information_schema"))) { if (mysql_real_query(mysql, lock_tables_query.str, lock_tables_query.length-1)) |