Commit d48d5681 authored by marko@hundin.mysql.fi's avatar marko@hundin.mysql.fi

InnoDB: Fix assertion failure for orphaned tables in DROP DATABASE

parent dd9a517e
...@@ -2208,10 +2208,11 @@ row_drop_database_for_mysql( ...@@ -2208,10 +2208,11 @@ row_drop_database_for_mysql(
dict_table_t* table; dict_table_t* table;
char* table_name; char* table_name;
int err = DB_SUCCESS; int err = DB_SUCCESS;
ulint namelen = strlen(name);
ut_ad(trx->mysql_thread_id == os_thread_get_curr_id()); ut_ad(trx->mysql_thread_id == os_thread_get_curr_id());
ut_a(name != NULL); ut_a(name != NULL);
ut_a(name[strlen(name) - 1] == '/'); ut_a(name[namelen - 1] == '/');
trx->op_info = (char *) "dropping database"; trx->op_info = (char *) "dropping database";
...@@ -2220,7 +2221,7 @@ row_drop_database_for_mysql( ...@@ -2220,7 +2221,7 @@ row_drop_database_for_mysql(
row_mysql_lock_data_dictionary(trx); row_mysql_lock_data_dictionary(trx);
while ((table_name = dict_get_first_table_name_in_db(name))) { while ((table_name = dict_get_first_table_name_in_db(name))) {
ut_a(strcmp(table_name, name) == 0); ut_a(memcmp(table_name, name, namelen) == 0);
table = dict_table_get_low(table_name); table = dict_table_get_low(table_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment