summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <ram@gw.mysql.r18.ru>2004-09-13 14:25:43 +0500
committerunknown <ram@gw.mysql.r18.ru>2004-09-13 14:25:43 +0500
commitcc98eea53b3dc9258838bee9528cce9dfc771d72 (patch)
tree9ea0302aae3fbf462478c41e61d9346c0ba5f5eb /mysql-test
parentc1e84276868d04c165bca8b7a5fd36fe7ff4aed5 (diff)
downloadmariadb-git-cc98eea53b3dc9258838bee9528cce9dfc771d72.tar.gz
A fix (bug #5498 TRIM fails with LEADING or TRAILING if remstr = str).
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_str.result6
-rw-r--r--mysql-test/t/func_str.test7
2 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index 12c1cf78f7c..b4d1be5bd54 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -282,3 +282,9 @@ NULL NULL 1 1 n
two 'two' 0 0 'two'
four 'four' 0 0 'four'
drop table t1;
+select trim(trailing 'foo' from 'foo');
+trim(trailing 'foo' from 'foo')
+
+select trim(leading 'foo' from 'foo');
+trim(leading 'foo' from 'foo')
+
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 9b0c076f23e..ba6a8b55236 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -172,3 +172,10 @@ create table t1(a char(4));
insert into t1 values ('one'),(NULL),('two'),('four');
select a, quote(a), isnull(quote(a)), quote(a) is null, ifnull(quote(a), 'n') from t1;
drop table t1;
+
+#
+# Bug #5498: TRIM fails with LEADING or TRAILING if remstr = str
+#
+
+select trim(trailing 'foo' from 'foo');
+select trim(leading 'foo' from 'foo');