summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2003-07-06 18:01:51 +0300
committerunknown <heikki@hundin.mysql.fi>2003-07-06 18:01:51 +0300
commitda1be35be8ce5f09f18f2d87bfb58e8ea139ec6a (patch)
tree260a2d0bbbb57f49276bc11f8c21557148f53556 /innobase
parentad720a2803a0e6af99e6f5cee5a2b1293a3fc78f (diff)
downloadmariadb-git-da1be35be8ce5f09f18f2d87bfb58e8ea139ec6a.tar.gz
row0mysql.c:
Fix performance bug: if there were thousands of tables, DROP TABLE could take as much as a second CPU time innobase/row/row0mysql.c: Fix performance bug: if there were thousands of tables, DROP TABLE could take as much as a second CPU time
Diffstat (limited to 'innobase')
-rw-r--r--innobase/row/row0mysql.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index af73c2f62c3..51231de4d77 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -1937,7 +1937,8 @@ row_drop_table_for_mysql(
" found := 0;\n"
" ELSE"
" DELETE FROM SYS_FIELDS WHERE INDEX_ID = index_id;\n"
- " DELETE FROM SYS_INDEXES WHERE ID = index_id;\n"
+ " DELETE FROM SYS_INDEXES WHERE ID = index_id\n"
+ " AND TABLE_ID = table_id;\n"
" END IF;\n"
"END LOOP;\n"
"DELETE FROM SYS_COLUMNS WHERE TABLE_ID = table_id;\n"