Commit b89bb867 authored by unknown's avatar unknown

InnoDB: Fix assertion failure for orphaned tables in DROP DATABASE


innobase/row/row0mysql.c:
  Compare database part of table name with memcmp(), not strcmp()
parent bd4be3f1
......@@ -2208,10 +2208,11 @@ row_drop_database_for_mysql(
dict_table_t* table;
char* table_name;
int err = DB_SUCCESS;
ulint namelen = strlen(name);
ut_ad(trx->mysql_thread_id == os_thread_get_curr_id());
ut_a(name != NULL);
ut_a(name[strlen(name) - 1] == '/');
ut_a(name[namelen - 1] == '/');
trx->op_info = (char *) "dropping database";
......@@ -2220,7 +2221,7 @@ loop:
row_mysql_lock_data_dictionary(trx);
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);
......
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