[MDEV-2380] LP:743017 - Diverging results with TIME(3) and ranges depending on the execution plan in 5.1-micro Created: 2011-03-26 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Using BETWEEN in the WHERE clause returns different results depending on the query plan: --source include/have_innodb.inc SELECT * FROM t1 FORCE KEY ( f1 ) WHERE f2 AND f1 BETWEEN '02:18:49' AND '2006-11-16 09:33:34' ; SELECT * FROM t1 IGNORE KEY ( f1 ) WHERE f2 AND f1 BETWEEN '02:18:49' AND '2006-11-16 09:33:34' ; in either case, no warnings are produced. Not repeatable with TIME(0). Even though the above example with with TIME(3) and a slightly weird BETWEEN, the issue is also repeatable with DATETIME(3) and a range expression that involves only DATETIME values. |
| Comments |
| Comment by Philip Stoev (Inactive) [ 2011-03-26 ] |
|
Diverging results with TIME(3) and BETWEEN depending on the execution plan in 5.1-micro --source include/have_innodb.inc SELECT * FROM t1 FORCE KEY ( f1 ) WHERE f2 AND f1 BETWEEN '02:18:49' AND '2006-11-16 09:33:34' ; SELECT * FROM t1 IGNORE KEY ( f1 ) WHERE f2 AND f1 BETWEEN '02:18:49' AND '2006-11-16 09:33:34' ; in either case, no warnings are produced. Not repeatable with TIME(0). |
| Comment by Philip Stoev (Inactive) [ 2011-03-26 ] |
|
Re: Diverging results with TIME(3) and ranges depending on the execution plan in 5.1-micro --source include/have_innodb.inc CREATE TABLE t1 ( f1 int, f2 datetime(3), KEY (f2), KEY (f1,f2)) ENGINE=InnoDB; SELECT * FROM t1 FORCE KEY ( f2 ) WHERE f2 <= '2004-08-28 23:36:31.000000' ; |
| Comment by Rasmus Johansson (Inactive) [ 2011-10-28 ] |
|
Launchpad bug id: 743017 |