Bug #48737 Partitions: search fails with ucs2
Submitted: 12 Nov 2009 16:48 Modified: 15 Mar 2010 5:23
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.5.0-beta OS:Linux (SUSE 11.1 64-bit)
Assigned to: Mattias Jonsson CPU Architecture:Any

[12 Nov 2009 16:48] Peter Gulutzan
Description:
I'm using mysql-next-mr.
I create a partitioned table with a ucs2 char column.
I insert a value which ends with 0x0000.
I search for the value with LIKE; I fail.
I remove the partitioning.
I search for the value with LIKE; I succeed.

How to repeat:
drop table if exists t;
create table t (s1 varchar(5) character set ucs2 collate ucs2_bin)
  partition by range columns (s1)
  (partition qd values less than (0x0041));
insert into t values (0x00410000);
select s1,hex(s1) from t where s1 like 'A_';
alter table t remove partitioning;
select s1,hex(s1) from t where s1 like 'A_';
[12 Nov 2009 17:08] MySQL Verification Team
Thank you for the bug report. Verified as described.
[24 Nov 2009 11:27] 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/91400

2922 Mikael Ronstrom	2009-11-24
      BUG#48737, Wrong LIKE range for ucs2 with partitions
[24 Nov 2009 11:37] 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/91405
[26 Nov 2009 9:21] Alexander Barkov
The joint patches for Bug#48737 and Bug#49028 looks Ok to push:

http://lists.mysql.com/commits/91400
http://lists.mysql.com/commits/91405
[8 Dec 2009 8:54] Mattias Jonsson
Patches approved, OK to push
[15 Dec 2009 13:22] Mattias Jonsson
Awaiting merge from mysql-5.1-bugteam to appropriate mysql-next* tree before pushing the testcase. Actual code patch was pushed as a fix for bug#49028.
[19 Dec 2009 8:27] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091219082307-f3i4fn0tm8trb3c0) (version source revid:alik@sun.com-20091216180721-eoa754i79j4ssd3m) (merge vers: 6.0.14-alpha) (pib:15)
[19 Dec 2009 8:31] Bugs System
Pushed into 5.5.1-m2 (revid:alik@sun.com-20091219082021-f34nq4jytwamozz0) (version source revid:alexey.kopytov@sun.com-20091216134707-o96eqw0u2ynvo9gm) (merge vers: 5.5.0-beta) (pib:15)
[19 Dec 2009 8:34] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20091219082213-nhjjgmphote4ntxj) (version source revid:alik@sun.com-20091216180221-a5ps59gajad3pip9) (pib:15)
[21 Dec 2009 10:31] 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/95195

2926 Mattias Jonsson	2009-12-21
      Bug#48737: Partitions: search fails with ucs2
      
      Recommit of patch:
      http://lists.mysql.com/commits/91400
      
      Test case only (code part was pushes as bug-49028)
     @ mysql-test/r/partition_column.result
        Bug#48737: Partitions: search fails with ucs2
        
        added test case
     @ mysql-test/t/partition_column.test
        Bug#48737: Partitions: search fails with ucs2
        
        Added result
[21 Dec 2009 10:39] 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/95197

2928 Mattias Jonsson	2009-12-21
      Bug#48737: Partitions: search fails with ucs2
      
      Recommit of patch:
      http://lists.mysql.com/commits/91400
      
      Test case only (code part was pushes as bug-49028)
     @ mysql-test/r/partition_column.result
        Bug#48737: Partitions: search fails with ucs2
        
        added test case
     @ mysql-test/t/partition_column.test
        Bug#48737: Partitions: search fails with ucs2
        
        Added result
[21 Dec 2009 15:39] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091221153807-80nxoli1tw1z9bxn) (version source revid:mattias.jonsson@sun.com-20091221104707-4p1pn9ggt0osus2o) (merge vers: 6.0.14-alpha) (pib:15)
[21 Dec 2009 15:40] Bugs System
Pushed into 5.5.1-m2 (revid:alik@sun.com-20091221153538-ifi3mxf3y10ozxin) (version source revid:mattias.jonsson@sun.com-20091221103831-lu7nvtnrccgyg8w0) (merge vers: 5.5.1-m2) (pib:15)
[21 Dec 2009 15:41] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20091221153659-d7bt0fh6mhhclxuf) (version source revid:mattias.jonsson@sun.com-20091221104426-x2e6c93x8iik4fo0) (pib:15)
[3 Jan 2010 17:22] Jon Stephens
Documented in the 5.5.1 and 6.0.14 changelogs as follows:

        A query that searched on a ucs2 column failed if the table was
        partitioned.

Closed.
[15 Jan 2010 9:02] Bugs System
Pushed into 5.1.43 (revid:joro@sun.com-20100115085139-qkh0i0fpohd9u9p5) (version source revid:mattias.jonsson@sun.com-20091215124801-pae3fhznhzrnvqoj) (merge vers: 5.1.42) (pib:16)
[18 Jan 2010 11:22] Jon Stephens
Fix also documented in the 5.1.43 changelog. Closed.
[12 Mar 2010 14:17] Bugs System
Pushed into 5.1.44-ndb-7.0.14 (revid:jonas@mysql.com-20100312135944-t0z8s1da2orvl66x) (version source revid:jonas@mysql.com-20100312115609-woou0te4a6s4ae9y) (merge vers: 5.1.44-ndb-7.0.14) (pib:16)
[12 Mar 2010 14:33] Bugs System
Pushed into 5.1.44-ndb-6.2.19 (revid:jonas@mysql.com-20100312134846-tuqhd9w3tv4xgl3d) (version source revid:jonas@mysql.com-20100312060623-mx6407w2vx76h3by) (merge vers: 5.1.44-ndb-6.2.19) (pib:16)
[12 Mar 2010 14:49] Bugs System
Pushed into 5.1.44-ndb-6.3.33 (revid:jonas@mysql.com-20100312135724-xcw8vw2lu3mijrhn) (version source revid:jonas@mysql.com-20100312103652-snkltsd197l7q2yg) (merge vers: 5.1.44-ndb-6.3.33) (pib:16)
[15 Mar 2010 5:23] Jon Stephens
No additional changelog entries required. Returning to Closed state.