summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_str.result
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2014-04-21 13:19:32 +0400
committerAlexander Barkov <bar@mnogosearch.org>2014-04-21 13:19:32 +0400
commit213f10363e1134fdb39842f55876db1136496ff3 (patch)
treec4e90fef04a14840f730a7e2e42863349b123943 /mysql-test/r/func_str.result
parent5fc5195fc5e5adfcbf63dd1297495e77399e2a32 (diff)
downloadmariadb-git-213f10363e1134fdb39842f55876db1136496ff3.tar.gz
MDEV-6045 MySQL Bug#11829861 - SUBSTRING_INDEX() RESULTS "OMIT" CHARACTER WHEN USED INSIDE LOWER()
Diffstat (limited to 'mysql-test/r/func_str.result')
-rw-r--r--mysql-test/r/func_str.result31
1 files changed, 30 insertions, 1 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index c1df30cc328..26f4ffdad53 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -119,7 +119,7 @@ substring_index('aaaaaaaaa1','aaa',-3)
aaaaaa1
select substring_index('aaaaaaaaa1','aaa',-4);
substring_index('aaaaaaaaa1','aaa',-4)
-
+aaaaaaaaa1
select substring_index('the king of thethe hill','the',-2);
substring_index('the king of thethe hill','the',-2)
the hill
@@ -2657,3 +2657,32 @@ NULL NULL
8
drop table t1;
End of 5.1 tests
+#
+# Start of 5.3 tests
+#
+#
+# Bug#11829861: SUBSTRING_INDEX() RESULTS IN MISSING CHARACTERS WHEN USED
+# INSIDE LOWER()
+#
+SET @user_at_host = 'root@mytinyhost-PC.local';
+SELECT LOWER(SUBSTRING_INDEX(@user_at_host, '@', -1));
+LOWER(SUBSTRING_INDEX(@user_at_host, '@', -1))
+mytinyhost-pc.local
+# End of test BUG#11829861
+#
+# Bug#42404: SUBSTRING_INDEX() RESULTS ARE INCONSISTENT
+#
+CREATE TABLE t (i INT NOT NULL, c CHAR(255) NOT NULL);
+INSERT INTO t VALUES (0,'.www.mysql.com'),(1,'.wwwmysqlcom');
+SELECT i, SUBSTRING_INDEX(c, '.', -2) FROM t WHERE i = 1;
+i SUBSTRING_INDEX(c, '.', -2)
+1 .wwwmysqlcom
+SELECT i, SUBSTRING_INDEX(c, '.', -2) FROM t;
+i SUBSTRING_INDEX(c, '.', -2)
+0 mysql.com
+1 .wwwmysqlcom
+DROP TABLE t;
+# End of test BUG#42404
+#
+# End of 5.3 tests
+#