mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
Revert 59685, as we now cache datetimes correctly.
See also bug 11775312, all queries listed there now have the same results here, as they have in 5.1
This commit is contained in:
parent
19fc30a6d7
commit
8576d2a118
2 changed files with 3 additions and 4 deletions
|
@ -303,10 +303,10 @@ CREATE TABLE t1(a DATE, b YEAR, KEY(a));
|
|||
INSERT INTO t1 VALUES ('2011-01-01',2011);
|
||||
SELECT b = (SELECT CONVERT(a, DATE) FROM t1 GROUP BY a) FROM t1;
|
||||
b = (SELECT CONVERT(a, DATE) FROM t1 GROUP BY a)
|
||||
0
|
||||
1
|
||||
SELECT b = CONVERT((SELECT CONVERT(a, DATE) FROM t1 GROUP BY a), DATE) FROM t1;
|
||||
b = CONVERT((SELECT CONVERT(a, DATE) FROM t1 GROUP BY a), DATE)
|
||||
0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
|
|
|
@ -403,8 +403,7 @@ static bool convert_constant_item(THD *thd, Item_field *field_item,
|
|||
Field *field= field_item->field;
|
||||
int result= 0;
|
||||
|
||||
// TODO: revert Bug#59685 here, as we now cache datetimes correctly.
|
||||
if (!(*item)->with_subselect && (*item)->const_item())
|
||||
if ((*item)->const_item())
|
||||
{
|
||||
TABLE *table= field->table;
|
||||
ulonglong orig_sql_mode= thd->variables.sql_mode;
|
||||
|
|
Loading…
Reference in a new issue