Bug #21313 rsql_..._recover_innodb_tmp_table is redundant and broken
Submitted: 27 Jul 2006 13:04 Modified: 20 Jun 2010 0:45
Reporter: Marko Mäkelä Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.1 OS:Any (all)
Assigned to: Marko Mäkelä CPU Architecture:Any

[27 Jul 2006 13: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 10:21] Tatiana Azundris Nuernberg
fixed by inno patchset merged into 5.1.12-beta (5.1-new-maint)
[13 Sep 2006 8:48] Timothy Smith
Pushed to 5.1.12
[29 Sep 2006 2:52] Paul DuBois
Noted in 5.1.12 changelog.
[5 May 2010 15:23] Bugs System
Pushed into 5.1.47 (revid:joro@sun.com-20100505145753-ivlt4hclbrjy8eye) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[6 May 2010 2:21] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug. Re-closing.
[28 May 2010 6:04] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100524190136-egaq7e8zgkwb9aqi) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (pib:16)
[28 May 2010 6:32] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100524190941-nuudpx60if25wsvx) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[28 May 2010 7:00] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100524185725-c8k5q7v60i5nix3t) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[29 May 2010 22:56] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[17 Jun 2010 12:08] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:54] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 13:35] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)