#At file:///home/rith/Work/MySQl/bug45587/ based on revid:hema@stripped
2872 Ritheesh Vedire 2009-09-30
Bug#45587 Backup of tables using a non-existent storage engine does not give warning/error
This happens because backup engine does not know the existence of all invalid tables
@ sql/si_objects.cc
Bug#45587 Backup of tables using a non-existent storage engine does not give warning/error
The query s_stream in the function obs::get_db_tables() (file: si_objects.cc):
SELECT <db_name>, table_name FROM INFORMATION_SCHEMA.TABLES
WHERE table_schema = '<db_name>' AND table_type = 'BASE TABLE';
does not return invalid tables . See bug#47697
So I have changed the query as shown, to get all the tables including invalid ones from the information_schema.tables. After that back up engine knows about invalid tables and throws error messages.
This fix is temporary . once bug#47697 is fixed, the present fix is redundant and we can revert to original s_stream query.
modified:
sql/si_objects.cc
=== modified file 'sql/si_objects.cc'
--- a/sql/si_objects.cc 2009-09-10 13:46:13 +0000
+++ b/sql/si_objects.cc 2009-09-30 11:11:16 +0000
@@ -2645,10 +2645,12 @@ Obj_iterator *get_db_tables(THD *thd, co
String_stream s_stream;
s_stream <<
- "SELECT '" << db_name << "', table_name "
+ "SELECT '" << db_name << "', table_name "
+ "FROM ( SELECT * "
"FROM INFORMATION_SCHEMA.TABLES "
"WHERE table_schema = '" << db_name << "' AND "
- "table_type = 'BASE TABLE'";
+ "table_type = 'BASE TABLE'"
+ ") AS get_table";
return create_row_set_iterator<Db_tables_iterator>(thd, s_stream.lex_string());
}
Attachment: [text/bzr-bundle]
| Thread |
|---|
| • bzr commit into mysql-6.0-backup branch (ritheesh.vedire:2872)Bug#45587 | Ritheesh Vedire | 30 Sep |