Bug #53685 | Partition pruning for dates does not work in 5.5.3 and 5.5.4 | ||
---|---|---|---|
Submitted: | 16 May 2010 20:56 | Modified: | 23 Aug 2010 10:03 |
Reporter: | Giuseppe Maxia | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Partitions | Severity: | S1 (Critical) |
Version: | 5.5.3, 5.5.4 | OS: | Linux |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | dates, partitioning, pruning, regression |
[16 May 2010 20:56]
Giuseppe Maxia
[17 May 2010 3:21]
Valeriy Kravchuk
May be related to bug #53432.
[17 May 2010 3:25]
Valeriy Kravchuk
Verified just as described: mysql> SELECT VERSION(); +--------------------+ | VERSION() | +--------------------+ | 5.5.3-m3-community | +--------------------+ 1 row in set (0.00 sec) mysql> EXPLAIN PARTITIONS SELECT * from t1 where d = '2010-02-01'\G *************************** 1. row *************************** id: 1 select_type: SIMPLE table: t1 partitions: p1,p2,p3 type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 4 Extra: Using where 1 row in set (0.08 sec) mysql> EXPLAIN PARTITIONS SELECT * from t2 where d = '2010-02-01'\G *************************** 1. row *************************** id: 1 select_type: SIMPLE table: t2 partitions: p1,p2,p3 type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 4 Extra: Using where 1 row in set (0.00 sec) mysql> EXPLAIN PARTITIONS SELECT * from t3 where i = 50\G *************************** 1. row *************************** id: 1 select_type: SIMPLE table: t3 partitions: p2 type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 3 Extra: Using where 1 row in set (0.00 sec) mysql> EXPLAIN PARTITIONS SELECT * from t4 where i = 50\G *************************** 1. row *************************** id: 1 select_type: SIMPLE table: t4 partitions: p2 type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 3 Extra: Using where 1 row in set (0.00 sec)
[17 May 2010 10:54]
Giuseppe Maxia
The puzzling thing in this issue is that the test suite runs fine, and it does not catch the bug. So I checked the difference between the test suite and my setup. The relevant difference is that the test suite has these lines in the configuration file: [mysqld] character-set-server=latin1 [mysql] default-character-set=latin1 If I add these lines to my configuration file, the bug is not repeatable. Therefore, there is something in the handling of the character set that masks the problem.
[17 May 2010 13:41]
Giuseppe Maxia
Tested against mysql-trunk (rev. 3143), and the bug is not repeatable. So it must have been fixed by some other patch. While this solves the problem for now, it is still necessary to add a stronger test case in the suite, to catch a similar bug in the future. Therefore I am leaving the bug report open.
[19 Aug 2010 9:24]
Mattias Jonsson
Test file with both reject and result files.
Attachment: b53685_2.test.tgz (application/x-gzip, text), 816 bytes.
[19 Aug 2010 9:28]
Mattias Jonsson
When building 5.5.3-m3 out of source in directory b, and then reverting the source to 5.5.2 and running the same test in b/mysql-test with the same 5.5.3 binary it succeeds. When building 5.5.2 (in source) the test passes. It also passes with the same binary but in the 5.5.3 source tree.
[19 Aug 2010 16:11]
Mattias Jonsson
new test files which only looks at the pruning
Attachment: b53685_3.test.tgz (application/x-gzip, text), 822 bytes.
[23 Aug 2010 10:03]
Mattias Jonsson
Closing as duplicate of bug#52849. bug was fixed by the same cset (bar@mysql.com-20100505092837-aezef74dv88bd4li).