summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarko@hundin.mysql.fi <>2004-05-10 17:15:29 +0300
committermarko@hundin.mysql.fi <>2004-05-10 17:15:29 +0300
commitd48d5681c8733a1f6d75eb13f51654513e93a097 (patch)
tree3f1db9727ba350f88f6af94ec7f1e0ec7d05da14
parentdd9a517e530865d0043f34c312a025e6ed060ebd (diff)
downloadmariadb-git-d48d5681c8733a1f6d75eb13f51654513e93a097.tar.gz
InnoDB: Fix assertion failure for orphaned tables in DROP DATABASE
-rw-r--r--innobase/row/row0mysql.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index bdc47ca0e8e..228f19c865f 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -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);