Bug #27149 mysql_convert_table_format: Not sufficiently careful
Submitted: 14 Mar 2007 18:59 Modified: 18 Jun 2009 14:31
Reporter: Paul Dubois Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:all OS:Linux (Linux)
Assigned to: Jim Winstead
Triage: Triaged: D3 (Medium)

[14 Mar 2007 18:59] Paul Dubois
mysql_convert_table_format has a --type=engine_name
option that enables you to specify the desired storage
engine to convert your tables to. There is a check in
the code on the value of this option:

if (uc($opt_type) eq "HEAP")
  print "Converting to type HEAP would delete your tables; aborting\n";

However, HEAP is now called MEMORY. If it's important to
prevent conversion of tables to HEAP, the same should apply

How to repeat:
Examine the source code.

Suggested fix:
Test not just for HEAP, but for MEMORY as well.
[14 Mar 2007 23:04] Miguel Solorzano
Thank you for the bug report.
[28 Apr 2009 18:14] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:


2876 Jim Winstead	2009-04-28
      Check for MEMORY, HEAP, and BLACKHOLE in mysql_convert_table_format when
      preventing a change that would result in table data loss. (Bug #27149)
      Also updated mysql_convert_table_format to use --engine as the documentation
      claimed, and use the engine terminology throughout instead of the obsolete
      'table type'.
[5 May 2009 18:01] Jim Winstead
Queued to 5.1-bugteam and 6.0-bugteam.
[28 May 2009 8:14] Bugs System
Pushed into 5.1.36 (revid:joro@sun.com-20090528073639-yohsb4q1jzg7ycws) (version source revid:mats@sun.com-20090511132802-nnkiyb2huih1tklz) (merge vers: 5.1.35) (pib:6)
[29 May 2009 1:57] Paul Dubois
Noted in 5.1.36 changelog.

mysql_convert_table_format did not prevent converting tables to 
MEMORY or BLACKHOLE tables, which could result in data loss.

Setting report to NDI pending push into 6.0.x.
[17 Jun 2009 19:22] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090616183122-chjzbaa30qopdra9) (version source revid:jimw@mysql.com-20090505173706-9ze3q4qzngw8kt2b) (merge vers: 6.0.12-alpha) (pib:11)
[18 Jun 2009 14:31] Paul Dubois
Noted in 5.4.4 changelog.
[12 Aug 2009 23:02] Paul Dubois
Noted in 5.4.2 changelog because next 5.4 version will be 5.4.2 and not 5.4.4.
[15 Aug 2009 2:19] Paul Dubois
Ignore previous comment about 5.4.2.
[26 Aug 2009 13:46] Bugs System
Pushed into 5.1.37-ndb-7.0.8 (revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (version source revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[26 Aug 2009 13:46] Bugs System
Pushed into 5.1.37-ndb-6.3.27 (revid:jonas@mysql.com-20090826105955-bkj027t47gfbamnc) (version source revid:jonas@mysql.com-20090826105955-bkj027t47gfbamnc) (merge vers: 5.1.37-ndb-6.3.27) (pib:11)
[26 Aug 2009 13:48] Bugs System
Pushed into 5.1.37-ndb-6.2.19 (revid:jonas@mysql.com-20090825194404-37rtosk049t9koc4) (version source revid:jonas@mysql.com-20090825194404-37rtosk049t9koc4) (merge vers: 5.1.37-ndb-6.2.19) (pib:11)
[27 Aug 2009 16:32] Bugs System
Pushed into 5.1.35-ndb-7.1.0 (revid:magnus.blaudd@sun.com-20090827163030-6o3kk6r2oua159hr) (version source revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[9 Oct 2009 1:30] Paul Dubois
The 5.4 fix has been pushed to 5.4.2.