[MDEV-3091] LP:736370 - Datetime functions in subquery context cause wrong result and bogus warnings in mysql-5.1-micro Created: 2011-03-16 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 |
|
Not repeatable with mysql-5.1. Using a datetime function in a subquery context causes wrong results to be returned and the following warning to be printed out: Warning 1292 Incorrect datetime value: '72294422400000000' for column '<left expr>' at row 1 test case: CREATE TABLE t1 (f1 INTEGER, f2 DATE); SELECT * FROM t1 WHERE (f1) IN ( SELECT f1 FROM t1); returns correctly 5 rows SELECT * FROM t1 WHERE (f1, f2) IN ( SELECT f1 , MAKEDATE( 2011 , 125 ) FROM t1); returns 1 row and 4 warnings |
| Comments |
| Comment by Philip Stoev (Inactive) [ 2011-03-16 ] |
|
Re: Datetime functions in subquery context cause wrong result and bogus warnings in mysql-5.1-micro CREATE TABLE t1 (f1 DATE); CREATE TABLE t2 (f1 DATE); UPDATE t1 SET f1 = CURDATE() WHERE f1 IN ( SELECT CURDATE() FROM t2 WHERE TRUE ); |
| Comment by Rasmus Johansson (Inactive) [ 2011-10-28 ] |
|
Launchpad bug id: 736370 |