Bug #42614 Mysql auto locate databases can overwrite frm data.

Submitted: 5 Feb 2009 8:09 Modified: 23 Sep 2009 14:54
Reporter: Joshua Gordon Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.3 OS:Linux (FC6.)
Assigned to: Martin Skold CPU Architecture:Any
Tags: mysql-5.1-telco-6.3.20, regression

[5 Feb 2009 8:09] Joshua Gordon
Description:
If you create a DB in myisam and connect to a cluster with the same table the myisam .frm file is corrupted and therefore the data is unaccessible.

How to repeat:
On the first node create a database test create a myisam table test.c1.
On the second node (node2) setup a cluster with 2 mysql nodes 
On node2 that does not have the myisam test db connect to a cluster create a test database with a table test.c1 ndbcluster engine.
Connect node 1 to the cluster that will overwrite the myisam file without warning.
Disconnect from the cluster and try to select from the test.cq 
I did this by adding and removing ndbcluster and ndb-connectstring in the my.cnf
If you need more info please let me know.

Joshua Gordon
[5 Feb 2009 13:53] Sveta Smirnova
Thank you for the report.

Verified as described.

Really frm is broken while MYD still exists.

Workaround: create new table (t2) with same definition like broken one(t1), then rename old *MYD file to new (mv t1.MYD t2.MYD), then repair new table, delete old one, rename new to old.
[5 Feb 2009 14:26] Sveta Smirnova
Bug is not repeatable with plain 5.0 and 5.1 trees.
[6 Feb 2009 18:47] Joshua Gordon
Updating synopsis
[1 Apr 2009 8:24] Jonathan Miller
Please try a later version and see if you still see.
[1 Apr 2009 10:36] Sveta Smirnova
Same problem with mysql-5.1.31 ndb-6.4.2
[7 May 2009 13:02] Jonathan Miller
, telco-6.2 bzr, 6.4.2
[17 Sep 2009 13:52] 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/83612

2997 Martin Skold	2009-09-17
      bug#42614 Mysql auto locate databases can overwrite frm data: checking for local tables in ndbcluster_discover, added test case
      modified:
        mysql-test/suite/ndb/r/ndb_multi.result
        mysql-test/suite/ndb/t/ndb_multi.test
        sql/ha_ndbcluster.cc
        sql/ha_ndbcluster_binlog.cc
        sql/ha_ndbcluster_binlog.h
[18 Sep 2009 8:07] 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/83695

3052 Martin Skold	2009-09-18 [merge]
      Merge
      modified:
        mysql-test/suite/ndb/r/ndb_multi.result
        mysql-test/suite/ndb/t/ndb_multi.test
        sql/ha_ndbcluster.cc
        sql/ha_ndbcluster_binlog.cc
        sql/ha_ndbcluster_binlog.h
[21 Sep 2009 11:45] 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/83903

3011 Martin Skold	2009-09-21 [merge]
      Merge
      modified:
        mysql-test/suite/ndb/r/ndb_multi.result
        mysql-test/suite/ndb/t/ndb_multi.test
        sql/ha_ndbcluster.cc
        sql/ha_ndbcluster_binlog.cc
        sql/ha_ndbcluster_binlog.h
[21 Sep 2009 12:26] 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/83920

3009 Martin Skold	2009-09-21 [merge]
      Merge
      modified:
        mysql-test/suite/ndb/r/ndb_multi.result
        mysql-test/suite/ndb/t/ndb_multi.test
        sql/ha_ndbcluster.cc
        sql/ha_ndbcluster_binlog.cc
        sql/ha_ndbcluster_binlog.h
        storage/ndb/src/ndbapi/Ndb.cpp
[21 Sep 2009 13:52] 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/83946

3057 Martin Skold	2009-09-21 [merge]
      Merge
      modified:
        mysql-test/include/restart_mysqld.inc
        mysql-test/suite/ndb/r/ndb_multi.result
        mysql-test/suite/ndb/t/ndb_multi.test
        sql/ha_ndbcluster.cc
        sql/ha_ndbcluster_binlog.cc
        sql/ha_ndbcluster_binlog.h
        storage/ndb/src/ndbapi/Ndb.cpp
[21 Sep 2009 14:23] 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/83957

3024 Martin Skold	2009-09-21 [merge]
      Merge
      modified:
        mysql-test/suite/ndb/r/ndb_multi.result
        mysql-test/suite/ndb/t/ndb_multi.test
        sql/ha_ndbcluster.cc
        sql/ha_ndbcluster_binlog.cc
        sql/ha_ndbcluster_binlog.h
        storage/ndb/src/ndbapi/Ndb.cpp
[22 Sep 2009 6:18] 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/84025

3020 Martin Skold	2009-09-22 [merge]
      Merge
      modified:
        mysql-test/suite/ndb/r/ndb_multi.result
        mysql-test/suite/ndb/t/ndb_multi.test
        sql/ha_ndbcluster.cc
        sql/ha_ndbcluster_binlog.cc
        sql/ha_ndbcluster_binlog.h
        storage/ndb/src/ndbapi/Ndb.cpp
[23 Sep 2009 12:41] Martin Skold
Pushed into mysql-5.1-telco-6.2 -> mysql-5.1-telco-6.3, mysql-5.1-telco-7.0 and mysql-5.1-telco-7.1.
[23 Sep 2009 14:54] Jon Stephens
Documented bugfix in the NDB-6.2.19, 6.3.27, and 7.0.8 changelogs, as follows:

        When performing auto-discovery of tables on idividual SQL nodes, 
        NDBCLUSTER attempted to overwrite existing MyISAM .frm files and 
        corrupted them.
      
Closed.
[30 Sep 2009 8:13] Bugs System
Pushed into 5.1.37-ndb-6.3.28 (revid:jonas@mysql.com-20090930070741-13u316s7s2l7e1ej) (version source revid:martin.skold@mysql.com-20090921135309-q77376ub6jvk10mg) (merge vers: 5.1.37-ndb-6.3.27) (pib:11)
[30 Sep 2009 8:14] Bugs System
Pushed into 5.1.37-ndb-7.0.9 (revid:jonas@mysql.com-20090930075942-1q6asjcp0gaeynmj) (version source revid:martin.skold@mysql.com-20090921142346-kg9qrq7flqgd6wum) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[30 Sep 2009 8:15] Bugs System
Pushed into 5.1.35-ndb-7.1.0 (revid:jonas@mysql.com-20090930080049-1c8a8cio9qgvhq35) (version source revid:martin.skold@mysql.com-20090922061929-qjq5pztm76lwa7ri) (merge vers: 5.1.35-ndb-7.1.0) (pib:11)

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.045 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.