diff options
author | unknown <evgen@moonbone.local> | 2007-03-10 19:57:18 +0300 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2007-03-10 19:57:18 +0300 |
commit | 2f774b479b91cb279c42ce7f191a2ce4993f1890 (patch) | |
tree | 10e0a9ef8e36b12a21525b8325f4348ef89c153d /mysql-test | |
parent | c0a0543545bc7b3e2ce9aec787452e7bd619f3d3 (diff) | |
parent | 816ea8a379f38d4b38e46d61d23577733a222850 (diff) | |
download | mariadb-git-2f774b479b91cb279c42ce7f191a2ce4993f1890.tar.gz |
Merge moonbone.local:/mnt/gentoo64/work/15757-bug-5.0-opt-mysql
into moonbone.local:/mnt/gentoo64/work/25373-bug-5.0-opt-mysql
sql/item_strfunc.cc:
Auto merged
mysql-test/r/func_str.result:
SCCS merged
mysql-test/t/func_str.test:
SCCS merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_str.result | 11 | ||||
-rw-r--r-- | mysql-test/t/func_str.test | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 3a629f2f685..e06e7ffe00c 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -1940,6 +1940,17 @@ abcxx select lpad('abc', cast(5 as unsigned integer), 'x'); lpad('abc', cast(5 as unsigned integer), 'x') xxabc +create table t1(f1 longtext); +insert into t1 values ("123"),("456"); +select substring(f1,1,1) from t1 group by 1; +substring(f1,1,1) +1 +4 +create table t2(f1 varchar(3)); +insert into t1 values ("123"),("456"); +select substring(f1,4,1), substring(f1,-4,1) from t2; +substring(f1,4,1) substring(f1,-4,1) +drop table t1,t2; DROP TABLE IF EXISTS t1; CREATE TABLE `t1` ( `id` varchar(20) NOT NULL, diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 56098ad345e..d42be70c057 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -1009,6 +1009,17 @@ select rpad('abc', cast(5 as unsigned integer), 'x'); select lpad('abc', cast(5 as unsigned integer), 'x'); # +# Bug#15757: Wrong SUBSTRING() result when a tmp table was employed. +# +create table t1(f1 longtext); +insert into t1 values ("123"),("456"); +select substring(f1,1,1) from t1 group by 1; +create table t2(f1 varchar(3)); +insert into t1 values ("123"),("456"); +select substring(f1,4,1), substring(f1,-4,1) from t2; +drop table t1,t2; + +# # Bug #25197 :repeat function returns null when using table field directly as count # |