diff options
author | Elena Stepanova <elenst@montyprogram.com> | 2015-11-13 03:23:22 +0200 |
---|---|---|
committer | Elena Stepanova <elenst@montyprogram.com> | 2015-11-13 03:23:22 +0200 |
commit | 2828c2be554b62646fc990ac28b4aef20cd9b9d2 (patch) | |
tree | ad6aac641f5ee1704d3bf0eae28b774b0da17294 /client | |
parent | a430df3aba59c57b0756c25b1586d880d19286df (diff) | |
download | mariadb-git-2828c2be554b62646fc990ac28b4aef20cd9b9d2.tar.gz |
MDEV-9124 mysqldump does not dump data if table name is same as view earlier on
While querying INFORMATION SCHEMA, check for a table's engine
only used table name, but not schema name; so, if there were different
rows with the same table name, a wrong one could be retrieved.
The result of the check affected the decision whether the contents
of the table should be dumped, and whether a DELAYED option can be used.
Fixed by adding a clause for table_schema to the query.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqldump.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index 05ef70a9fa4..cffa5bf21f9 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -5468,7 +5468,7 @@ char check_if_ignore_table(const char *table_name, char *table_type) DBUG_ASSERT(2*sizeof(table_name) < sizeof(show_name_buff)); my_snprintf(buff, sizeof(buff), "SELECT engine FROM INFORMATION_SCHEMA.TABLES " - "WHERE table_name = %s", + "WHERE table_schema = DATABASE() AND table_name = %s", quote_for_equal(table_name, show_name_buff)); if (mysql_query_with_error_report(mysql, &res, buff)) { |