Bug #20733 Partitions: search fails on zerofill column
Submitted: 27 Jun 2006 21:20 Modified: 26 Jul 2006 0:49
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1.12-beta-debug OS:Linux (SUSE 10.0 / 64-bit)
Assigned to: Mikael Ronström CPU Architecture:Any

[27 Jun 2006 21:20] Peter Gulutzan
Description:
I create a table which is partitioned on an integer zerofill column.
I insert two rows: (1) and (2).
I search for rows where the column value is less than 2.
The search fails.

How to repeat:
mysql> create table tn (s1 int zerofill) partition by list (s1) (partition p1 values in (1), partition p2 values in (2));
Query OK, 0 rows affected (0.01 sec)

mysql> insert into tn values (1),(2);
Query OK, 2 rows affected (0.01 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> select * from tn where s1 < 2;
Empty set (0.00 sec)
[27 Jun 2006 22:55] Miguel Solorzano
Thank you for the bug report. Verified as described;

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 7 to server version: 5.1.12-beta-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create table tn (s1 int zerofill) partition by list (s1) (partition p1
    -> values in (1), partition p2 values in (2));
Query OK, 0 rows affected (0.02 sec)

mysql> insert into tn values (1),(2);
Query OK, 2 rows affected (0.01 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> select * from tn where s1 < 2;
Empty set (0.00 sec)
[22 Jul 2006 21:01] Mikael Ronström
Will appear in 5.1.12
[26 Jul 2006 0:49] Jon Stephens
Documented bugfix in 5.1.12 changelog.