1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

func_str.result, func_str.test:

Adding test case.
item_strfunc.cc:
  bug#11728 string function LEFT, strange undocumented behaviour
  Fixing LEFT and RIGHT return NULL if the second
  argument is NULL.
This commit is contained in:
bar@myoffice.izhnet.ru
2006-07-07 17:06:30 +05:00
parent a8844cb22a
commit eec0355de2
3 changed files with 10 additions and 2 deletions

View File

@@ -33,6 +33,9 @@ instr('hello','HE') instr('hello',binary 'HE') instr(binary 'hello','HE')
select position(binary 'll' in 'hello'),position('a' in binary 'hello');
position(binary 'll' in 'hello') position('a' in binary 'hello')
3 0
select left('hello',null), right('hello',null);
left('hello',null) right('hello',null)
NULL NULL
select left('hello',2),right('hello',2),substring('hello',2,2),mid('hello',1,5) ;
left('hello',2) right('hello',2) substring('hello',2,2) mid('hello',1,5)
he lo el hello