summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSinisa@sinisa.nasamreza.org <>2004-12-22 21:31:17 +0200
committerSinisa@sinisa.nasamreza.org <>2004-12-22 21:31:17 +0200
commite409ebf143c754b0a846e776854def244186943c (patch)
treeed4f1714352b1cd8e7e369c85f7175a6b2cf52e8 /mysql-test
parent917e8b4da32b612b29e76938362eef70b6420cd0 (diff)
downloadmariadb-git-e409ebf143c754b0a846e776854def244186943c.tar.gz
A fix for the bug #7495
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_str.result12
-rw-r--r--mysql-test/t/func_str.test12
2 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index d38a2edfa1a..2ca90653fec 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -291,3 +291,15 @@ trim(trailing 'foo' from 'foo')
select trim(leading 'foo' from 'foo');
trim(leading 'foo' from 'foo')
+create table t1 (a varchar(80), b varchar(80));
+insert into t1 values(NULL,"12345");
+insert into t1 values(NULL,"chm");
+select quote(ltrim(concat(' ',t1.b))) from t1;
+quote(ltrim(concat(' ',t1.b)))
+'12345'
+'chm'
+select quote(trim(concat(' ',t1.b))) from t1;
+quote(trim(concat(' ',t1.b)))
+'12345'
+'chm'
+drop table t1;
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 1ae4db3a42a..421512c4dc4 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -185,3 +185,15 @@ drop table t1;
select trim(trailing 'foo' from 'foo');
select trim(leading 'foo' from 'foo');
+
+#
+# crashing bug with QUOTE() and LTRIM() or TRIM() fixed
+# Bug #7495
+#
+
+create table t1 (a varchar(80), b varchar(80));
+insert into t1 values(NULL,"12345");
+insert into t1 values(NULL,"chm");
+select quote(ltrim(concat(' ',t1.b))) from t1;
+select quote(trim(concat(' ',t1.b))) from t1;
+drop table t1;