diff options
author | unknown <marko@hundin.mysql.fi> | 2004-05-10 17:15:29 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-05-10 17:15:29 +0300 |
commit | b89bb86751356b4fdc422bfd7f75f1f787da475f (patch) | |
tree | 3f1db9727ba350f88f6af94ec7f1e0ec7d05da14 /innobase | |
parent | bd4be3f1b99c53c260c6ec4cf26d77d1742b7e91 (diff) | |
download | mariadb-git-b89bb86751356b4fdc422bfd7f75f1f787da475f.tar.gz |
InnoDB: Fix assertion failure for orphaned tables in DROP DATABASE
innobase/row/row0mysql.c:
Compare database part of table name with memcmp(), not strcmp()
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/row/row0mysql.c | 5 |
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); |