1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
timour@mysql.com
2004-12-28 11:57:56 +02:00
parent fbc96c79a1
commit 064c73490b
3 changed files with 24 additions and 1 deletions

View File

@ -435,3 +435,11 @@ drop table t1;
select quote(ltrim(concat(' ', 'a')));
select quote(trim(concat(' ', 'a')));
#
# Bug#7455 unexpected result: TRIM(<NULL> FROM <whatever>) gives NOT NULL
# According to ANSI if one of the TRIM arguments is NULL, then the result
# must be NULL too.
#
select trim(null from 'kate') as "must_be_null";
select trim('xyz' from null) as "must_be_null";