summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authoranozdrin@mysql.com <>2006-01-20 15:59:22 +0300
committeranozdrin@mysql.com <>2006-01-20 15:59:22 +0300
commit145fd62bc12285db199af8b9c49e0428f44ff69c (patch)
tree09e31d76f40a969088fd9d995a57faf7cac86ad6 /mysql-test
parent2c6ea2d2dfa19d2585fd86a58d5ae330e56122e1 (diff)
downloadmariadb-git-145fd62bc12285db199af8b9c49e0428f44ff69c.tar.gz
Fix for BUG#15588: String overrun during sp-vars.test
The bug appears after implementation of WL#2984 (Make stored routine variables work according to the standard).
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/type_varchar.result7
-rw-r--r--mysql-test/t/type_varchar.test16
2 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/r/type_varchar.result b/mysql-test/r/type_varchar.result
index e3b12cc36e3..e74850bba33 100644
--- a/mysql-test/r/type_varchar.result
+++ b/mysql-test/r/type_varchar.result
@@ -415,3 +415,10 @@ t1 CREATE TABLE `t1` (
KEY `index1` (`f1`(10))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(f1 VARCHAR(100) DEFAULT 'test');
+INSERT INTO t1 VALUES(SUBSTR(f1, 1, 3));
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(f1 CHAR(100) DEFAULT 'test');
+INSERT INTO t1 VALUES(SUBSTR(f1, 1, 3));
+DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/t/type_varchar.test b/mysql-test/t/type_varchar.test
index 1a3a93018a4..2d2314f0a29 100644
--- a/mysql-test/t/type_varchar.test
+++ b/mysql-test/t/type_varchar.test
@@ -130,3 +130,19 @@ show create table t1;
alter table t1 modify f1 tinytext;
show create table t1;
drop table t1;
+
+#
+# BUG#15588: String overrun
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1(f1 VARCHAR(100) DEFAULT 'test');
+INSERT INTO t1 VALUES(SUBSTR(f1, 1, 3));
+DROP TABLE IF EXISTS t1;
+
+CREATE TABLE t1(f1 CHAR(100) DEFAULT 'test');
+INSERT INTO t1 VALUES(SUBSTR(f1, 1, 3));
+DROP TABLE IF EXISTS t1;