diff options
author | unknown <kroki/tomash@moonlight.intranet> | 2006-11-16 14:06:51 +0300 |
---|---|---|
committer | unknown <kroki/tomash@moonlight.intranet> | 2006-11-16 14:06:51 +0300 |
commit | af22eb35e577ef17226faf662f2cffc4705bde26 (patch) | |
tree | 303e9770338b9265e9dbc2e90e84c5a0e668c15d /mysql-test/r/func_str.result | |
parent | ec845335ac32a81d8d88245a1df4c74965b76f42 (diff) | |
download | mariadb-git-af22eb35e577ef17226faf662f2cffc4705bde26.tar.gz |
Add 5.0 part of fix for bug 17047.
mysql-test/r/func_str.result:
Add result for bug#17047: CHAR() and IN() can return NULL without
signaling NULL result.
mysql-test/t/func_str.test:
Add test case for bug#17047: CHAR() and IN() can return NULL without
signaling NULL result.
sql/item_strfunc.cc:
Add Item_str_func::fix_fields() implementation, and set maybe_null to
TRUE if we are in the SQL mode that requires some functions to return
null even if they normally do not.
sql/item_strfunc.h:
Add declaration of Item_str_func::fix_fields().
Do not reset maybe_null in Item_func_char::fix_length_and_dec().
Diffstat (limited to 'mysql-test/r/func_str.result')
-rw-r--r-- | mysql-test/r/func_str.result | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index c2c12f8d291..9588827d234 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -1148,4 +1148,17 @@ id select_type table type possible_keys key key_len ref rows Extra Warnings: Note 1003 select `test`.`t1`.`code` AS `code`,`test`.`t2`.`id` AS `id` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`code` = _latin1'a12') and (length(`test`.`t1`.`code`) = 5)) DROP TABLE t1,t2; +SET @orig_sql_mode = @@SQL_MODE; +SET SQL_MODE=traditional; +SELECT CHAR(0xff,0x8f USING utf8); +CHAR(0xff,0x8f USING utf8) +NULL +Warnings: +Error 1300 Invalid utf8 character string: 'FF8F' +SELECT CHAR(0xff,0x8f USING utf8) IS NULL; +CHAR(0xff,0x8f USING utf8) IS NULL +1 +Warnings: +Error 1300 Invalid utf8 character string: 'FF8F' +SET SQL_MODE=@orig_sql_mode; End of 5.0 tests |