Bug #31097 ALTER ONLINE of a data type with implicit default value leaves tmp frm
Submitted: 19 Sep 2007 13:46 Modified: 10 Oct 2007 9:49
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1-mysql-6.2 OS:Linux (64)
Assigned to: Martin Skold CPU Architecture:Any

[19 Sep 2007 13:46] Jonathan Miller
Description:
Doing and ALTER ONLINE ADD COLUMN using a data type is implicit default values will fail w1th:

Alter Table Add Column TIMESTAMP
DBD::mysql::st execute failed: This version of MySQL doesn't yet support 'ALTER ONLINE TABLE TABLE_ALTER.t1 ADD COLUMN c3 TIMESTAMP' 

which is okay, but it leaves a temp frm file in the database directory that will cause DROP DATABASE to fail

How to repeat:
see above
[19 Sep 2007 15:54] 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:

  http://lists.mysql.com/commits/34411

ChangeSet@1.2636, 2007-09-19 17:53:18+02:00, mskold@mysql.com +6 -0
  Bug #31097  ALTER ONLINE of a data type with implicit default value leaves tmp frm: only remove frm file if file type is TMP_TABLE_FRM_FILE_ONLY
[20 Sep 2007 7:17] 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:

  http://lists.mysql.com/commits/34414

ChangeSet@1.2637, 2007-09-20 09:14:25+02:00, mskold@mysql.com +2 -0
  Bug #31097  ALTER ONLINE of a data type with implicit default value leaves tmp frm: fixed testcase so result is time independent
[10 Oct 2007 9:49] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented in mysql-5.1.22-ndb-6.2.7 changelog as follows:

            Online <literal>ALTER</literal> operations involving a
            column whose data type has an implicit default value left
            behind temporary <filename>.FRM</filename> files, causing
            subsequent <literal>DROP DATABASE</literal> statements to
            fail.
[15 Oct 2007 17:56] Jon Stephens
Also documented in mysql-5.1.22-ndb-6.3.4 changelog (already closed).