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

Streamlined code for trim, ltrim and rtrim

Portability fixes
This commit is contained in:
monty@mysql.com
2005-01-02 23:31:37 +02:00
parent 9bb8f6d031
commit 1e88bdbf90
4 changed files with 87 additions and 51 deletions

View File

@ -48,6 +48,9 @@ tcx.se .se
select concat(':',ltrim(' left '),':',rtrim(' right '),':');
concat(':',ltrim(' left '),':',rtrim(' right '),':')
:left : right:
select concat(':',trim(leading from ' left '),':',trim(trailing from ' right '),':');
concat(':',trim(leading from ' left '),':',trim(trailing from ' right '),':')
:left : right:
select concat(':',trim(LEADING FROM ' left'),':',trim(TRAILING FROM ' right '),':');
concat(':',trim(LEADING FROM ' left'),':',trim(TRAILING FROM ' right '),':')
:left: right:
@ -703,3 +706,9 @@ NULL
select trim('xyz' from null) as "must_be_null";
must_be_null
NULL
select trim(leading NULL from 'kate') as "must_be_null";
must_be_null
NULL
select trim(trailing NULL from 'xyz') as "must_be_null";
must_be_null
NULL