Bug #48164 Partitions: crash with long varchar
Submitted: 19 Oct 2009 18:22 Modified: 15 Nov 2009 13:31
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.4.3-beta OS:Linux (SUSE 11.1 64-bit)
Assigned to: CPU Architecture:Any

[19 Oct 2009 18:22] Peter Gulutzan
Description:
I try to create a partitioned table with a long varchar column.
Crash.

How to repeat:
/* First example: not very long, but with utf8_spanish2_ci */
drop table if exists t9;
set names utf8;
set @@storage_engine=innodb;
create table t9 (s1 varchar(2000) character set utf8 collate utf8_spanish2_ci)
      partition by range column_list(s1)
      (partition p1 values less than (column_list('CZ')),
       partition p2 values less than (column_list('CH')),
       partition p3 values less than (column_list('D')));
insert into t9 values ('czz'),('chi'),('ci'),('cg');
select * from t9 where s1 between 'cg' and 'ci';

/* Second example: very long */
drop table if exists t1;
CREATE TABLE t1 (a varchar(5130)) PARTITION BY RANGE COLUMN_LIST(a)
(PARTITION p2 VALUES LESS THAN (COLUMN_LIST('y')));
select * from t1 where a='x';
[19 Oct 2009 18:25] Peter Gulutzan
I forgot to mention:
I'm using mysql-trunk-wl3352.
[19 Oct 2009 19:17] MySQL Verification Team
Thank you for the bug report. Verified as described.

Query OK, 4 rows affected (0.05 sec)
Records: 4  Duplicates: 0  Warnings: 0

mysql> select * from t9 where s1 between 'cg' and 'ci';
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
[27 Oct 2009 23: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/88425

2900 Mikael Ronstrom	2009-10-28
      Fixed sql_mode issue in BUG#48164, will ignore sql_mode when generating constants, also warnings will not be tolerated
      modified:
        mysql-test/r/partition_column.result
        mysql-test/t/partition_column.test
        sql/partition_info.cc
[5 Nov 2009 6:51] Bugs System
Pushed into 6.0.14-alpha (revid:mikael@mysql.com-20091104090210-om5lq1v39ppduu0e) (version source revid:mikael@mysql.com-20091030163450-387z4yevx0lrj3fb) (merge vers: 6.0.14-alpha) (pib:13)
[12 Nov 2009 8:19] Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091110093229-0bh5hix780cyeicl) (version source revid:mikael@mysql.com-20091028172236-0v5j962mh2opxpkj) (merge vers: 5.5.0-beta) (pib:13)
[15 Nov 2009 13:31] Jon Stephens
Bug doesn't appear in a release, no changelog entry needed. Closed.