Bug #39893 Crash if select on a partitioned table, when partitioning is disabled
Submitted: 6 Oct 2008 22:22 Modified: 15 Sep 2009 9:50
Reporter: Mattias Jonsson Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1+ OS:Any
Assigned to: Mattias Jonsson CPU Architecture:Any

[6 Oct 2008 22:22] Mattias Jonsson
When using a binary where partitioning support is compiled in, it will crash if one uses a partitioned table, when partitioning is disabled.

Currently the workaround is to do ALTER TABLE t1 REMOVE PARTITIONING before restarting it without partitioning support.

How to repeat:
use a build with partitioning support
./mtr --start-and-exit
(shut down the server)
./mtr --start-dirty --skip-partition

Suggested fix:
When opening the frm-file, verify that the plugin/engine/partitioning is supported before doing partitioning related calls.
[7 Oct 2008 3:47] Valeriy Kravchuk
Verified just as described with 5.1.30 from bzr. Stack trace is:

[14 Oct 2008 22:41] Omer Barnir
setting tag to CHECKED
[8 Jan 2009 14: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:


2756 Mattias Jonsson	2009-01-08
      Bug#39893: Crash if select on a partitioned table, when partitioning is disabled
      Problem was that it tried to run partitioning function calls when
      opening a partitioned table, when it was explicitly disabled.
      Solution is to check if the partitioning plugin is ready to use before
      using any partitioning specific calls.
[2 Sep 2009 16:41] Bugs System
Pushed into 5.1.39 (revid:joro@sun.com-20090902154533-8actmfcsjfqovgsb) (version source revid:mattias.jonsson@sun.com-20090812094608-nrazvdcjxq6nev9f) (merge vers: 5.1.38) (pib:11)
[3 Sep 2009 12:33] Jon Stephens
Documented in the 5.1.39 changelog as follows:

      Attempting to access a partitioned table when partitioning support 
      was disabled in a MySQL server binary compiled with partitioning 
      support caused the server to crash.

Set status as NDI, waiting for push to 5.4 tree.
[14 Sep 2009 16:02] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090914155317-m1g9wodmndzdj4l1) (version source revid:alik@sun.com-20090914155317-m1g9wodmndzdj4l1) (merge vers: 5.4.4-alpha) (pib:11)
[15 Sep 2009 9:50] Jon Stephens
Bugfix also documented in the 5.4.4 changelog. 

[1 Oct 2009 5:58] Bugs System
Pushed into 5.1.39-ndb-6.3.28 (revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (version source revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (merge vers: 5.1.39-ndb-6.3.28) (pib:11)
[1 Oct 2009 7:25] Bugs System
Pushed into 5.1.39-ndb-7.0.9 (revid:jonas@mysql.com-20091001072547-kv17uu06hfjhgjay) (version source revid:jonas@mysql.com-20091001071652-irejtnumzbpsbgk2) (merge vers: 5.1.39-ndb-7.0.9) (pib:11)
[1 Oct 2009 13:25] Bugs System
Pushed into 5.1.39-ndb-7.1.0 (revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (version source revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (merge vers: 5.1.39-ndb-7.1.0) (pib:11)
[2 Oct 2009 0:13] Paul DuBois
Moved 5.4 changelog entry from 5.4.4 to 5.4.3.
[5 Oct 2009 10:50] Bugs System
Pushed into 5.1.39-ndb-6.2.19 (revid:jonas@mysql.com-20091005103850-dwij2dojwpvf5hi6) (version source revid:jonas@mysql.com-20090930185117-bhud4ek1y0hsj1nv) (merge vers: 5.1.39-ndb-6.2.19) (pib:11)