summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2003-07-06 18:01:51 +0300
committerheikki@hundin.mysql.fi <>2003-07-06 18:01:51 +0300
commit7be1beb2d39db12d192110325958fd820c1fff8f (patch)
tree260a2d0bbbb57f49276bc11f8c21557148f53556 /innobase
parentca8251c6c5880ce62ab5ce9381588ae4b5ec515c (diff)
downloadmariadb-git-7be1beb2d39db12d192110325958fd820c1fff8f.tar.gz
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"