summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_str.result7
-rw-r--r--mysql-test/r/subselect.result6
-rw-r--r--mysql-test/t/disabled.def1
-rw-r--r--mysql-test/t/func_str.test8
4 files changed, 18 insertions, 4 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index 806ccf96537..f862ee29986 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/r/subselect.result b/mysql-test/r/subselect.result
index 85976c211c5..6094d23b0d0 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -215,9 +215,9 @@ select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from
a
select b,(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) from t4;
b (select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2)
-8 7.5
-8 4.5
-9 7.5
+8 7.5000
+8 4.5000
+9 7.5000
explain extended select b,(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) from t4;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t4 ALL NULL NULL NULL NULL 3
diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
index b9f1e36349c..0d4a0737bb9 100644
--- a/mysql-test/t/disabled.def
+++ b/mysql-test/t/disabled.def
@@ -42,7 +42,6 @@ rpl_row_basic_3innodb : Bug #17385
rpl_sp : Bug#16456
rpl_until : Unstable test case, bug#15886
sp-goto : GOTO is currently is disabled - will be fixed in the future
-subselect : Bug#15706 (ps mode) [PATCH PENDING]
rpl_ndb_blob : Bug #17505
rpl_ndb_blob2 : Bug #17505
rpl_ndb_log : results are not deterministic
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