summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_str.test
diff options
context:
space:
mode:
authorunknown <bar@myoffice.izhnet.ru>2006-07-07 17:06:30 +0500
committerunknown <bar@myoffice.izhnet.ru>2006-07-07 17:06:30 +0500
commit613cbb621e0e09094b71dafe5ff613dcb1df4bbf (patch)
treee06aaf4879d334f421488c1d815ad9b32b7cbc18 /mysql-test/t/func_str.test
parent0b399f1d3f7b25cf16c868650edb99d9eb0a1ac7 (diff)
downloadmariadb-git-613cbb621e0e09094b71dafe5ff613dcb1df4bbf.tar.gz
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. sql/item_strfunc.cc: bug#11728 string function LEFT, strange undocumented behaviour Fixing LEFT and RIGHT return NULL if the second argument is NULL. mysql-test/t/func_str.test: Adding test case. mysql-test/r/func_str.result: Adding test case.
Diffstat (limited to 'mysql-test/t/func_str.test')
-rw-r--r--mysql-test/t/func_str.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index b13fe039261..56a03283d3a 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -19,6 +19,11 @@ select hex(char(256));
select locate('he','hello'),locate('he','hello',2),locate('lo','hello',2) ;
select instr('hello','HE'), instr('hello',binary 'HE'), instr(binary 'hello','HE');
select position(binary 'll' in 'hello'),position('a' in binary 'hello');
+#
+# Bug#11728 string function LEFT,
+# strange undocumented behaviour, strict mode
+#
+select left('hello',null), right('hello',null);
select left('hello',2),right('hello',2),substring('hello',2,2),mid('hello',1,5) ;
select concat('',left(right(concat('what ',concat('is ','happening')),9),4),'',substring('monty',5,1)) ;
select substring_index('www.tcx.se','.',-2),substring_index('www.tcx.se','.',1);