Commit 6825b6f7 authored by marko's avatar marko

branches/zip: row_merge_drop_temp_indexes(): Replace the WHILE 1 with

WHILE 1=1 in the SQL procedure, so that the loop will actually be
entered and temporary indexes be dropped during crash recovery.
Thanks to Sunny Bains for pointing this out.

Tested as follows:

Set a breakpoint in row_merge_rename_indexes.

CREATE TABLE t(a INT)ENGINE=InnoDB;
CREATE INDEX a ON t(a);

-- The breakpoint will be reached.  Kill and restart mysqld.
SHOW CREATE TABLE t;
-- This shows the MySQL .frm file, without and index.
CREATE TABLE innodb_table_monitor(a INT)ENGINE=InnoDB;
-- This will dump the InnoDB dictionary to the error log, without the index.
parent b618823f
2008-11-26 The InnoDB Team
* row/row0merge.c (row_merge_drop_temp_indexes):
Replace the WHILE 1 with WHILE 1=1 in the SQL procedure, so that
the loop will actually be entered and temporary indexes be dropped
during crash recovery.
2008-10-31 The InnoDB Team 2008-10-31 The InnoDB Team
* dict/dict0mem.c, include/dict0mem.h, include/lock0lock.h, * dict/dict0mem.c, include/dict0mem.h, include/lock0lock.h,
......
...@@ -1821,7 +1821,7 @@ row_merge_drop_temp_indexes(void) ...@@ -1821,7 +1821,7 @@ row_merge_drop_temp_indexes(void)
"WHERE SUBSTR(NAME,0,1)='\377' FOR UPDATE;\n" "WHERE SUBSTR(NAME,0,1)='\377' FOR UPDATE;\n"
"BEGIN\n" "BEGIN\n"
"\tOPEN c;\n" "\tOPEN c;\n"
"\tWHILE 1 LOOP\n" "\tWHILE 1=1 LOOP\n"
"\t\tFETCH c INTO indexid;\n" "\t\tFETCH c INTO indexid;\n"
"\t\tIF (SQL % NOTFOUND) THEN\n" "\t\tIF (SQL % NOTFOUND) THEN\n"
"\t\t\tEXIT;\n" "\t\t\tEXIT;\n"
......
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