Bug #21313 rsql_..._recover_innodb_tmp_table is redundant and broken
Submitted: 27 Jul 2006 15:04 Modified: 29 Sep 2006 4:52
Reporter: Marko Mäkelä
Status: Closed
Category:Server: InnoDB Severity:S3 (Non-critical)
Version:5.1 OS:Any (all)
Assigned to: Marko Mäkelä Target Version:

[27 Jul 2006 15:04] Marko Mäkelä
Description:
The feature to recover a temporary table #sql_<id> in InnoDB by creating a table
"rsql_<id>_recover_innodb_tmp_table" was broken by the introduction of the table name
escaping in MySQL 5.1.

The feature is redundant, because you can recover such tables as follows.

How to repeat:
create table a(a int primary key)engine=innodb;
create index a on a(a); #or ALTER TABLE

# crash and restart mysqld before the ALTER TABLE completes
# look the data directory for a name @0023sql@002d..., i.e.,
# @0023sql@002d3c44_2.frm in this example

rename table `#sql-3c44_2` to a2;
# although the name is not shown by SHOW TABLES, MySQL finds it

Suggested fix:
Remove the check for "rsql_<id>_recover_innodb_tmp_table" in row_create_table_for_mysql()
and document the procedure for recovering temporary tables.
[22 Aug 2006 12:21] Tatjana A. Nuernberg
fixed by inno patchset merged into 5.1.12-beta (5.1-new-maint)
[13 Sep 2006 10:48] Timothy Smith
Pushed to 5.1.12
[29 Sep 2006 4:52] Paul DuBois
Noted in 5.1.12 changelog.