diff options
author | Tor Didriksen <tor.didriksen@oracle.com> | 2011-02-11 16:20:27 +0100 |
---|---|---|
committer | Tor Didriksen <tor.didriksen@oracle.com> | 2011-02-11 16:20:27 +0100 |
commit | 768c56e4d86ee31ee433a170ca4d1a7043b89a93 (patch) | |
tree | 2fd0684e2322a5763aba6c0433c724d7c93d7c28 /mysql-test/r/func_time.result | |
parent | 1756d087cd93dd7e4b4963b9b235daaf5279c8dc (diff) | |
download | mariadb-git-768c56e4d86ee31ee433a170ca4d1a7043b89a93.tar.gz |
Bug #59686 crash in String::copy() with time data type
The problem was that Item_sum_hybrid::val_xxx() did not propagate null values
up the expression tree.
mysql-test/r/func_time.result:
New test case.
mysql-test/t/func_time.test:
New test case.
sql/item_sum.cc:
Check for null_value when evaluating sub-items in sub-trees in Item_sum_hybrid::val_xxx()
Diffstat (limited to 'mysql-test/r/func_time.result')
-rw-r--r-- | mysql-test/r/func_time.result | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 2a95b234548..0ffc988519c 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -1368,3 +1368,15 @@ SELECT SUBDATE(STR_TO_DATE(NULL,0), INTERVAL 1 HOUR); SUBDATE(STR_TO_DATE(NULL,0), INTERVAL 1 HOUR) NULL # +# Bug #59686 crash in String::copy() with time data type +# +SELECT min(timestampadd(month, 1>'', from_days('%Z'))); +min(timestampadd(month, 1>'', from_days('%Z'))) +NULL +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '%Z' +create table t1(a time); +insert into t1 values ('00:00:00'),('00:01:00'); +select 1 from t1 where 1 < some (select cast(a as datetime) from t1); +1 +drop table t1; |