summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_str.test
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2007-03-11 00:26:45 +0300
committerunknown <evgen@moonbone.local>2007-03-11 00:26:45 +0300
commit8a140cb72eecc8295f847a829ac3c692f0b0ddfd (patch)
tree5688018d1c55ec2c3e437747634fd4fe63bd4f4e /mysql-test/t/func_str.test
parent209802eb79f69afd20b8e21db3b86ff6d9d933ea (diff)
parent2f774b479b91cb279c42ce7f191a2ce4993f1890 (diff)
downloadmariadb-git-8a140cb72eecc8295f847a829ac3c692f0b0ddfd.tar.gz
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.1-opt mysql-test/r/explain.result: Auto merged mysql-test/r/func_default.result: Auto merged mysql-test/r/func_regexp.result: Auto merged mysql-test/r/func_test.result: Auto merged mysql-test/r/having.result: Auto merged mysql-test/r/olap.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/union.result: Auto merged mysql-test/r/varbinary.result: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_strfunc.cc: Auto merged sql/opt_range.cc: Auto merged sql/sql_union.cc: Auto merged mysql-test/r/func_str.result: Manually merged mysql-test/t/func_str.test: Manually merged
Diffstat (limited to 'mysql-test/t/func_str.test')
-rw-r--r--mysql-test/t/func_str.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 97651a42642..849d39cfc32 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -1116,6 +1116,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
#
@@ -1142,4 +1153,12 @@ DROP TABLE t1;
SELECT UNHEX('G');
SELECT UNHEX('G') IS NULL;
+#
+# Bug #26281: INSERT() function mishandles NUL on boundary condition
+#
+SELECT INSERT('abc', 3, 3, '1234');
+SELECT INSERT('abc', 4, 3, '1234');
+SELECT INSERT('abc', 5, 3, '1234');
+SELECT INSERT('abc', 6, 3, '1234');
+
--echo End of 5.0 tests