From 8487aa5abc384de074681f71e67a8b7b0570baf2 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 28 Dec 2004 11:57:56 +0200 Subject: Fix for BUG#7455. The fix checks if the trim string argument is NULL. If so, the standard mandates that the function result must be also NULL. mysql-test/r/func_str.result: added test result mysql-test/t/func_str.test: Added test for NULL arguments. sql/item_strfunc.cc: Test if the trim argument is NULL. --- mysql-test/r/func_str.result | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 1c560dfa8b4..8348ef12b0d 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -697,3 +697,9 @@ quote(ltrim(concat(' ', 'a'))) select quote(trim(concat(' ', 'a'))); quote(trim(concat(' ', 'a'))) 'a' +select trim(null from 'kate') as "must_be_null"; +must_be_null +NULL +select trim('xyz' from null) as "must_be_null"; +must_be_null +NULL -- cgit v1.2.1