summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2006-02-17 08:32:50 -0800
committerunknown <jimw@mysql.com>2006-02-17 08:32:50 -0800
commitdd6e56b903afc978bb0b3273727cb59c23786b1b (patch)
treedef044bcf2e3d0d4cdceefebaba0b2274b728c65 /mysql-test
parentabe796eb7193e9102d36ea243356a701e7754712 (diff)
parent046f82e3a52e212cb50f3d32497030fe317d9b25 (diff)
downloadmariadb-git-dd6e56b903afc978bb0b3273727cb59c23786b1b.tar.gz
Merge mysql.com:/home/jimw/my/mysql-5.0-14676
into mysql.com:/home/jimw/my/mysql-5.0-clean sql/item_strfunc.cc: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_str.result7
-rw-r--r--mysql-test/t/func_str.test8
2 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index a305bf20bff..911d6eea033 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -1023,3 +1023,10 @@ select format(d, 2) from t1;
format(d, 2)
NULL
drop table t1;
+create table t1 (c varchar(40));
+insert into t1 values ('y,abc'),('y,abc');
+select c, substring_index(lcase(c), @q:=',', -1) as res from t1;
+c res
+y,abc abc
+y,abc abc
+drop table t1;
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index ac2bf820257..ef20d766bce 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -676,4 +676,12 @@ insert into t1 values (null);
select format(d, 2) from t1;
drop table t1;
+#
+# Bug #14676: substring_index() returns incorrect results
+#
+create table t1 (c varchar(40));
+insert into t1 values ('y,abc'),('y,abc');
+select c, substring_index(lcase(c), @q:=',', -1) as res from t1;
+drop table t1;
+
# End of 5.0 tests