summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <ibabaev@bk-internal.mysql.com>2007-05-28 00:05:38 +0200
committerunknown <ibabaev@bk-internal.mysql.com>2007-05-28 00:05:38 +0200
commit11dd353e12de970d93a0304ea3e6e43df1126907 (patch)
tree88e9d6e9af319de1b0c833c9bb011ed5025ac543 /mysql-test
parent06297270880ca0f0023c66ca90291665ec3aacc2 (diff)
parent5f99cf963ea4138fd7adb70ec4a9add55388c281 (diff)
downloadmariadb-git-11dd353e12de970d93a0304ea3e6e43df1126907.tar.gz
Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into bk-internal.mysql.com:/data0/bk/mysql-5.0-opt client/mysqldump.c: Auto merged mysql-test/r/mysqldump.result: Auto merged mysql-test/r/ps_2myisam.result: Auto merged mysql-test/r/ps_3innodb.result: Auto merged mysql-test/r/ps_4heap.result: Auto merged mysql-test/r/ps_5merge.result: Auto merged mysql-test/r/ps_6bdb.result: Auto merged mysql-test/r/ps_7ndb.result: Auto merged sql/field.h: Auto merged sql/item_func.cc: Auto merged sql/my_decimal.h: Auto merged sql/sql_base.cc: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/alter_table.result19
-rw-r--r--mysql-test/r/func_gconcat.result47
-rw-r--r--mysql-test/r/join_outer.result15
-rw-r--r--mysql-test/r/key.result8
-rw-r--r--mysql-test/r/kill.result82
-rw-r--r--mysql-test/r/myisam.result26
-rw-r--r--mysql-test/r/mysqldump.result11
-rw-r--r--mysql-test/r/ps_2myisam.result32
-rw-r--r--mysql-test/r/ps_3innodb.result32
-rw-r--r--mysql-test/r/ps_4heap.result32
-rw-r--r--mysql-test/r/ps_5merge.result64
-rw-r--r--mysql-test/r/ps_6bdb.result32
-rw-r--r--mysql-test/r/ps_7ndb.result32
-rw-r--r--mysql-test/r/subselect3.result18
-rw-r--r--mysql-test/r/type_newdecimal.result6
-rw-r--r--mysql-test/r/view.result10
-rw-r--r--mysql-test/t/alter_table.test22
-rw-r--r--mysql-test/t/func_gconcat.test30
-rw-r--r--mysql-test/t/join_outer.test16
-rw-r--r--mysql-test/t/key.test12
-rw-r--r--mysql-test/t/kill.test132
-rw-r--r--mysql-test/t/myisam.test16
-rw-r--r--mysql-test/t/mysqldump.test7
-rw-r--r--mysql-test/t/subselect3.test18
-rw-r--r--mysql-test/t/type_newdecimal.test13
-rw-r--r--mysql-test/t/view.test19
26 files changed, 639 insertions, 112 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index 280cedb8b89..4eace9ac628 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -884,3 +884,22 @@ id
50
51
drop table t1;
+set @orig_sql_mode = @@sql_mode;
+set sql_mode="no_zero_date";
+create table t1(f1 int);
+alter table t1 add column f2 datetime not null, add column f21 date not null;
+insert into t1 values(1,'2000-01-01','2000-01-01');
+alter table t1 add column f3 datetime not null;
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'f3' at row 1
+alter table t1 add column f3 date not null;
+ERROR 22007: Incorrect date value: '0000-00-00' for column 'f3' at row 1
+alter table t1 add column f4 datetime not null default '2002-02-02',
+add column f41 date not null;
+ERROR 22007: Incorrect date value: '0000-00-00' for column 'f41' at row 1
+alter table t1 add column f4 datetime not null default '2002-02-02',
+add column f41 date not null default '2002-02-02';
+select * from t1;
+f1 f2 f21 f4 f41
+1 2000-01-01 00:00:00 2000-01-01 2002-02-02 00:00:00 2002-02-02
+drop table t1;
+set sql_mode= @orig_sql_mode;
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result
index 20df776ec1b..8b71ad1940e 100644
--- a/mysql-test/r/func_gconcat.result
+++ b/mysql-test/r/func_gconcat.result
@@ -763,4 +763,51 @@ Warnings:
Warning 1260 1 line(s) were cut by GROUP_CONCAT()
SET group_concat_max_len = DEFAULT;
DROP TABLE t1;
+SET group_concat_max_len= 65535;
+CREATE TABLE t1( a TEXT, b INTEGER );
+INSERT INTO t1 VALUES ( 'a', 0 ), ( 'b', 1 );
+SELECT GROUP_CONCAT( a ORDER BY b ) FROM t1;
+GROUP_CONCAT( a ORDER BY b )
+a,b
+SELECT GROUP_CONCAT(DISTINCT a ORDER BY b) FROM t1;
+GROUP_CONCAT(DISTINCT a ORDER BY b)
+a,b
+SELECT GROUP_CONCAT(DISTINCT a) FROM t1;
+GROUP_CONCAT(DISTINCT a)
+a,b
+SET group_concat_max_len= 10;
+SELECT GROUP_CONCAT(a ORDER BY b) FROM t1;
+GROUP_CONCAT(a ORDER BY b)
+a,b
+SELECT GROUP_CONCAT(DISTINCT a ORDER BY b) FROM t1;
+GROUP_CONCAT(DISTINCT a ORDER BY b)
+a,b
+SELECT GROUP_CONCAT(DISTINCT a) FROM t1;
+GROUP_CONCAT(DISTINCT a)
+a,b
+SET group_concat_max_len= 65535;
+CREATE TABLE t2( a TEXT );
+INSERT INTO t2 VALUES( REPEAT( 'a', 5000 ) );
+INSERT INTO t2 VALUES( REPEAT( 'b', 5000 ) );
+INSERT INTO t2 VALUES( REPEAT( 'a', 5000 ) );
+SELECT LENGTH( GROUP_CONCAT( DISTINCT a ) ) FROM t2;
+LENGTH( GROUP_CONCAT( DISTINCT a ) )
+10001
+CREATE TABLE t3( a TEXT, b INT );
+INSERT INTO t3 VALUES( REPEAT( 'a', 65534 ), 1 );
+INSERT INTO t3 VALUES( REPEAT( 'a', 65535 ), 2 );
+INSERT INTO t3 VALUES( REPEAT( 'a', 65536 ), 3 );
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
+SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 1;
+LENGTH( GROUP_CONCAT( a ) )
+65534
+SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 2;
+LENGTH( GROUP_CONCAT( a ) )
+65535
+SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 3;
+LENGTH( GROUP_CONCAT( a ) )
+65535
+SET group_concat_max_len= DEFAULT;
+DROP TABLE t1, t2, t3;
End of 5.0 tests
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result
index c62601946c2..1366a8fe97a 100644
--- a/mysql-test/r/join_outer.result
+++ b/mysql-test/r/join_outer.result
@@ -1239,3 +1239,18 @@ Handler_read_prev 0
Handler_read_rnd 0
Handler_read_rnd_next 6
DROP TABLE t1,t2;
+CREATE TABLE t1 (c int PRIMARY KEY, e int NOT NULL);
+INSERT INTO t1 VALUES (1,0), (2,1);
+CREATE TABLE t2 (d int PRIMARY KEY);
+INSERT INTO t2 VALUES (1), (2), (3);
+EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d IS NULL;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
+1 SIMPLE t2 index NULL PRIMARY 4 NULL 3 Using where; Using index; Not exists
+SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d IS NULL;
+c e d
+1 0 NULL
+SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d<=>NULL;
+c e d
+1 0 NULL
+DROP TABLE t1,t2;
diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result
index ec15eaa97f5..3abc95ec3bf 100644
--- a/mysql-test/r/key.result
+++ b/mysql-test/r/key.result
@@ -455,3 +455,11 @@ ORDER BY c.b, c.d
a b c d e f g h i j a b c d
2 2 1 2004-11-30 12:00:00 1 0 0 0 0 0 2 3388000 -553000 NULL
DROP TABLE t1, t2;
+CREATE TABLE t1( a TINYINT, KEY(a) ) ENGINE=MyISAM;
+INSERT INTO t1 VALUES( 1 );
+ALTER TABLE t1 DISABLE KEYS;
+EXPLAIN SELECT MAX(a) FROM t1 FORCE INDEX(a);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 system NULL NULL NULL NULL 1
+DROP TABLE t1;
+End of 5.0 tests.
diff --git a/mysql-test/r/kill.result b/mysql-test/r/kill.result
index cf5486d1091..4bc04c6de3c 100644
--- a/mysql-test/r/kill.result
+++ b/mysql-test/r/kill.result
@@ -41,3 +41,85 @@ select 1;
select RELEASE_LOCK("a");
RELEASE_LOCK("a")
1
+create table t1(f1 int);
+create function bug27563() returns int(11)
+deterministic
+begin
+declare continue handler for sqlstate '70100' set @a:= 'killed';
+declare continue handler for sqlexception set @a:= 'exception';
+set @a= get_lock("lock27563", 10);
+return 1;
+end|
+select get_lock("lock27563",10);
+get_lock("lock27563",10)
+1
+insert into t1 values (bug27563());
+ERROR 70100: Query execution was interrupted
+select @a;
+@a
+NULL
+select * from t1;
+f1
+insert into t1 values(0);
+update t1 set f1= bug27563();
+ERROR 70100: Query execution was interrupted
+select @a;
+@a
+NULL
+select * from t1;
+f1
+0
+insert into t1 values(1);
+delete from t1 where bug27563() is null;
+ERROR 70100: Query execution was interrupted
+select @a;
+@a
+NULL
+select * from t1;
+f1
+0
+1
+select * from t1 where f1= bug27563();
+ERROR 70100: Query execution was interrupted
+select @a;
+@a
+NULL
+create procedure proc27563()
+begin
+declare continue handler for sqlstate '70100' set @a:= 'killed';
+declare continue handler for sqlexception set @a:= 'exception';
+select get_lock("lock27563",10);
+select "shouldn't be selected";
+end|
+call proc27563();
+get_lock("lock27563",10)
+NULL
+ERROR 70100: Query execution was interrupted
+select @a;
+@a
+NULL
+create table t2 (f2 int);
+create trigger trg27563 before insert on t1 for each row
+begin
+declare continue handler for sqlstate '70100' set @a:= 'killed';
+declare continue handler for sqlexception set @a:= 'exception';
+set @a:= get_lock("lock27563",10);
+insert into t2 values(1);
+end|
+insert into t1 values(2),(3);
+ERROR 70100: Query execution was interrupted
+select @a;
+@a
+NULL
+select * from t1;
+f1
+0
+1
+select * from t2;
+f2
+select release_lock("lock27563");
+release_lock("lock27563")
+1
+drop table t1, t2;
+drop function bug27563;
+drop procedure proc27563;
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 94f2f1f72b3..7fc29cd13ca 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -1780,4 +1780,30 @@ create table t3 (c1 int) engine=myisam pack_keys=default;
create table t4 (c1 int) engine=myisam pack_keys=2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' at line 1
drop table t1, t2, t3;
+CREATE TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM;
+INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5);
+SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
+a
+1
+ALTER TABLE t1 DISABLE KEYS;
+SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
+a
+1
+SELECT a FROM t1 USE INDEX (inx) WHERE a=1;
+a
+1
+SELECT b FROM t1 FORCE INDEX (uinx) WHERE b=1;
+b
+1
+SELECT b FROM t1 USE INDEX (uinx) WHERE b=1;
+b
+1
+SELECT a FROM t1 FORCE INDEX (inx,uinx) WHERE a=1;
+a
+1
+ALTER TABLE t1 ENABLE KEYS;
+SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
+a
+1
+DROP TABLE t1;
End of 5.0 tests
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index 6ccca713948..7865148905e 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -3310,5 +3310,16 @@ drop user user1;
drop user user2;
drop database mysqldump_test_db;
#
+# Bug #28522: buffer overrun by '\0' byte using --hex-blob.
+#
+CREATE TABLE t1 (c1 INT, c2 LONGBLOB);
+INSERT INTO t1 SET c1=11, c2=REPEAT('q',509);
+CREATE TABLE `t1` (
+ `c1` int(11) default NULL,
+ `c2` longblob
+);
+INSERT INTO `t1` VALUES (11,0x7171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171);
+DROP TABLE t1;
+#
# End of 5.0 tests
#
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result
index abd98067dae..32ed34e1d52 100644
--- a/mysql-test/r/ps_2myisam.result
+++ b/mysql-test/r/ps_2myisam.result
@@ -1927,8 +1927,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -1974,8 +1974,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2024,8 +2024,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2064,8 +2064,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2112,8 +2112,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2156,8 +2156,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2202,8 +2202,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2240,8 +2240,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result
index b90cf996db4..c53056cfa0e 100644
--- a/mysql-test/r/ps_3innodb.result
+++ b/mysql-test/r/ps_3innodb.result
@@ -1910,8 +1910,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -1957,8 +1957,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2007,8 +2007,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2047,8 +2047,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2095,8 +2095,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2139,8 +2139,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2185,8 +2185,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2223,8 +2223,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result
index aed2fcea1ce..2951ce28fa5 100644
--- a/mysql-test/r/ps_4heap.result
+++ b/mysql-test/r/ps_4heap.result
@@ -1911,8 +1911,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -1958,8 +1958,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2008,8 +2008,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2048,8 +2048,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2096,8 +2096,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2140,8 +2140,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2186,8 +2186,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2224,8 +2224,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result
index ed85e4411aa..56ec1e04901 100644
--- a/mysql-test/r/ps_5merge.result
+++ b/mysql-test/r/ps_5merge.result
@@ -1847,8 +1847,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -1894,8 +1894,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -1944,8 +1944,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -1984,8 +1984,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2032,8 +2032,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2076,8 +2076,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2122,8 +2122,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2160,8 +2160,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -4868,8 +4868,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -4915,8 +4915,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -4965,8 +4965,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -5005,8 +5005,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -5053,8 +5053,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -5097,8 +5097,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -5143,8 +5143,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -5181,8 +5181,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result
index 3dc5859d304..ed774b202b2 100644
--- a/mysql-test/r/ps_6bdb.result
+++ b/mysql-test/r/ps_6bdb.result
@@ -1910,8 +1910,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -1957,8 +1957,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2007,8 +2007,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2047,8 +2047,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2095,8 +2095,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2139,8 +2139,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2185,8 +2185,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2223,8 +2223,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result
index 0df2733aa7a..ff5ecbb2e9b 100644
--- a/mysql-test/r/ps_7ndb.result
+++ b/mysql-test/r/ps_7ndb.result
@@ -1910,8 +1910,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -1957,8 +1957,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2007,8 +2007,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2047,8 +2047,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2095,8 +2095,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2139,8 +2139,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2185,8 +2185,8 @@ def @arg07 253 23 1 Y 128 31 63
def @arg08 253 23 1 Y 128 31 63
def @arg09 253 23 1 Y 128 31 63
def @arg10 253 23 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 30 63
-def @arg12 253 67 6 Y 128 30 63
+def @arg11 253 83 6 Y 128 30 63
+def @arg12 253 83 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2223,8 +2223,8 @@ def @arg07 253 23 0 Y 128 31 63
def @arg08 253 23 0 Y 128 31 63
def @arg09 253 23 0 Y 128 31 63
def @arg10 253 23 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 30 63
-def @arg12 253 67 0 Y 128 30 63
+def @arg11 253 83 0 Y 128 30 63
+def @arg12 253 83 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result
index 9bbfdc6c5f9..098dacc8189 100644
--- a/mysql-test/r/subselect3.result
+++ b/mysql-test/r/subselect3.result
@@ -742,3 +742,21 @@ x
0
0
DROP TABLE t1,t2,t3;
+CREATE TABLE t1 (a INT NOT NULL);
+INSERT INTO t1 VALUES (1),(-1), (65),(66);
+CREATE TABLE t2 (a INT UNSIGNED NOT NULL PRIMARY KEY);
+INSERT INTO t2 VALUES (65),(66);
+SELECT a FROM t1 WHERE a NOT IN (65,66);
+a
+1
+-1
+SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2);
+a
+1
+-1
+EXPLAIN SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where
+2 DEPENDENT SUBQUERY t2 unique_subquery PRIMARY PRIMARY 4 func 1 Using index
+DROP TABLE t1;
+End of 5.0 tests
diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result
index cbcab126439..9e165721033 100644
--- a/mysql-test/r/type_newdecimal.result
+++ b/mysql-test/r/type_newdecimal.result
@@ -1465,4 +1465,10 @@ Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at r
Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1
Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1
Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1
+create table t1 (s varchar(100));
+insert into t1 values (0.00000000010000000000000000364321973154977415791655470655996396089904010295867919921875);
+drop table t1;
+SELECT 1.000000000000 * 99.999999999998 / 100 a,1.000000000000 * (99.999999999998 / 100) b;
+a b
+0.9999999999999800000000000000 0.9999999999999800000000000000
End of 5.0 tests
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 8d9d802949d..13239af41ad 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -3367,4 +3367,14 @@ SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(1.23456789 as decimal(8,0)) AS `col`
DROP VIEW v1;
+CREATE TABLE t1 (id int);
+CREATE TABLE t2 (id int, c int DEFAULT 0);
+INSERT INTO t1 (id) VALUES (1);
+INSERT INTO t2 (id) VALUES (1);
+CREATE VIEW v1 AS
+SELECT t2.c FROM t1, t2
+WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
+UPDATE v1 SET c=1;
+DROP VIEW v1;
+DROP TABLE t1,t2;
End of 5.0 tests.
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index 83686f31e9e..3ced1087757 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -662,3 +662,25 @@ insert into t1 values (null);
select * from t1;
drop table t1;
+
+#
+# Bug#27507: Wrong DATETIME value was allowed by ALTER TABLE in the
+# NO_ZERO_DATE mode.
+#
+set @orig_sql_mode = @@sql_mode;
+set sql_mode="no_zero_date";
+create table t1(f1 int);
+alter table t1 add column f2 datetime not null, add column f21 date not null;
+insert into t1 values(1,'2000-01-01','2000-01-01');
+--error 1292
+alter table t1 add column f3 datetime not null;
+--error 1292
+alter table t1 add column f3 date not null;
+--error 1292
+alter table t1 add column f4 datetime not null default '2002-02-02',
+ add column f41 date not null;
+alter table t1 add column f4 datetime not null default '2002-02-02',
+ add column f41 date not null default '2002-02-02';
+select * from t1;
+drop table t1;
+set sql_mode= @orig_sql_mode;
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test
index 7771f216f69..767df5ae233 100644
--- a/mysql-test/t/func_gconcat.test
+++ b/mysql-test/t/func_gconcat.test
@@ -520,5 +520,35 @@ SELECT GROUP_CONCAT( a ORDER BY b ) FROM t1;
SELECT GROUP_CONCAT( DISTINCT a ORDER BY b ) FROM t1;
SET group_concat_max_len = DEFAULT;
DROP TABLE t1;
+# Bug #23856:GROUP_CONCAT and ORDER BY: junk from previous rows for query on I_S
+#
+SET group_concat_max_len= 65535;
+CREATE TABLE t1( a TEXT, b INTEGER );
+INSERT INTO t1 VALUES ( 'a', 0 ), ( 'b', 1 );
+SELECT GROUP_CONCAT( a ORDER BY b ) FROM t1;
+SELECT GROUP_CONCAT(DISTINCT a ORDER BY b) FROM t1;
+SELECT GROUP_CONCAT(DISTINCT a) FROM t1;
+SET group_concat_max_len= 10;
+SELECT GROUP_CONCAT(a ORDER BY b) FROM t1;
+SELECT GROUP_CONCAT(DISTINCT a ORDER BY b) FROM t1;
+SELECT GROUP_CONCAT(DISTINCT a) FROM t1;
+
+SET group_concat_max_len= 65535;
+CREATE TABLE t2( a TEXT );
+INSERT INTO t2 VALUES( REPEAT( 'a', 5000 ) );
+INSERT INTO t2 VALUES( REPEAT( 'b', 5000 ) );
+INSERT INTO t2 VALUES( REPEAT( 'a', 5000 ) );
+SELECT LENGTH( GROUP_CONCAT( DISTINCT a ) ) FROM t2;
+
+CREATE TABLE t3( a TEXT, b INT );
+INSERT INTO t3 VALUES( REPEAT( 'a', 65534 ), 1 );
+INSERT INTO t3 VALUES( REPEAT( 'a', 65535 ), 2 );
+INSERT INTO t3 VALUES( REPEAT( 'a', 65536 ), 3 );
+SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 1;
+SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 2;
+SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 3;
+
+SET group_concat_max_len= DEFAULT;
+DROP TABLE t1, t2, t3;
--echo End of 5.0 tests
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test
index 51e79a20d65..1a59dbf8fc2 100644
--- a/mysql-test/t/join_outer.test
+++ b/mysql-test/t/join_outer.test
@@ -845,3 +845,19 @@ SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL;
show status like 'Handler_read%';
DROP TABLE t1,t2;
+
+#
+# Bug 28571: outer join with false on condition over constant tables
+#
+
+CREATE TABLE t1 (c int PRIMARY KEY, e int NOT NULL);
+INSERT INTO t1 VALUES (1,0), (2,1);
+CREATE TABLE t2 (d int PRIMARY KEY);
+INSERT INTO t2 VALUES (1), (2), (3);
+
+EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d IS NULL;
+SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d IS NULL;
+SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d<=>NULL;
+
+DROP TABLE t1,t2;
+
diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test
index e84b2071ab1..3d0e68dc0f3 100644
--- a/mysql-test/t/key.test
+++ b/mysql-test/t/key.test
@@ -432,3 +432,15 @@ ORDER BY c.b, c.d
;
DROP TABLE t1, t2;
+
+
+#
+# Bug #20604: Test for disabled keys with aggregate functions and FORCE INDEX.
+#
+CREATE TABLE t1( a TINYINT, KEY(a) ) ENGINE=MyISAM;
+INSERT INTO t1 VALUES( 1 );
+ALTER TABLE t1 DISABLE KEYS;
+EXPLAIN SELECT MAX(a) FROM t1 FORCE INDEX(a);
+DROP TABLE t1;
+
+--echo End of 5.0 tests.
diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test
index 1e99911a7e3..83194e214fb 100644
--- a/mysql-test/t/kill.test
+++ b/mysql-test/t/kill.test
@@ -117,3 +117,135 @@ reap;
select 1;
connection con1;
select RELEASE_LOCK("a");
+
+#
+# Bug#27563: Stored functions and triggers wasn't throwing an error when killed.
+#
+create table t1(f1 int);
+delimiter |;
+create function bug27563() returns int(11)
+deterministic
+begin
+ declare continue handler for sqlstate '70100' set @a:= 'killed';
+ declare continue handler for sqlexception set @a:= 'exception';
+ set @a= get_lock("lock27563", 10);
+ return 1;
+end|
+delimiter ;|
+# Test stored functions
+# Test INSERT
+connection con1;
+select get_lock("lock27563",10);
+connection con2;
+let $ID= `select connection_id()`;
+send insert into t1 values (bug27563());
+real_sleep 2;
+connection con1;
+disable_query_log;
+eval kill query $ID;
+enable_query_log;
+connection con2;
+--error 1317
+reap;
+select @a;
+connection con1;
+select * from t1;
+
+# Test UPDATE
+insert into t1 values(0);
+connection con2;
+send update t1 set f1= bug27563();
+real_sleep 2;
+connection con1;
+disable_query_log;
+eval kill query $ID;
+enable_query_log;
+connection con2;
+--error 1317
+reap;
+select @a;
+connection con1;
+select * from t1;
+
+# Test DELETE
+insert into t1 values(1);
+connection con2;
+send delete from t1 where bug27563() is null;
+real_sleep 2;
+connection con1;
+disable_query_log;
+eval kill query $ID;
+enable_query_log;
+connection con2;
+--error 1317
+reap;
+select @a;
+connection con1;
+select * from t1;
+
+# Test SELECT
+connection con2;
+send select * from t1 where f1= bug27563();
+real_sleep 2;
+connection con1;
+disable_query_log;
+eval kill query $ID;
+enable_query_log;
+connection con2;
+--error 1317
+reap;
+select @a;
+
+# Test PROCEDURE
+connection con2;
+delimiter |;
+create procedure proc27563()
+begin
+ declare continue handler for sqlstate '70100' set @a:= 'killed';
+ declare continue handler for sqlexception set @a:= 'exception';
+ select get_lock("lock27563",10);
+ select "shouldn't be selected";
+end|
+delimiter ;|
+send call proc27563();
+real_sleep 2;
+connection con1;
+disable_query_log;
+eval kill query $ID;
+enable_query_log;
+connection con2;
+--error 1317
+reap;
+select @a;
+
+# Test TRIGGERS
+connection con2;
+create table t2 (f2 int);
+delimiter |;
+create trigger trg27563 before insert on t1 for each row
+begin
+ declare continue handler for sqlstate '70100' set @a:= 'killed';
+ declare continue handler for sqlexception set @a:= 'exception';
+ set @a:= get_lock("lock27563",10);
+ insert into t2 values(1);
+end|
+delimiter ;|
+send insert into t1 values(2),(3);
+real_sleep 2;
+connection con1;
+disable_query_log;
+eval kill query $ID;
+enable_query_log;
+connection con2;
+--error 1317
+reap;
+select @a;
+connection con1;
+select * from t1;
+select * from t2;
+
+# Cleanup
+select release_lock("lock27563");
+drop table t1, t2;
+drop function bug27563;
+drop procedure proc27563;
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 82d10059c65..12b9423be21 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -1145,4 +1145,20 @@ create table t3 (c1 int) engine=myisam pack_keys=default;
create table t4 (c1 int) engine=myisam pack_keys=2;
drop table t1, t2, t3;
+#
+# Bug#28476: force index on a disabled myisam index gives error 124
+#
+CREATE TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM;
+INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5);
+SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
+ALTER TABLE t1 DISABLE KEYS;
+SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
+SELECT a FROM t1 USE INDEX (inx) WHERE a=1;
+SELECT b FROM t1 FORCE INDEX (uinx) WHERE b=1;
+SELECT b FROM t1 USE INDEX (uinx) WHERE b=1;
+SELECT a FROM t1 FORCE INDEX (inx,uinx) WHERE a=1;
+ALTER TABLE t1 ENABLE KEYS;
+SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
+DROP TABLE t1;
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 4c4690520c6..7df65f2b2e1 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -1528,7 +1528,14 @@ drop user user2;
drop database mysqldump_test_db;
+--echo #
+--echo # Bug #28522: buffer overrun by '\0' byte using --hex-blob.
+--echo #
+CREATE TABLE t1 (c1 INT, c2 LONGBLOB);
+INSERT INTO t1 SET c1=11, c2=REPEAT('q',509);
+--exec $MYSQL_DUMP --skip-create --compact --hex-blob test t1
+DROP TABLE t1;
--echo #
--echo # End of 5.0 tests
diff --git a/mysql-test/t/subselect3.test b/mysql-test/t/subselect3.test
index 65556012588..0302e2cede6 100644
--- a/mysql-test/t/subselect3.test
+++ b/mysql-test/t/subselect3.test
@@ -571,3 +571,21 @@ SELECT (t1.id IN (SELECT t2.id FROM t2,t3
FROM t1;
DROP TABLE t1,t2,t3;
+
+#
+# Bug #22855: Optimizer doesn't rewrite NOT IN subselects to a correlated
+# subquery
+#
+CREATE TABLE t1 (a INT NOT NULL);
+INSERT INTO t1 VALUES (1),(-1), (65),(66);
+
+CREATE TABLE t2 (a INT UNSIGNED NOT NULL PRIMARY KEY);
+INSERT INTO t2 VALUES (65),(66);
+
+SELECT a FROM t1 WHERE a NOT IN (65,66);
+SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2);
+EXPLAIN SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2);
+
+DROP TABLE t1;
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test
index a7906be79d4..d2b808bd5e0 100644
--- a/mysql-test/t/type_newdecimal.test
+++ b/mysql-test/t/type_newdecimal.test
@@ -1149,4 +1149,17 @@ select cast(a as DECIMAL(3,2)), count(*)
UNION select 12.1234
) t group by 1;
+#
+# Bug #28361 Buffer overflow in DECIMAL code on Windows
+#
+
+create table t1 (s varchar(100));
+insert into t1 values (0.00000000010000000000000000364321973154977415791655470655996396089904010295867919921875);
+drop table t1;
+
+#
+# Bug #27984 Long Decimal Maths produces truncated results
+#
+
+SELECT 1.000000000000 * 99.999999999998 / 100 a,1.000000000000 * (99.999999999998 / 100) b;
--echo End of 5.0 tests
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 3275ba0a687..1f6bee8b142 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -3233,4 +3233,23 @@ CREATE VIEW v1 AS SELECT CAST(1.23456789 AS DECIMAL(8,0)) AS col;
SHOW CREATE VIEW v1;
DROP VIEW v1;
+#
+# Bug #28561: update on multi-table view with CHECK OPTION and
+# a subquery in WHERE condition
+#
+
+CREATE TABLE t1 (id int);
+CREATE TABLE t2 (id int, c int DEFAULT 0);
+INSERT INTO t1 (id) VALUES (1);
+INSERT INTO t2 (id) VALUES (1);
+
+CREATE VIEW v1 AS
+ SELECT t2.c FROM t1, t2
+ WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
+
+UPDATE v1 SET c=1;
+
+DROP VIEW v1;
+DROP TABLE t1,t2;
+
--echo End of 5.0 tests.