summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_str.test
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-03-02 12:14:50 +0200
committerunknown <gkodinov/kgeorge@magare.gmz>2007-03-02 12:14:50 +0200
commit399bf23c1d9b5666c29bca6779e4459ed8fdbc4d (patch)
tree5ad96de4d1308f8e66de478889fd2215aa0c3f8b /mysql-test/t/func_str.test
parent3a520a785eeee973e79d1f6e482e270e24a20c56 (diff)
downloadmariadb-git-399bf23c1d9b5666c29bca6779e4459ed8fdbc4d.tar.gz
Bug #26537: item_unhex() was not expected
to return NULL for non-NULL arguments. This is not the case as it can return NULL for invalid hexidecimal strings. Fixed by setting the maybe_null flag. mysql-test/r/func_str.result: Bug #26537: test case mysql-test/t/func_str.test: Bug #26537: test case sql/item_strfunc.h: Bug #26537: item_unhex() can return NULLs even for guaranteed non-null arguments.
Diffstat (limited to 'mysql-test/t/func_str.test')
-rw-r--r--mysql-test/t/func_str.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 64b59025d44..2e76dc2ca31 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -1008,4 +1008,10 @@ select repeat('a', cast(2 as unsigned int));
select rpad('abc', cast(5 as unsigned integer), 'x');
select lpad('abc', cast(5 as unsigned integer), 'x');
+#
+# Bug #26537: UNHEX() IS NULL comparison fails
+#
+SELECT UNHEX('G');
+SELECT UNHEX('G') IS NULL;
+
--echo End of 5.0 tests