diff options
author | Sergey Glukhov <sergey.glukhov@oracle.com> | 2011-04-12 13:51:36 +0400 |
---|---|---|
committer | Sergey Glukhov <sergey.glukhov@oracle.com> | 2011-04-12 13:51:36 +0400 |
commit | 33c2a5e7e3f5ed2dee0f50f6d02052d8bf2234b9 (patch) | |
tree | 9a0f18404dbe2c39819a84202a18486288c99a89 /mysql-test/r/func_in.result | |
parent | e108b3f69eb74490cd1ddf8b53b9b6afd0ad054b (diff) | |
download | mariadb-git-33c2a5e7e3f5ed2dee0f50f6d02052d8bf2234b9.tar.gz |
Bug#11766212 59270: NOT IN (YEAR( ... ), ... ) PRODUCES MANY VALGRIND WARNINGS
Valgrind warning happens due to early null values check
in Item_func_in::fix_length_and_dec(before item evaluation).
As result null value items with uninitialized values are
placed into array and it leads to valgrind warnings during
value array sorting.
The fix is to check null value after item evaluation, item
is evaluated in in_array::set() method.
mysql-test/r/func_in.result:
test case
mysql-test/t/func_in.test:
test case
sql/item_cmpfunc.cc:
The fix is to check null value after item evaluation.
Diffstat (limited to 'mysql-test/r/func_in.result')
-rw-r--r-- | mysql-test/r/func_in.result | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result index fdeec2755ca..0b6117581f3 100644 --- a/mysql-test/r/func_in.result +++ b/mysql-test/r/func_in.result @@ -770,4 +770,10 @@ CASE a WHEN a THEN a END NULL DROP TABLE t1; # +# Bug #11766212 59270: NOT IN (YEAR( ... ), ... ) PRODUCES MANY VALGRIND WARNINGS +# +SELECT 1 IN (YEAR(FROM_UNIXTIME(NULL)) ,1); +1 IN (YEAR(FROM_UNIXTIME(NULL)) ,1) +1 +# End of 5.1 tests |