1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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.
This commit is contained in:
unknown
2007-03-02 12:14:50 +02:00
parent 3a520a785e
commit 399bf23c1d
3 changed files with 17 additions and 1 deletions

View File

@@ -1940,4 +1940,10 @@ abcxx
select lpad('abc', cast(5 as unsigned integer), 'x');
lpad('abc', cast(5 as unsigned integer), 'x')
xxabc
SELECT UNHEX('G');
UNHEX('G')
NULL
SELECT UNHEX('G') IS NULL;
UNHEX('G') IS NULL
1
End of 5.0 tests