mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
MDEV-15570 Assertion `Item_cache_temporal::field_type() != MYSQL_TYPE_TIME' failed in Item_cache_temporal::val_datetime_packed
remove an assert. TIME value can be used (and cached) in a datetime context
This commit is contained in:
parent
e147a4a067
commit
f249d8467a
3 changed files with 14 additions and 1 deletions
|
@ -154,3 +154,9 @@ SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
|
|||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: ''
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (d DATE) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES ('2012-12-21');
|
||||
SELECT * FROM t1 WHERE LEAST( UTC_TIME(), d );
|
||||
d
|
||||
2012-12-21
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -58,3 +58,11 @@ SELECT * FROM t1 IGNORE KEY (b) WHERE b='';
|
|||
SELECT * FROM t1 WHERE a=b;
|
||||
SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# MDEV-15570 Assertion `Item_cache_temporal::field_type() != MYSQL_TYPE_TIME' failed in Item_cache_temporal::val_datetime_packed
|
||||
#
|
||||
CREATE TABLE t1 (d DATE) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES ('2012-12-21');
|
||||
SELECT * FROM t1 WHERE LEAST( UTC_TIME(), d );
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -9707,7 +9707,6 @@ Item_cache_temporal::Item_cache_temporal(THD *thd,
|
|||
longlong Item_cache_temporal::val_datetime_packed()
|
||||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
DBUG_ASSERT(Item_cache_temporal::field_type() != MYSQL_TYPE_TIME);
|
||||
if ((!value_cached && !cache_value()) || null_value)
|
||||
{
|
||||
null_value= TRUE;
|
||||
|
|
Loading…
Reference in a new issue