Bug #51347 | assertion with show create table + partition by columns on decimal column | ||
---|---|---|---|
Submitted: | 20 Feb 2010 13:56 | Modified: | 29 Mar 2010 9:45 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Partitions | Severity: | S1 (Critical) |
Version: | 5.5.1-m2-debug,5.5.99-m3-debug | OS: | Any |
Assigned to: | Mattias Jonsson | CPU Architecture: | Any |
[20 Feb 2010 13:56]
Shane Bester
[20 Feb 2010 14:54]
Valeriy Kravchuk
Thank you for the bug report. Verified just as described on Mac OS X: 77-52-24-143:trunk openxs$ bin/mysql -uroot test Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.1-m2-debug Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> drop table if exists `t1`; Query OK, 0 rows affected (0.03 sec) mysql> create table `t1`(`a` dec) engine=myisam -> partition by range columns (`a`) -> (partition `p` values less than (0) engine = myisam); Query OK, 0 rows affected (0.25 sec) mysql> show create table `t1`; ERROR 2013 (HY000): Lost connection to MySQL server during query mysql> 100220 16:52:40 mysqld_safe mysqld restarted In the error log I've got: ... Version: '5.5.1-m2-debug' socket: '/tmp/mysql.sock' port: 3306 Source distribution Assertion failed: (result_type == field->result_type()), function unknown function, file sql_partition.cc, line 2242. ...
[4 Mar 2010 9:36]
Mattias Jonsson
In the manual: http://dev.mysql.com/doc/refman/5.5/en/partitioning-columns.html it says: Other numeric data types (such as DECIMAL or FLOAT) are not supported as partitioning columns. So the bug is probably that DECIMAL is allowed in the create in the first place. (the code tries to handle DECIMAL as if it is a INTEGER type, which is not really true...)
[4 Mar 2010 10:25]
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/102268 3123 Mattias Jonsson 2010-03-04 Bug#51347: assertion with show create table + partition by columns on decimal column The problem was that there was no check to disallow DECIMAL columns in the code (it was accepted as if it was INTEGER). Solution was to correctly disallow DECIMAL columns in COLUMNS partitioning. As documented. @ mysql-test/r/partition_column.result Bug#51347: assertion with show create table + partition by columns on decimal column updated test result @ mysql-test/t/partition_column.test Bug#51347: assertion with show create table + partition by columns on decimal column Added test to verify column types that is not supported @ sql/sql_partition.cc Bug#51347: assertion with show create table + partition by columns on decimal column Moved DECIMAL types to be disallowed as column types in COLUMNS partitioning
[11 Mar 2010 9:27]
Mikael Ronström
Please create WL for adding support for Decimal type
[16 Mar 2010 21:10]
Mattias Jonsson
pushed to mysql-trunk-bugfixing and mysql-next-mr-bugfixing (not yet to mysql-6.0-codebase-bugfixing, due to unmerged csets)
[24 Mar 2010 8:14]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100324081249-yfwol7qtcek6dh7w) (version source revid:alik@sun.com-20100324081113-kc7x1iytnplww91u) (merge vers: 6.0.14-alpha) (pib:16)
[24 Mar 2010 8:16]
Bugs System
Pushed into 5.5.4-m3 (revid:alik@sun.com-20100324081056-6bndv6f0nrvbblhp) (version source revid:alik@sun.com-20100324081056-6bndv6f0nrvbblhp) (merge vers: 5.5.4-m3) (pib:16)
[24 Mar 2010 8:17]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100324081159-5b8juv8ldiqwce8v) (version source revid:alik@sun.com-20100324081105-y72rautcea375zxm) (pib:16)
[29 Mar 2010 9:45]
Jon Stephens
Documented in the 5.5.4 and 6.0.14 changelogs as follows: Attempting to partition a table using a DECIMAL column caused the server to crash; this not supported and is now specifically disallowed. Closed.
[31 Mar 2010 16:01]
Paul DuBois
5.5.4 changelog entry was moved to 5.5.5.