Bug #41945 cluster reorg part on single partition segv in mysqld
Submitted: 8 Jan 2009 7:43 Modified: 15 Feb 2009 20:11
Reporter: Tomas Ulin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:Cluster 6.4 OS:Any
Assigned to: Mattias Jonsson CPU Architecture:Any

[8 Jan 2009 7:43] Tomas Ulin
Description:
start a mysqld and a single ndb node cluster...

create table t1 (a int key) engine ndb;
alter table t1 reorganize partition;

...segv

core shows some issue when trying to create the temporary frm file... getting confused with having a single (== no partition)... etc.

How to repeat:
see above
[21 Jan 2009 8:50] Mattias Jonsson
seems to be related to bug#36591 (get_no_parts() call before table is opened).
[30 Jan 2009 9:21] Jonas Oreland
this is first a duplicate of bug#40389
but after mattias fix for this,
the testcase does *still* not work on ndb,
and we instead get the error message "ERROR 1031 (HY000): Table storage engine for 't1' doesn't have this option"

After mattias "fix" mysql_alter_table will return in 
fast_alter_partition_table and not continue in general online alter table
hence not calling any more ndb functions
[3 Feb 2009 6:38] 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/64966

3239 Mattias Jonsson	2009-02-03
      Bug#41945: cluster reorg part on single partition segv in mysqld
      refix of
      Bug #40389: REORGANIZE PARTITION crashes when only using one partition
      
      Problem was a remaining partition info struct that was not cleared,
      resulting in an inconsitent .frm-file
      
      Solution was to only allow REORGANIZE PARTITION on auto partitioned
      native engines, such as NDB, and not trying to do any partitioning
      specific.
[3 Feb 2009 14: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/65013

2807 Jonas Oreland	2009-02-03
      bug#41945 - commit to 6.2
[3 Feb 2009 14:27] Bugs System
Pushed into 5.1.31-ndb-6.2.17 (revid:jonas@mysql.com-20090203141759-1b4mq7ycqoptties) (version source revid:jonas@mysql.com-20090203141759-1b4mq7ycqoptties) (merge vers: 5.1.31-ndb-6.2.17) (pib:6)
[3 Feb 2009 14:28] Bugs System
Pushed into 5.1.31-ndb-6.3.22 (revid:jonas@mysql.com-20090203141914-0v3pxrcjhf5rteus) (version source revid:jonas@mysql.com-20090203141914-0v3pxrcjhf5rteus) (merge vers: 5.1.31-ndb-6.3.22) (pib:6)
[3 Feb 2009 14:29] Bugs System
Pushed into 5.1.31-ndb-6.4.3 (revid:jonas@mysql.com-20090203142531-ff0q8m9skacpgatg) (version source revid:jonas@mysql.com-20090203142531-ff0q8m9skacpgatg) (merge vers: 5.1.31-ndb-6.4.3) (pib:6)
[9 Feb 2009 9:32] 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/65578

3248 Martin Skold	2009-02-09 [merge]
      Merge
[10 Feb 2009 20:13] Bugs System
Pushed into 6.0.10-alpha (revid:alik@sun.com-20090210194937-s7xshv5l3m1v7wi9) (version source revid:tomas.ulin@sun.com-20090204130805-wb1egwdby2y0cnti) (merge vers: 6.0.10-alpha) (pib:6)
[12 Feb 2009 15:45] Jonas Oreland
for docs:
this is really interesting in 6.4,
but the bug was fixed in 6.2 anyway for easier merging...
[15 Feb 2009 20:11] Jon Stephens
Documented bug fix in the NDB-6.2.17, 6.3.23, and 6.4.3 changelogs as follows:

        Executing ALTER TABLE ... REORGANIZE PARTITION on an NDBCLUSTER
        table having only one partition caused mysqld to crash.