[Commits] Rev 4019: MDEV-4784 - merge test cases from 5.6 in lp:maria/10.0

Sergey Vojtovich svoj at mariadb.org
Mon Mar 24 13:45:31 EET 2014


At lp:maria/10.0

------------------------------------------------------------
revno: 4019
revision-id: svoj at mariadb.org-20140324114519-6ofp2ou205pfybjz
parent: svoj at mariadb.org-20140311092816-qwkldg726yvqobip
committer: Sergey Vojtovich <svoj at mariadb.org>
branch nick: 10.0-mdev5242
timestamp: Mon 2014-03-24 15:45:19 +0400
message:
  MDEV-4784 - merge test cases from 5.6
=== modified file 'mysql-test/include/ctype_filesort2.inc'
--- a/mysql-test/include/ctype_filesort2.inc	2013-11-07 11:16:24 +0000
+++ b/mysql-test/include/ctype_filesort2.inc	2014-03-24 11:45:19 +0000
@@ -13,6 +13,8 @@ INSERT INTO t1 VALUES (_utf8mb4 0xCE85),
 SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a;
 ALTER TABLE t1 ADD KEY(a);
 SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a;
+--echo # Additional test for bug#37244 Character sets: short utf8_bin weight_string value
+SELECT HEX(a), HEX(WEIGHT_STRING(a)) FROM t1 ORDER BY a;
 DROP TABLE IF EXISTS t1;
 --echo #
 --echo # BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES

=== added file 'mysql-test/include/partition_default_functions.inc'
--- a/mysql-test/include/partition_default_functions.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/partition_default_functions.inc	2014-03-24 11:45:19 +0000
@@ -0,0 +1,109 @@
+# Help file for avoid duplicated tests of different DEFAULT functions
+#
+# Needs $get_handler_status_counts defined
+# normally as:
+# let $get_handler_status_counts=
+# SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
+# WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
+#
+# And a table t3 where a is a DATETIME/DATE/TIME/TIMESTAMP column
+# and b is a char/varchar() column.
+
+if ($null_as_now)
+{
+FLUSH STATUS;
+SET TIMESTAMP = 1234567890;
+INSERT INTO t3 (a) VALUES (NULL);
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+}
+FLUSH STATUS;
+SET TIMESTAMP = 1234567891;
+INSERT INTO t3 VALUES ();
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+INSERT INTO t3 (a) VALUES ('2011-01-01 00:00:00');
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+INSERT INTO t3 (a) VALUES ('2011-01-01 00:00:01');
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+INSERT INTO t3 (a) VALUES ('2011-01-01 00:00:02'), ('2011-01-01 00:00:03');
+eval $get_handler_status_counts;
+--echo # 6 locks (1 table, 2 partition lock/unlock)
+--echo # 2 writes
+FLUSH STATUS;
+SET TIMESTAMP = 1234567892;
+INSERT INTO t3 (a) VALUES ('2011-01-01 00:00:00')
+ON DUPLICATE KEY UPDATE b = "DUP_KEY";
+eval $get_handler_status_counts;
+if ($default_update)
+{
+--echo # 8 locks (1 table, 3 partition lock/unlock) 
+--echo # No pruning due to DEFAULT function on partitioning column
+--echo # 1 read_key + 1 delete + 2 write (1 failed + 1 ok)
+--echo # 1 delete + 1 write due to moved to different partition
+}
+if (!$default_update)
+{
+--echo # 4 locks (1 table, 1 partition lock/unlock) 
+--echo # 1 read_key + 1 update (same partition)
+--echo # 1 (failed) write
+}
+FLUSH STATUS;
+INSERT INTO t3 (a) VALUES ('2011-01-01 00:00:01')
+ON DUPLICATE KEY UPDATE a = '2011-01-01 00:00:05', b = "DUP_KEY2";
+eval $get_handler_status_counts;
+--echo # 8 locks (1 table, 3 partition lock/unlock)
+--echo # No pruning due to updating partitioning field.
+--echo # 1 read_key + 1 delete + 2 write (1 failed + 1 ok)
+--echo # 1 delete + 1 write due to moved to different partition
+FLUSH STATUS;
+SET TIMESTAMP = 1234567893;
+UPDATE t3 SET b = 'Updated' WHERE a = '2011-01-01 00:00:02';
+eval $get_handler_status_counts;
+if ($default_update)
+{
+--echo # 8 locks (1 table, 3 partition lock/unlock) 
+--echo # No pruning due to DEFAULT function on partitioning column
+--echo # 2 read_key + 1 read_rnd (1 read_key due to index lookup,
+--echo # 1 read_rnd + 1 read_key due to positioning before update)
+--echo # 1 delete + 1 write due to moved to different partition
+--echo # + 1 (failed) write
+}
+if (!$default_update)
+{
+--echo # 4 locks (1 table, 1 partition lock/unlock) 
+--echo # 1 read_key + 1 update (same partition)
+--echo # 1 (failed) write
+}
+FLUSH STATUS;
+REPLACE INTO t3 VALUES ('2011-01-01 00:00:04', 'Replace1');
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+REPLACE INTO t3 VALUES ('2011-01-01 00:00:04', 'Replace2');
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+--echo # 1 read_key + 1 update + 1 failed write
+
+--echo #
+--echo # Test of replace of default PK (delete might be needed first)
+--echo #
+DELETE FROM t3 WHERE a = 0;
+FLUSH STATUS;
+SET TIMESTAMP = 1234567894;
+REPLACE INTO t3 (b) VALUES ('Replace3');
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+SET TIMESTAMP = 1234567894;
+REPLACE INTO t3 (b) VALUES ('Replace4');
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+--echo # 1 read_key + 1 update + 1 failed write
+--sorted_result
+SELECT * FROM t3;

=== modified file 'mysql-test/r/ctype_utf16.result'
--- a/mysql-test/r/ctype_utf16.result	2014-02-26 14:28:07 +0000
+++ b/mysql-test/r/ctype_utf16.result	2014-03-24 11:45:19 +0000
@@ -670,6 +670,13 @@ HEX(a)	HEX(CONVERT(a USING utf8mb4))
 FF9D	EFBE9D
 D800DF84	F0908E84
 DBC0DC00	F4808080
+# Additional test for bug#37244 Character sets: short utf8_bin weight_string value
+SELECT HEX(a), HEX(WEIGHT_STRING(a)) FROM t1 ORDER BY a;
+HEX(a)	HEX(WEIGHT_STRING(a))
+0385	000385
+FF9D	00FF9D
+D800DF84	010384
+DBC0DC00	100000
 DROP TABLE IF EXISTS t1;
 #
 # BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES

=== modified file 'mysql-test/r/ctype_utf16le.result'
--- a/mysql-test/r/ctype_utf16le.result	2014-02-26 14:28:07 +0000
+++ b/mysql-test/r/ctype_utf16le.result	2014-03-24 11:45:19 +0000
@@ -713,6 +713,13 @@ HEX(a)	HEX(CONVERT(a USING utf8mb4))
 9DFF	EFBE9D
 00D884DF	F0908E84
 C0DB00DC	F4808080
+# Additional test for bug#37244 Character sets: short utf8_bin weight_string value
+SELECT HEX(a), HEX(WEIGHT_STRING(a)) FROM t1 ORDER BY a;
+HEX(a)	HEX(WEIGHT_STRING(a))
+8503	000385
+9DFF	00FF9D
+00D884DF	010384
+C0DB00DC	100000
 DROP TABLE IF EXISTS t1;
 #
 # BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES

=== modified file 'mysql-test/r/ctype_utf32.result'
--- a/mysql-test/r/ctype_utf32.result	2014-02-26 14:28:07 +0000
+++ b/mysql-test/r/ctype_utf32.result	2014-03-24 11:45:19 +0000
@@ -669,6 +669,13 @@ HEX(a)	HEX(CONVERT(a USING utf8mb4))
 0000FF9D	EFBE9D
 00010384	F0908E84
 00100000	F4808080
+# Additional test for bug#37244 Character sets: short utf8_bin weight_string value
+SELECT HEX(a), HEX(WEIGHT_STRING(a)) FROM t1 ORDER BY a;
+HEX(a)	HEX(WEIGHT_STRING(a))
+00000385	000385
+0000FF9D	00FF9D
+00010384	010384
+00100000	100000
 DROP TABLE IF EXISTS t1;
 #
 # BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES

=== modified file 'mysql-test/r/ctype_utf8mb4.result'
--- a/mysql-test/r/ctype_utf8mb4.result	2014-02-26 14:28:07 +0000
+++ b/mysql-test/r/ctype_utf8mb4.result	2014-03-24 11:45:19 +0000
@@ -1148,6 +1148,13 @@ CE85	CE85
 EFBE9D	EFBE9D
 F0908E84	F0908E84
 F4808080	F4808080
+# Additional test for bug#37244 Character sets: short utf8_bin weight_string value
+SELECT HEX(a), HEX(WEIGHT_STRING(a)) FROM t1 ORDER BY a;
+HEX(a)	HEX(WEIGHT_STRING(a))
+CE85	000385
+EFBE9D	00FF9D
+F0908E84	010384
+F4808080	100000
 DROP TABLE IF EXISTS t1;
 #
 # BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES

=== added file 'mysql-test/r/delete_innodb.result'
--- a/mysql-test/r/delete_innodb.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/delete_innodb.result	2014-03-24 11:45:19 +0000
@@ -0,0 +1,23 @@
+#
+# Bug#58709 assert in mysql_execute_command
+#
+DROP TABLE IF EXISTS t2, t1;
+DROP PROCEDURE IF EXISTS p1;
+CREATE TABLE t1 (i INT PRIMARY KEY) engine=InnoDB;
+CREATE TABLE t2 (i INT, FOREIGN KEY (i) REFERENCES t1 (i) ON DELETE NO ACTION) engine=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+DELETE IGNORE FROM t1 WHERE i = 1;
+Warnings:
+Warning	1451	Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`i`) REFERENCES `t1` (`i`) ON DELETE NO ACTION)
+CREATE PROCEDURE p1() DELETE IGNORE FROM t1 WHERE i = 1;
+CALL p1();
+Warnings:
+Warning	1451	Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`i`) REFERENCES `t1` (`i`) ON DELETE NO ACTION)
+PREPARE stm FROM 'CALL p1()';
+EXECUTE stm;
+Warnings:
+Warning	1451	Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`i`) REFERENCES `t1` (`i`) ON DELETE NO ACTION)
+DEALLOCATE PREPARE stm;
+DROP TABLE t2, t1;
+DROP PROCEDURE p1;

=== modified file 'mysql-test/r/func_group.result'
--- a/mysql-test/r/func_group.result	2014-02-26 14:28:07 +0000
+++ b/mysql-test/r/func_group.result	2014-03-24 11:45:19 +0000
@@ -2196,6 +2196,15 @@ AVG(DISTINCT outr.col_int_nokey)
 DROP TABLE t1;
 # End of the bug#57932
 #
+# BUG#12773464 - 61925: WRONG RESULT WITH AGGREGATE + NOT BETWEEN + KEY
+#
+CREATE TABLE t1 (a int, KEY (a));
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+SELECT MAX(a) FROM t1 WHERE a NOT BETWEEN 3 AND 9;
+MAX(a)
+10
+DROP TABLE t1;
+#
 # MDEV-5257: MIN/MAX Optimization (Select tables optimized away) does not work for DateTime
 # MDEV-3855: MIN/MAX optimization doesnt work for int_col > INET_ATON
 #  (correct the fix for Bug #884175)

=== modified file 'mysql-test/r/func_group_innodb.result'
--- a/mysql-test/r/func_group_innodb.result	2013-09-14 01:09:36 +0000
+++ b/mysql-test/r/func_group_innodb.result	2014-03-24 11:45:19 +0000
@@ -245,3 +245,19 @@ id	select_type	table	type	possible_keys
 1	SIMPLE	t1	range	NULL	b	263	NULL	4	Using index for group-by
 DROP TABLE t1;
 End of 5.5 tests
+#
+# Bug#13724099 1032 BYTE MEMORY LEAK NEW_CACHED_ITEM IN
+#              SUBQUERY WITH GROUPING OF OUTER COLUMN
+#
+CREATE TABLE t1 (
+a BLOB,
+b INT)
+engine=innodb;
+INSERT INTO t1 VALUES ('a', 0);
+SELECT 0 FROM t1
+WHERE 0 = (SELECT group_concat(b)
+FROM t1 t GROUP BY t1.a)
+;
+0
+0
+DROP TABLE t1;

=== modified file 'mysql-test/r/func_if.result'
--- a/mysql-test/r/func_if.result	2012-05-21 18:54:41 +0000
+++ b/mysql-test/r/func_if.result	2014-03-24 11:45:19 +0000
@@ -204,6 +204,22 @@ NULL
 0
 DROP TABLE t1;
 #
+# Bug#12620084
+# ASSERTION WHEN CHECKING FIELD_TYPES[FIELD_POS] AND IT'S MYSQL_TYPE_NULL
+#
+SELECT if(0, (SELECT min('hello')), NULL);
+if(0, (SELECT min('hello')), NULL)
+NULL
+SELECT if(1, (SELECT min('hello')), NULL);
+if(1, (SELECT min('hello')), NULL)
+hello
+SELECT if(0, NULL, (SELECT min('hello')));
+if(0, NULL, (SELECT min('hello')))
+hello
+SELECT if(1, NULL, (SELECT min('hello')));
+if(1, NULL, (SELECT min('hello')))
+NULL
+#
 # Bug#12532830 
 # SIGFPE OR ASSERTION (PRECISION <= ((9 * 9) - 8*2)) && (DEC <= 30)
 #

=== modified file 'mysql-test/r/innodb_mysql_lock.result'
--- a/mysql-test/r/innodb_mysql_lock.result	2012-10-30 10:41:41 +0000
+++ b/mysql-test/r/innodb_mysql_lock.result	2014-03-24 11:45:19 +0000
@@ -175,4 +175,34 @@ id	value
 1	12345
 COMMIT;
 DROP TABLE t1;
+#
+# Bug#11747690 33650: MYSQL_ALTER_TABLE() UNNECESSARILY DOES
+#              FULL TABLE COPY 
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a INT, b VARCHAR(250), PRIMARY KEY(a,b))
+engine=innodb default charset=utf8;
+INSERT INTO t1 VALUES (1, 'a'), (2, 'b');
+CREATE INDEX t1ba ON t1(b,a);
+affected rows: 0
+info: Records: 0  Duplicates: 0  Warnings: 0
+DROP TABLE t1;
+#
+# Bug#11750045 - 40344: ALTER IGNORE TABLE T ADD INDEX DOES NOT IGNORE
+#                IN FAST INDEX CREATION
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a INT NOT NULL, b INT) engine = innodb;
+INSERT INTO t1 VALUES (1,1), (2,1), (3,1);
+# Should give error
+ALTER TABLE t1 ADD UNIQUE INDEX (b);
+ERROR 23000: Duplicate entry '1' for key 'b'
+# Should not give error
+# Also check that copy algorithm is used
+ALTER IGNORE TABLE t1 ADD UNIQUE INDEX (b);
+affected rows: 3
+info: Records: 3  Duplicates: 2  Warnings: 0
+SHOW WARNINGS;
+Level	Code	Message
+DROP TABLE t1;
 set global innodb_lock_wait_timeout=@old_innodb_lock_wait_timeout;

=== modified file 'mysql-test/r/lock.result'
--- a/mysql-test/r/lock.result	2011-10-19 19:45:18 +0000
+++ b/mysql-test/r/lock.result	2014-03-24 11:45:19 +0000
@@ -468,6 +468,18 @@ UNLOCK TABLES;
 UNLOCK TABLES;
 DROP TABLE t1, t2;
 #
+# Additional test coverage for WL#5534 - Online ALTER phase 1.
+#
+DROP TABLE IF EXISTS t1, m1;
+CREATE TABLE t1(a INT);
+CREATE TABLE m1(a INT) engine=merge union(t1);
+LOCK TABLES m1 WRITE;
+ALTER TABLE m1 COMMENT 'test';
+# This triggered an assert in MDL_ticket::downgrade_lock
+FLUSH TABLE m1;
+UNLOCK TABLES;
+DROP TABLE m1, t1;
+#
 # End of 6.0 tests.
 #
 create table t1 (a int) engine=myisam;

=== modified file 'mysql-test/r/partition_cache.result'
--- a/mysql-test/r/partition_cache.result	2012-07-13 19:17:32 +0000
+++ b/mysql-test/r/partition_cache.result	2014-03-24 11:45:19 +0000
@@ -203,3 +203,29 @@ Variable_name	Value
 Qcache_hits	1
 set @@global.query_cache_size = @save_query_cache_size;
 drop table t2;
+SET @old_query_cache_size = @@global.query_cache_size;
+SET GLOBAL query_cache_size=1355776;
+CREATE TABLE t1
+(`NUM` varchar(4) NOT NULL,
+`UPDATE_TIME` datetime NOT NULL,
+PRIMARY KEY (`NUM`,`UPDATE_TIME`))
+PARTITION BY RANGE (month(UPDATE_TIME))
+(PARTITION p2 VALUES LESS THAN (3) ENGINE = InnoDB,
+PARTITION p3 VALUES LESS THAN (4) ENGINE = InnoDB);
+SELECT * FROM t1 WHERE MONTH(update_time)=3;
+NUM	UPDATE_TIME
+INSERT INTO t1 VALUES ('AAA', '2010-03-11 00:00:00');
+SELECT * FROM t1 WHERE MONTH(update_time)=3;
+NUM	UPDATE_TIME
+AAA	2010-03-11 00:00:00
+ALTER TABLE t1 TRUNCATE PARTITION p3;
+COMMIT;
+SELECT * FROM t1 WHERE MONTH(update_time)=3;
+NUM	UPDATE_TIME
+SELECT SQL_NO_CACHE * FROM t1 WHERE MONTH(update_time)=3;
+NUM	UPDATE_TIME
+ALTER TABLE t1 DROP PARTITION p3;
+SELECT * FROM t1 WHERE MONTH(update_time)=3;
+NUM	UPDATE_TIME
+DROP TABLE t1;
+SET @@global.query_cache_size = @old_query_cache_size;

=== modified file 'mysql-test/r/partition_disabled.result'
--- a/mysql-test/r/partition_disabled.result	2013-09-14 01:09:36 +0000
+++ b/mysql-test/r/partition_disabled.result	2014-03-24 11:45:19 +0000
@@ -91,3 +91,18 @@ explain partitions select * from t1 wher
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	NULL	ALL	NULL	NULL	NULL	NULL	5	Using where
 drop table t1;
+#
+# bug#11760213-52599: ALTER TABLE REMOVE PARTITIONING ON NON-PARTITIONED
+#                                 TABLE CORRUPTS MYISAM
+DROP TABLE if exists `t1`;
+CREATE TABLE  `t1`(`a` INT)ENGINE=myisam;
+ALTER TABLE `t1` ADD COLUMN `b` INT;
+CREATE UNIQUE INDEX `i1` ON `t1`(`b`);
+CREATE UNIQUE INDEX `i2` ON `t1`(`a`);
+ALTER TABLE `t1` ADD PRIMARY KEY  (`a`);
+ALTER TABLE `t1` REMOVE PARTITIONING;
+ERROR HY000: Partition management on a not partitioned table is not possible
+CHECK TABLE `t1` EXTENDED;
+Table	Op	Msg_type	Msg_text
+test.t1	check	status	OK
+DROP TABLE t1;

=== modified file 'mysql-test/r/partition_error.result'
--- a/mysql-test/r/partition_error.result	2013-09-27 12:58:49 +0000
+++ b/mysql-test/r/partition_error.result	2014-03-24 11:45:19 +0000
@@ -904,6 +904,19 @@ a int not null,
 b int not null,
 c int not null,
 primary key(a,b))
+partition by range columns (a,d)
+(partition x1 VALUES LESS THAN (1,1),
+partition x2 VALUES LESS THAN (2,2),
+partition x3 VALUES LESS THAN (3,3));
+ERROR HY000: Field in list of fields for partition function not found in table
+select load_file('$MYSQLD_DATADIR/test/t1.par');
+load_file('$MYSQLD_DATADIR/test/t1.par')
+NULL
+CREATE TABLE t1 (
+a int not null,
+b int not null,
+c int not null,
+primary key(a,b))
 partition by key (a,d)
 partitions 3
 (partition x1 tablespace ts1,

=== modified file 'mysql-test/r/partition_list.result'
--- a/mysql-test/r/partition_list.result	2009-10-21 18:04:34 +0000
+++ b/mysql-test/r/partition_list.result	2014-03-24 11:45:19 +0000
@@ -1,4 +1,136 @@
 drop table if exists t1;
+#
+# Bug#62505: ALTER TABLE ADD PARTITION fails for LIST partitions with
+#            more than 16 items
+#
+CREATE TABLE t1 (a INT);
+# SUCCESS with 20 items because this is initial partitioning action
+# (The parser already knows that it is only on column)
+ALTER TABLE t1
+PARTITION BY LIST(a)
+(PARTITION p1 VALUES IN (1,2,3,4,5,6,7,8,9,10,
+11,12,13,14,15,16,17,18,19,20));
+# BUG: FAILED, because number of items > 16 during partition add
+# (The parser do not know how many columns the table is partitioned on)
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30,
+31,32,33,34,35,36,37,38,39,40));
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY LIST (a)
+(PARTITION p1 VALUES IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM,
+ PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40) ENGINE = MyISAM) */
+# Test with single column LIST COLUMNS too
+ALTER TABLE t1
+PARTITION BY LIST COLUMNS (a)
+(PARTITION p1 VALUES IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20));
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p2 VALUES IN ((71),(72),(73),(74),(75),(76),(77),(78),(79),(80),
+(81),(82),(83),(84),(85),(86),(87),(88),(89),(90)));
+ERROR 42000: Row expressions in VALUES IN only allowed for multi-field column partitioning near '))' at line 3
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30,
+31,32,33,34,35,36,37,38,39,40));
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50500 PARTITION BY LIST  COLUMNS(a)
+(PARTITION p1 VALUES IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM,
+ PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40) ENGINE = MyISAM) */
+DROP TABLE t1;
+# Test with two columns in LIST COLUMNS partitioning
+CREATE TABLE t1
+(a INT,
+b CHAR(2))
+PARTITION BY LIST COLUMNS (a, b)
+(PARTITION p0_a VALUES IN
+((0, "a0"), (0, "a1"), (0, "a2"), (0, "a3"), (0, "a4"), (0, "a5"), (0, "a6"),
+(0, "a7"), (0, "a8"), (0, "a9"), (0, "aa"), (0, "ab"), (0, "ac"), (0, "ad"),
+(0, "ae"), (0, "af"), (0, "ag"), (0, "ah"), (0, "ai"), (0, "aj"), (0, "ak"),
+(0, "al")));
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p1_a VALUES IN
+((1, "a0"), (1, "a1"), (1, "a2"), (1, "a3"), (1, "a4"), (1, "a5"), (1, "a6"),
+(1, "a7"), (1, "a8"), (1, "a9"), (1, "aa"), (1, "ab"), (1, "ac"), (1, "ad"),
+(1, "ae"), (1, "af"), (1, "ag"), (1, "ah"), (1, "ai"), (1, "aj"), (1, "ak"),
+(1, "al")));
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL,
+  `b` char(2) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50500 PARTITION BY LIST  COLUMNS(a,b)
+(PARTITION p0_a VALUES IN ((0,'a0'),(0,'a1'),(0,'a2'),(0,'a3'),(0,'a4'),(0,'a5'),(0,'a6'),(0,'a7'),(0,'a8'),(0,'a9'),(0,'aa'),(0,'ab'),(0,'ac'),(0,'ad'),(0,'ae'),(0,'af'),(0,'ag'),(0,'ah'),(0,'ai'),(0,'aj'),(0,'ak'),(0,'al')) ENGINE = MyISAM,
+ PARTITION p1_a VALUES IN ((1,'a0'),(1,'a1'),(1,'a2'),(1,'a3'),(1,'a4'),(1,'a5'),(1,'a6'),(1,'a7'),(1,'a8'),(1,'a9'),(1,'aa'),(1,'ab'),(1,'ac'),(1,'ad'),(1,'ae'),(1,'af'),(1,'ag'),(1,'ah'),(1,'ai'),(1,'aj'),(1,'ak'),(1,'al')) ENGINE = MyISAM) */
+# Test of the parser for '('
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p2_a VALUES IN
+(((1 + 1), "a0"), (2, "a1"), (2, "a2"), (2, "a3"), (2, "a4"), (2, "a5"),
+(2, "a6"), (2, "a7"), (2, "a8"), (2, "a9"), (2, "aa"), (2, "ab"), (2, "ac"),
+(2, "ad"), (2, "ae"), (2, "af"), (2, "ag"), (2, "ah"), (2, "ai"), (2, "aj"),
+(2, "ak"), (2, "al")));
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL,
+  `b` char(2) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50500 PARTITION BY LIST  COLUMNS(a,b)
+(PARTITION p0_a VALUES IN ((0,'a0'),(0,'a1'),(0,'a2'),(0,'a3'),(0,'a4'),(0,'a5'),(0,'a6'),(0,'a7'),(0,'a8'),(0,'a9'),(0,'aa'),(0,'ab'),(0,'ac'),(0,'ad'),(0,'ae'),(0,'af'),(0,'ag'),(0,'ah'),(0,'ai'),(0,'aj'),(0,'ak'),(0,'al')) ENGINE = MyISAM,
+ PARTITION p1_a VALUES IN ((1,'a0'),(1,'a1'),(1,'a2'),(1,'a3'),(1,'a4'),(1,'a5'),(1,'a6'),(1,'a7'),(1,'a8'),(1,'a9'),(1,'aa'),(1,'ab'),(1,'ac'),(1,'ad'),(1,'ae'),(1,'af'),(1,'ag'),(1,'ah'),(1,'ai'),(1,'aj'),(1,'ak'),(1,'al')) ENGINE = MyISAM,
+ PARTITION p2_a VALUES IN ((2,'a0'),(2,'a1'),(2,'a2'),(2,'a3'),(2,'a4'),(2,'a5'),(2,'a6'),(2,'a7'),(2,'a8'),(2,'a9'),(2,'aa'),(2,'ab'),(2,'ac'),(2,'ad'),(2,'ae'),(2,'af'),(2,'ag'),(2,'ah'),(2,'ai'),(2,'aj'),(2,'ak'),(2,'al')) ENGINE = MyISAM) */
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p3_a VALUES IN ((1 + 1 + 1), "a0"));
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"a0"))' at line 2
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p3_a VALUES IN (1 + 1 + 1, "a0"));
+ERROR HY000: Inconsistency in usage of column lists for partitioning
+# Test with 3 columns when it only has 2.
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p3_a VALUES IN ((3, "a1", 0), (3, "a2", 0)));
+ERROR HY000: Inconsistency in usage of column lists for partitioning
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p3_a VALUES IN ((1 + 1 + 1, "a0")));
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL,
+  `b` char(2) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50500 PARTITION BY LIST  COLUMNS(a,b)
+(PARTITION p0_a VALUES IN ((0,'a0'),(0,'a1'),(0,'a2'),(0,'a3'),(0,'a4'),(0,'a5'),(0,'a6'),(0,'a7'),(0,'a8'),(0,'a9'),(0,'aa'),(0,'ab'),(0,'ac'),(0,'ad'),(0,'ae'),(0,'af'),(0,'ag'),(0,'ah'),(0,'ai'),(0,'aj'),(0,'ak'),(0,'al')) ENGINE = MyISAM,
+ PARTITION p1_a VALUES IN ((1,'a0'),(1,'a1'),(1,'a2'),(1,'a3'),(1,'a4'),(1,'a5'),(1,'a6'),(1,'a7'),(1,'a8'),(1,'a9'),(1,'aa'),(1,'ab'),(1,'ac'),(1,'ad'),(1,'ae'),(1,'af'),(1,'ag'),(1,'ah'),(1,'ai'),(1,'aj'),(1,'ak'),(1,'al')) ENGINE = MyISAM,
+ PARTITION p2_a VALUES IN ((2,'a0'),(2,'a1'),(2,'a2'),(2,'a3'),(2,'a4'),(2,'a5'),(2,'a6'),(2,'a7'),(2,'a8'),(2,'a9'),(2,'aa'),(2,'ab'),(2,'ac'),(2,'ad'),(2,'ae'),(2,'af'),(2,'ag'),(2,'ah'),(2,'ai'),(2,'aj'),(2,'ak'),(2,'al')) ENGINE = MyISAM,
+ PARTITION p3_a VALUES IN ((3,'a0')) ENGINE = MyISAM) */
+# Test with more than 16 columns (cause of regression)
+ALTER TABLE t1 ADD PARTITION
+(PARTITION part_2 VALUES IN ((21 ,22, 23, 24, 25, 26, 27, 28, 29, 30,
+31 ,32, 33, 34, 35, 36, 37, 38, 39, 40),
+(41 ,42, 43, 44, 45, 46, 47, 48, 49, 50,
+51 ,52, 53, 54, 55, 56, 57, 58, 59, 60)));
+ERROR HY000: Inconsistency in usage of column lists for partitioning
+ALTER TABLE t1 ADD PARTITION
+(PARTITION part_2 VALUES IN (21 ,22, 23, 24, 25, 26, 27, 28, 29, 30,
+31 ,32, 33, 34, 35, 36, 37, 38, 39, 40));
+ERROR HY000: Inconsistency in usage of column lists for partitioning
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) DEFAULT NULL,
+  `b` char(2) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50500 PARTITION BY LIST  COLUMNS(a,b)
+(PARTITION p0_a VALUES IN ((0,'a0'),(0,'a1'),(0,'a2'),(0,'a3'),(0,'a4'),(0,'a5'),(0,'a6'),(0,'a7'),(0,'a8'),(0,'a9'),(0,'aa'),(0,'ab'),(0,'ac'),(0,'ad'),(0,'ae'),(0,'af'),(0,'ag'),(0,'ah'),(0,'ai'),(0,'aj'),(0,'ak'),(0,'al')) ENGINE = MyISAM,
+ PARTITION p1_a VALUES IN ((1,'a0'),(1,'a1'),(1,'a2'),(1,'a3'),(1,'a4'),(1,'a5'),(1,'a6'),(1,'a7'),(1,'a8'),(1,'a9'),(1,'aa'),(1,'ab'),(1,'ac'),(1,'ad'),(1,'ae'),(1,'af'),(1,'ag'),(1,'ah'),(1,'ai'),(1,'aj'),(1,'ak'),(1,'al')) ENGINE = MyISAM,
+ PARTITION p2_a VALUES IN ((2,'a0'),(2,'a1'),(2,'a2'),(2,'a3'),(2,'a4'),(2,'a5'),(2,'a6'),(2,'a7'),(2,'a8'),(2,'a9'),(2,'aa'),(2,'ab'),(2,'ac'),(2,'ad'),(2,'ae'),(2,'af'),(2,'ag'),(2,'ah'),(2,'ai'),(2,'aj'),(2,'ak'),(2,'al')) ENGINE = MyISAM,
+ PARTITION p3_a VALUES IN ((3,'a0')) ENGINE = MyISAM) */
+DROP TABLE t1;
 create table t1 (a int unsigned)
 partition by list (a)
 (partition p0 values in (0),

=== added file 'mysql-test/r/partition_locking_4.result'
--- a/mysql-test/r/partition_locking_4.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/partition_locking_4.result	2014-03-24 11:45:19 +0000
@@ -0,0 +1,52 @@
+SET @old_autocommit = @@global.autocommit;
+SET @@global.autocommit = 0;
+SET @old_lock_wait_timeout= @@global.lock_wait_timeout;
+SET @@global.lock_wait_timeout = 1;
+SET @old_innodb_lock_wait_timeout= @@global.innodb_lock_wait_timeout;
+SET @@global.innodb_lock_wait_timeout = 1;
+USE test;
+CREATE USER 'mysqltest1'@'localhost';
+CREATE USER 'mysqltest2'@'localhost';
+GRANT ALL PRIVILEGES ON test.* TO 'mysqltest1'@'localhost';
+GRANT ALL PRIVILEGES ON test.* TO 'mysqltest2'@'localhost';
+CREATE TABLE t1 (a int PRIMARY KEY, b varchar(128), KEY (b))
+ENGINE = InnoDB
+PARTITION BY HASH (a) PARTITIONS 13;
+INSERT INTO t1 VALUES (11, 'First row, p11');
+INSERT INTO t1 VALUES (12, 'First row, p12');
+connect  test1,localhost,mysqltest1,,test;
+connect  test2,localhost,mysqltest2,,test;
+connection test1;
+INSERT INTO t1 VALUES (13+11, 'Second row, p11');
+INSERT INTO t1 VALUES (13+12, 'Second row, p12');
+SELECT * FROM t1 ORDER BY a;
+a	b
+11	First row, p11
+12	First row, p12
+24	Second row, p11
+25	Second row, p12
+connection test2;
+INSERT INTO t1 VALUES (13+11, 'Second row, p11');
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+INSERT INTO t1 VALUES (13+12, 'Second row, p12');
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SELECT * FROM t1 ORDER BY a;
+a	b
+11	First row, p11
+12	First row, p12
+COMMIT;
+connection test1;
+SELECT * FROM t1 ORDER BY a;
+a	b
+11	First row, p11
+12	First row, p12
+24	Second row, p11
+25	Second row, p12
+COMMIT;
+connection default;
+DROP TABLE t1;
+DROP USER 'mysqltest1'@'localhost';
+DROP USER 'mysqltest2'@'localhost';
+SET @@global.autocommit = @old_autocommit;
+SET @@global.lock_wait_timeout= @old_lock_wait_timeout;
+SET @@global.innodb_lock_wait_timeout= @old_innodb_lock_wait_timeout;

=== modified file 'mysql-test/r/partition_mgm.result'
--- a/mysql-test/r/partition_mgm.result	2009-04-17 20:00:53 +0000
+++ b/mysql-test/r/partition_mgm.result	2014-03-24 11:45:19 +0000
@@ -1,4 +1,70 @@
 DROP TABLE IF EXISTS t1;
+#
+# Bug#13357766: ASSERT IN HANDLER::HA_CREATE
+#
+CREATE TABLE t1
+(a INT)
+PARTITION BY KEY(a) PARTITIONS 3;
+ALTER TABLE t1 REPAIR PARTITION p2,p3,p1;
+Table	Op	Msg_type	Msg_text
+test.t1	repair	error	Error in list of partitions to test.t1
+ALTER TABLE t1 ORDER BY a;
+DROP TABLE t1;
+#
+# Bug#11764110/bug#56909: REORGANIZE PARTITION is allowed on
+#                         HASH/KEY partitioned tables
+#
+CREATE TABLE t1 (a INT PRIMARY KEY)
+ENGINE MYISAM
+PARTITION BY HASH (a)
+PARTITIONS 1;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
+INSERT INTO t1 VALUES (12), (13), (14), (15), (16), (17), (18), (19), (20);
+# This changes from auto partitioned to manual partitioned
+ALTER TABLE t1 REORGANIZE PARTITION p0 INTO (PARTITION pHidden);
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) NOT NULL,
+  PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY HASH (a)
+(PARTITION pHidden ENGINE = MyISAM) */
+ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION pNamed1);
+ALTER TABLE t1 ADD PARTITION
+(PARTITION pNamed2);
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p5);
+ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
+ERROR HY000: Duplicate partition name p5
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) NOT NULL,
+  PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY HASH (a)
+(PARTITION pHidden ENGINE = MyISAM,
+ PARTITION p1 ENGINE = MyISAM,
+ PARTITION pNamed1 ENGINE = MyISAM,
+ PARTITION pNamed2 ENGINE = MyISAM,
+ PARTITION p5 ENGINE = MyISAM) */
+ALTER TABLE t1 REBUILD PARTITION all;
+ALTER TABLE t1 REBUILD PARTITION pNamed1,p5;
+ALTER TABLE t1 COALESCE PARTITION 1;
+ALTER TABLE t1 COALESCE PARTITION 2;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) NOT NULL,
+  PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY HASH (a)
+(PARTITION pHidden ENGINE = MyISAM,
+ PARTITION p1 ENGINE = MyISAM) */
+DROP TABLE t1;
 CREATE TABLE t1 (a INT PRIMARY KEY)
 ENGINE MYISAM
 PARTITION BY HASH (a)

=== modified file 'mysql-test/r/partition_myisam.result'
--- a/mysql-test/r/partition_myisam.result	2013-11-20 11:05:39 +0000
+++ b/mysql-test/r/partition_myisam.result	2014-03-24 11:45:19 +0000
@@ -1,5 +1,25 @@
 DROP TABLE IF EXISTS t1, t2;
 #
+# Bug#11763825/56590: PARTITIONS: FULLTEXT SEARCHES FAIL
+# (bad/confusing error message)
+CREATE TABLE t1
+(a INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
+b VARCHAR(200),
+c TEXT)
+ENGINE=MyISAM
+PARTITION BY HASH(a) PARTITIONS 1;
+CREATE FULLTEXT INDEX msg ON t1 (b, c);
+ERROR HY000: The storage engine partition doesn't support FULLTEXT indexes
+DROP TABLE t1;
+CREATE TABLE t1
+(a INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
+b VARCHAR(200),
+c TEXT,
+FULLTEXT (b, c))
+ENGINE=MyISAM
+PARTITION BY HASH(a) PARTITIONS 1;
+ERROR HY000: The storage engine partition doesn't support FULLTEXT indexes
+#
 # BUG#11933226 - 60681: CHECKSUM TABLE RETURNS 0 FOR PARTITIONED TABLE
 #
 CREATE TABLE t1 (

=== modified file 'mysql-test/r/show_check.result'
--- a/mysql-test/r/show_check.result	2013-11-20 11:05:39 +0000
+++ b/mysql-test/r/show_check.result	2014-03-24 11:45:19 +0000
@@ -1553,6 +1553,22 @@ RELEASE_LOCK('t')
 1
 SET NAMES latin1;
 #
+# Bug#58996 SHOW CREATE TRIGGER fails when subject table is shadowed by
+#           a temporary table.
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (a INT);
+CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW BEGIN END;
+SHOW CREATE TRIGGER t1_bi;
+Trigger	sql_mode	SQL Original Statement	character_set_client	collation_connection	Database Collation
+t1_bi		CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW BEGIN END	latin1	latin1_swedish_ci	latin1_swedish_ci
+CREATE TEMPORARY TABLE t1 (b INT);
+SHOW CREATE TRIGGER t1_bi;
+Trigger	sql_mode	SQL Original Statement	character_set_client	collation_connection	Database Collation
+t1_bi		CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW BEGIN END	latin1	latin1_swedish_ci	latin1_swedish_ci
+DROP TEMPORARY TABLE t1;
+DROP TABLE t1;
+#
 # WL#6454: Deprecate SHOW AUTHORS and SHOW CONTRIBUTORS
 #
 SHOW AUTHORS;

=== modified file 'mysql-test/r/ssl.result'
--- a/mysql-test/r/ssl.result	2014-02-26 14:28:07 +0000
+++ b/mysql-test/r/ssl.result	2014-03-24 11:45:19 +0000
@@ -2166,3 +2166,13 @@ drop table t1;
 SHOW STATUS LIKE 'Ssl_cipher';
 Variable_name	Value
 Ssl_cipher	DHE-RSA-AES256-SHA
+#
+# Bug#54790: Use of non-blocking mode for sockets limits performance
+#
+# Open ssl_con and set a timeout.
+SET @@SESSION.wait_timeout = 2;
+# Wait for ssl_con to be disconnected.
+# Check that ssl_con has been disconnected.
+# CR_SERVER_LOST, CR_SERVER_GONE_ERROR
+SELECT 1;
+Got one of the listed errors

=== modified file 'mysql-test/r/subselect_notembedded.result'
--- a/mysql-test/r/subselect_notembedded.result	2011-12-12 22:58:40 +0000
+++ b/mysql-test/r/subselect_notembedded.result	2014-03-24 11:45:19 +0000
@@ -38,3 +38,9 @@ insert into t1(a,b) values (1,2),(2,1),(
 1
 drop table t1;
 End of 5.1 tests
+CREATE TABLE t1 (f1 INT NOT NULL);
+CREATE VIEW v1 (a) AS SELECT f1 IN (SELECT f1 FROM t1) FROM t1;
+SELECT * FROM v1;
+a
+drop view v1;
+drop table t1;

=== added file 'mysql-test/t/delete_innodb.test'
--- a/mysql-test/t/delete_innodb.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/delete_innodb.test	2014-03-24 11:45:19 +0000
@@ -0,0 +1,30 @@
+--source include/have_innodb.inc
+
+--echo #
+--echo # Bug#58709 assert in mysql_execute_command
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t2, t1;
+DROP PROCEDURE IF EXISTS p1;
+--enable_warnings
+
+CREATE TABLE t1 (i INT PRIMARY KEY) engine=InnoDB;
+CREATE TABLE t2 (i INT, FOREIGN KEY (i) REFERENCES t1 (i) ON DELETE NO ACTION) engine=InnoDB;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+
+DELETE IGNORE FROM t1 WHERE i = 1;
+
+CREATE PROCEDURE p1() DELETE IGNORE FROM t1 WHERE i = 1;
+# This triggered the assert
+CALL p1();
+
+PREPARE stm FROM 'CALL p1()';
+# This also triggered the assert
+EXECUTE stm;
+DEALLOCATE PREPARE stm;
+
+DROP TABLE t2, t1;
+DROP PROCEDURE p1;

=== modified file 'mysql-test/t/func_group.test'
--- a/mysql-test/t/func_group.test	2014-02-26 14:28:07 +0000
+++ b/mysql-test/t/func_group.test	2014-03-24 11:45:19 +0000
@@ -1475,7 +1475,14 @@ SELECT AVG(DISTINCT outr.col_int_nokey)
 outr.col_int_nokey = outr2.col_int_nokey;
 DROP TABLE t1;
 --echo # End of the bug#57932
+--echo #
+--echo # BUG#12773464 - 61925: WRONG RESULT WITH AGGREGATE + NOT BETWEEN + KEY
+--echo #
+CREATE TABLE t1 (a int, KEY (a));
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+SELECT MAX(a) FROM t1 WHERE a NOT BETWEEN 3 AND 9;
 
+DROP TABLE t1;
 
 --echo #
 --echo # MDEV-5257: MIN/MAX Optimization (Select tables optimized away) does not work for DateTime

=== modified file 'mysql-test/t/func_group_innodb.test'
--- a/mysql-test/t/func_group_innodb.test	2013-09-14 01:09:36 +0000
+++ b/mysql-test/t/func_group_innodb.test	2014-03-24 11:45:19 +0000
@@ -188,3 +188,21 @@ EXPLAIN SELECT MIN(c) FROM t1 GROUP BY b
 DROP TABLE t1;
 
 --echo End of 5.5 tests
+
+--echo #
+--echo # Bug#13724099 1032 BYTE MEMORY LEAK NEW_CACHED_ITEM IN
+--echo #              SUBQUERY WITH GROUPING OF OUTER COLUMN
+--echo #
+
+CREATE TABLE t1 (
+  a BLOB,
+  b INT)
+engine=innodb;
+
+INSERT INTO t1 VALUES ('a', 0);
+
+SELECT 0 FROM t1
+WHERE 0 = (SELECT group_concat(b)
+           FROM t1 t GROUP BY t1.a)
+;
+DROP TABLE t1;

=== modified file 'mysql-test/t/func_if.test'
--- a/mysql-test/t/func_if.test	2012-05-21 18:54:41 +0000
+++ b/mysql-test/t/func_if.test	2014-03-24 11:45:19 +0000
@@ -183,6 +183,16 @@ SELECT IF(b, (SELECT a FROM t1 LIMIT 1),
 DROP TABLE t1;
 
 --echo #
+--echo # Bug#12620084
+--echo # ASSERTION WHEN CHECKING FIELD_TYPES[FIELD_POS] AND IT'S MYSQL_TYPE_NULL
+--echo #
+
+SELECT if(0, (SELECT min('hello')), NULL);
+SELECT if(1, (SELECT min('hello')), NULL);
+SELECT if(0, NULL, (SELECT min('hello')));
+SELECT if(1, NULL, (SELECT min('hello')));
+
+--echo #
 --echo # Bug#12532830 
 --echo # SIGFPE OR ASSERTION (PRECISION <= ((9 * 9) - 8*2)) && (DEC <= 30)
 --echo #

=== modified file 'mysql-test/t/innodb_mysql_lock.test'
--- a/mysql-test/t/innodb_mysql_lock.test	2012-10-30 10:41:41 +0000
+++ b/mysql-test/t/innodb_mysql_lock.test	2014-03-24 11:45:19 +0000
@@ -319,6 +319,53 @@ DROP TABLE t1;
 disconnect con1;
 
 
+--echo #
+--echo # Bug#11747690 33650: MYSQL_ALTER_TABLE() UNNECESSARILY DOES
+--echo #              FULL TABLE COPY 
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1(a INT, b VARCHAR(250), PRIMARY KEY(a,b))
+  engine=innodb default charset=utf8;
+INSERT INTO t1 VALUES (1, 'a'), (2, 'b');
+
+# Check that 0 rows are affected
+--enable_info
+CREATE INDEX t1ba ON t1(b,a);
+--disable_info
+
+DROP TABLE t1;
+
+
+--echo #
+--echo # Bug#11750045 - 40344: ALTER IGNORE TABLE T ADD INDEX DOES NOT IGNORE
+--echo #                IN FAST INDEX CREATION
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1(a INT NOT NULL, b INT) engine = innodb;
+INSERT INTO t1 VALUES (1,1), (2,1), (3,1);
+
+--echo # Should give error
+--error ER_DUP_ENTRY
+ALTER TABLE t1 ADD UNIQUE INDEX (b);
+
+--echo # Should not give error
+--echo # Also check that copy algorithm is used
+--enable_info
+ALTER IGNORE TABLE t1 ADD UNIQUE INDEX (b);
+--disable_info
+SHOW WARNINGS;
+
+DROP TABLE t1;
+
+
 # Check that all connections opened by test cases in this file are really
 # gone so execution of other tests won't be affected by their presence.
 --source include/wait_until_count_sessions.inc

=== modified file 'mysql-test/t/lock.test'
--- a/mysql-test/t/lock.test	2011-10-19 19:45:18 +0000
+++ b/mysql-test/t/lock.test	2014-03-24 11:45:19 +0000
@@ -576,6 +576,25 @@ UNLOCK TABLES;
 DROP TABLE t1, t2;
 disconnect con2;
 
+--echo #
+--echo # Additional test coverage for WL#5534 - Online ALTER phase 1.
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1, m1;
+--enable_warnings
+
+CREATE TABLE t1(a INT);
+CREATE TABLE m1(a INT) engine=merge union(t1);
+
+LOCK TABLES m1 WRITE;
+ALTER TABLE m1 COMMENT 'test';
+--echo # This triggered an assert in MDL_ticket::downgrade_lock
+FLUSH TABLE m1;
+
+UNLOCK TABLES;
+DROP TABLE m1, t1;
+
 
 --echo #
 --echo # End of 6.0 tests.

=== modified file 'mysql-test/t/partition_cache.test'
--- a/mysql-test/t/partition_cache.test	2012-02-20 21:59:11 +0000
+++ b/mysql-test/t/partition_cache.test	2014-03-24 11:45:19 +0000
@@ -19,3 +19,35 @@ let $partitions_s1= `SELECT ' PARTITION
 let $test_foreign_keys= 0;
 
 --source include/query_cache.inc
+
+SET @old_query_cache_size = @@global.query_cache_size;
+SET GLOBAL query_cache_size=1355776;
+CREATE TABLE t1
+(`NUM` varchar(4) NOT NULL,
+ `UPDATE_TIME` datetime NOT NULL,
+ PRIMARY KEY (`NUM`,`UPDATE_TIME`))
+PARTITION BY RANGE (month(UPDATE_TIME))
+(PARTITION p2 VALUES LESS THAN (3) ENGINE = InnoDB,
+ PARTITION p3 VALUES LESS THAN (4) ENGINE = InnoDB);
+
+SELECT * FROM t1 WHERE MONTH(update_time)=3;
+
+INSERT INTO t1 VALUES ('AAA', '2010-03-11 00:00:00');
+
+SELECT * FROM t1 WHERE MONTH(update_time)=3;
+
+ALTER TABLE t1 TRUNCATE PARTITION p3;
+
+COMMIT;
+
+SELECT * FROM t1 WHERE MONTH(update_time)=3;
+
+SELECT SQL_NO_CACHE * FROM t1 WHERE MONTH(update_time)=3;
+
+ALTER TABLE t1 DROP PARTITION p3;
+
+SELECT * FROM t1 WHERE MONTH(update_time)=3;
+
+DROP TABLE t1;
+
+SET @@global.query_cache_size = @old_query_cache_size;

=== modified file 'mysql-test/t/partition_disabled.test'
--- a/mysql-test/t/partition_disabled.test	2013-09-14 01:09:36 +0000
+++ b/mysql-test/t/partition_disabled.test	2014-03-24 11:45:19 +0000
@@ -85,3 +85,18 @@ create table t1 (a varchar(10) charset l
 insert into t1 values (''),(' '),('a'),('a '),('a  ');
 explain partitions select * from t1 where a='a ' OR a='a';
 drop table t1;
+--echo #
+--echo # bug#11760213-52599: ALTER TABLE REMOVE PARTITIONING ON NON-PARTITIONED
+--echo #                                 TABLE CORRUPTS MYISAM
+--disable_warnings
+DROP TABLE if exists `t1`;
+--enable_warnings
+CREATE TABLE  `t1`(`a` INT)ENGINE=myisam;
+ALTER TABLE `t1` ADD COLUMN `b` INT;
+CREATE UNIQUE INDEX `i1` ON `t1`(`b`);
+CREATE UNIQUE INDEX `i2` ON `t1`(`a`);
+ALTER TABLE `t1` ADD PRIMARY KEY  (`a`);
+--error ER_PARTITION_MGMT_ON_NONPARTITIONED
+ALTER TABLE `t1` REMOVE PARTITIONING;
+CHECK TABLE `t1` EXTENDED;
+DROP TABLE t1;

=== modified file 'mysql-test/t/partition_error.test'
--- a/mysql-test/t/partition_error.test	2013-09-27 12:58:49 +0000
+++ b/mysql-test/t/partition_error.test	2014-03-24 11:45:19 +0000
@@ -922,6 +922,23 @@ partitions 3
  partition x3 tablespace ts3);
 
 #
+# Partition by range columns, invalid field in field list
+#
+--error ER_FIELD_NOT_FOUND_PART_ERROR
+CREATE TABLE t1 (
+a int not null,
+b int not null,
+c int not null,
+primary key(a,b))
+partition by range columns (a,d)
+(partition x1 VALUES LESS THAN (1,1),
+ partition x2 VALUES LESS THAN (2,2),
+ partition x3 VALUES LESS THAN (3,3));
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+select load_file('$MYSQLD_DATADIR/test/t1.par');
+
+#
 # Partition by key, invalid field in field list
 #
 --error ER_FIELD_NOT_FOUND_PART_ERROR

=== modified file 'mysql-test/t/partition_list.test'
--- a/mysql-test/t/partition_list.test	2009-10-21 18:04:34 +0000
+++ b/mysql-test/t/partition_list.test	2014-03-24 11:45:19 +0000
@@ -9,6 +9,102 @@
 drop table if exists t1;
 --enable_warnings
 
+--echo #
+--echo # Bug#62505: ALTER TABLE ADD PARTITION fails for LIST partitions with
+--echo #            more than 16 items
+--echo #
+
+CREATE TABLE t1 (a INT);
+
+--echo # SUCCESS with 20 items because this is initial partitioning action
+--echo # (The parser already knows that it is only on column)
+ALTER TABLE t1
+PARTITION BY LIST(a)
+(PARTITION p1 VALUES IN (1,2,3,4,5,6,7,8,9,10,
+                         11,12,13,14,15,16,17,18,19,20));
+
+--echo # BUG: FAILED, because number of items > 16 during partition add
+--echo # (The parser do not know how many columns the table is partitioned on)
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30,
+                         31,32,33,34,35,36,37,38,39,40));
+
+
+SHOW CREATE TABLE t1;
+
+--echo # Test with single column LIST COLUMNS too
+ALTER TABLE t1
+PARTITION BY LIST COLUMNS (a)
+(PARTITION p1 VALUES IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20));
+
+--error ER_PARSE_ERROR
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p2 VALUES IN ((71),(72),(73),(74),(75),(76),(77),(78),(79),(80),
+                         (81),(82),(83),(84),(85),(86),(87),(88),(89),(90)));
+
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30,
+                         31,32,33,34,35,36,37,38,39,40));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+--echo # Test with two columns in LIST COLUMNS partitioning
+CREATE TABLE t1
+(a INT,
+ b CHAR(2))
+PARTITION BY LIST COLUMNS (a, b)
+(PARTITION p0_a VALUES IN
+((0, "a0"), (0, "a1"), (0, "a2"), (0, "a3"), (0, "a4"), (0, "a5"), (0, "a6"),
+ (0, "a7"), (0, "a8"), (0, "a9"), (0, "aa"), (0, "ab"), (0, "ac"), (0, "ad"),
+ (0, "ae"), (0, "af"), (0, "ag"), (0, "ah"), (0, "ai"), (0, "aj"), (0, "ak"),
+ (0, "al")));
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p1_a VALUES IN
+((1, "a0"), (1, "a1"), (1, "a2"), (1, "a3"), (1, "a4"), (1, "a5"), (1, "a6"),
+ (1, "a7"), (1, "a8"), (1, "a9"), (1, "aa"), (1, "ab"), (1, "ac"), (1, "ad"),
+ (1, "ae"), (1, "af"), (1, "ag"), (1, "ah"), (1, "ai"), (1, "aj"), (1, "ak"),
+ (1, "al")));
+SHOW CREATE TABLE t1;
+
+--echo # Test of the parser for '('
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p2_a VALUES IN
+(((1 + 1), "a0"), (2, "a1"), (2, "a2"), (2, "a3"), (2, "a4"), (2, "a5"),
+ (2, "a6"), (2, "a7"), (2, "a8"), (2, "a9"), (2, "aa"), (2, "ab"), (2, "ac"),
+ (2, "ad"), (2, "ae"), (2, "af"), (2, "ag"), (2, "ah"), (2, "ai"), (2, "aj"),
+ (2, "ak"), (2, "al")));
+
+SHOW CREATE TABLE t1;
+
+--error ER_PARSE_ERROR
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p3_a VALUES IN ((1 + 1 + 1), "a0"));
+--error ER_PARTITION_COLUMN_LIST_ERROR
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p3_a VALUES IN (1 + 1 + 1, "a0"));
+
+--echo # Test with 3 columns when it only has 2.
+--error ER_PARTITION_COLUMN_LIST_ERROR
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p3_a VALUES IN ((3, "a1", 0), (3, "a2", 0)));
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p3_a VALUES IN ((1 + 1 + 1, "a0")));
+SHOW CREATE TABLE t1;
+--echo # Test with more than 16 columns (cause of regression)
+#--error ER_PARSE_ERROR
+--error ER_PARTITION_COLUMN_LIST_ERROR
+ALTER TABLE t1 ADD PARTITION
+(PARTITION part_2 VALUES IN ((21 ,22, 23, 24, 25, 26, 27, 28, 29, 30,
+                              31 ,32, 33, 34, 35, 36, 37, 38, 39, 40),
+                             (41 ,42, 43, 44, 45, 46, 47, 48, 49, 50,
+                              51 ,52, 53, 54, 55, 56, 57, 58, 59, 60)));
+--error ER_PARTITION_COLUMN_LIST_ERROR
+ALTER TABLE t1 ADD PARTITION
+(PARTITION part_2 VALUES IN (21 ,22, 23, 24, 25, 26, 27, 28, 29, 30,
+                             31 ,32, 33, 34, 35, 36, 37, 38, 39, 40));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
 #
 # Bug 20733: Zerofill columns gives wrong result with partitioned tables
 #

=== added file 'mysql-test/t/partition_locking_4.test'
--- a/mysql-test/t/partition_locking_4.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/partition_locking_4.test	2014-03-24 11:45:19 +0000
@@ -0,0 +1,52 @@
+--source include/have_partition.inc
+--source include/have_innodb.inc
+
+SET @old_autocommit = @@global.autocommit;
+SET @@global.autocommit = 0;
+SET @old_lock_wait_timeout= @@global.lock_wait_timeout;
+SET @@global.lock_wait_timeout = 1;
+SET @old_innodb_lock_wait_timeout= @@global.innodb_lock_wait_timeout;
+SET @@global.innodb_lock_wait_timeout = 1;
+
+USE test;
+
+CREATE USER 'mysqltest1'@'localhost';
+CREATE USER 'mysqltest2'@'localhost';
+GRANT ALL PRIVILEGES ON test.* TO 'mysqltest1'@'localhost';
+GRANT ALL PRIVILEGES ON test.* TO 'mysqltest2'@'localhost';
+
+CREATE TABLE t1 (a int PRIMARY KEY, b varchar(128), KEY (b))
+ENGINE = InnoDB
+PARTITION BY HASH (a) PARTITIONS 13;
+
+INSERT INTO t1 VALUES (11, 'First row, p11');
+INSERT INTO t1 VALUES (12, 'First row, p12');
+
+--enable_connect_log
+connect (test1,localhost,mysqltest1,,test);
+connect (test2,localhost,mysqltest2,,test);
+
+connection test1;
+INSERT INTO t1 VALUES (13+11, 'Second row, p11');
+INSERT INTO t1 VALUES (13+12, 'Second row, p12');
+SELECT * FROM t1 ORDER BY a;
+
+connection test2;
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (13+11, 'Second row, p11');
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (13+12, 'Second row, p12');
+SELECT * FROM t1 ORDER BY a;
+COMMIT;
+
+connection test1;
+SELECT * FROM t1 ORDER BY a;
+COMMIT;
+
+connection default;
+DROP TABLE t1;
+DROP USER 'mysqltest1'@'localhost';
+DROP USER 'mysqltest2'@'localhost';
+SET @@global.autocommit = @old_autocommit;
+SET @@global.lock_wait_timeout= @old_lock_wait_timeout;
+SET @@global.innodb_lock_wait_timeout= @old_innodb_lock_wait_timeout;

=== modified file 'mysql-test/t/partition_mgm.test'
--- a/mysql-test/t/partition_mgm.test	2009-04-17 20:00:53 +0000
+++ b/mysql-test/t/partition_mgm.test	2014-03-24 11:45:19 +0000
@@ -3,6 +3,46 @@
 DROP TABLE IF EXISTS t1;
 --enable_warnings
 
+--echo #
+--echo # Bug#13357766: ASSERT IN HANDLER::HA_CREATE
+--echo #
+CREATE TABLE t1
+(a INT)
+PARTITION BY KEY(a) PARTITIONS 3;
+ALTER TABLE t1 REPAIR PARTITION p2,p3,p1;
+ALTER TABLE t1 ORDER BY a; 
+DROP TABLE t1;
+
+--echo #
+--echo # Bug#11764110/bug#56909: REORGANIZE PARTITION is allowed on
+--echo #                         HASH/KEY partitioned tables
+--echo #
+CREATE TABLE t1 (a INT PRIMARY KEY)
+ENGINE MYISAM
+PARTITION BY HASH (a)
+PARTITIONS 1;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
+INSERT INTO t1 VALUES (12), (13), (14), (15), (16), (17), (18), (19), (20);
+--echo # This changes from auto partitioned to manual partitioned
+ALTER TABLE t1 REORGANIZE PARTITION p0 INTO (PARTITION pHidden);
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
+ALTER TABLE t1 ADD PARTITION
+(PARTITION pNamed1);
+ALTER TABLE t1 ADD PARTITION
+(PARTITION pNamed2);
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p5);
+--error ER_SAME_NAME_PARTITION
+ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 REBUILD PARTITION all;
+ALTER TABLE t1 REBUILD PARTITION pNamed1,p5;
+ALTER TABLE t1 COALESCE PARTITION 1;
+ALTER TABLE t1 COALESCE PARTITION 2;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
 #
 # Bug 40389: REORGANIZE PARTITION crashes when only using one partition
 #

=== modified file 'mysql-test/t/partition_myisam.test'
--- a/mysql-test/t/partition_myisam.test	2013-11-20 11:05:39 +0000
+++ b/mysql-test/t/partition_myisam.test	2014-03-24 11:45:19 +0000
@@ -10,6 +10,27 @@ DROP TABLE IF EXISTS t1, t2;
 let $MYSQLD_DATADIR= `SELECT @@datadir`;
 
 --echo #
+--echo # Bug#11763825/56590: PARTITIONS: FULLTEXT SEARCHES FAIL
+--echo # (bad/confusing error message)
+CREATE TABLE t1
+(a INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
+ b VARCHAR(200),
+ c TEXT)
+ENGINE=MyISAM
+PARTITION BY HASH(a) PARTITIONS 1;
+--error ER_TABLE_CANT_HANDLE_FT
+CREATE FULLTEXT INDEX msg ON t1 (b, c);
+DROP TABLE t1;
+--error ER_TABLE_CANT_HANDLE_FT
+CREATE TABLE t1
+(a INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
+ b VARCHAR(200),
+ c TEXT,
+ FULLTEXT (b, c))
+ENGINE=MyISAM
+PARTITION BY HASH(a) PARTITIONS 1;
+
+--echo #
 --echo # BUG#11933226 - 60681: CHECKSUM TABLE RETURNS 0 FOR PARTITIONED TABLE
 --echo #
 CREATE TABLE t1 (

=== modified file 'mysql-test/t/show_check.test'
--- a/mysql-test/t/show_check.test	2013-09-14 01:09:36 +0000
+++ b/mysql-test/t/show_check.test	2014-03-24 11:45:19 +0000
@@ -1375,6 +1375,27 @@ SET NAMES latin1;
 
 
 --echo #
+--echo # Bug#58996 SHOW CREATE TRIGGER fails when subject table is shadowed by
+--echo #           a temporary table.
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 (a INT);
+CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW BEGIN END;
+SHOW CREATE TRIGGER t1_bi;
+
+CREATE TEMPORARY TABLE t1 (b INT);
+# Should still work
+SHOW CREATE TRIGGER t1_bi;
+
+DROP TEMPORARY TABLE t1;
+DROP TABLE t1;
+
+
+--echo #
 --echo # WL#6454: Deprecate SHOW AUTHORS and SHOW CONTRIBUTORS
 --echo #
 

=== modified file 'mysql-test/t/ssl.test'
--- a/mysql-test/t/ssl.test	2012-08-14 14:23:34 +0000
+++ b/mysql-test/t/ssl.test	2014-03-24 11:45:19 +0000
@@ -26,6 +26,32 @@ SHOW STATUS LIKE 'Ssl_cipher';
 connection default;
 disconnect ssl_con;
 
+--echo #
+--echo # Bug#54790: Use of non-blocking mode for sockets limits performance
+--echo #
+
+--echo # Open ssl_con and set a timeout.
+connect (ssl_con,localhost,root,,,,,SSL);
+
+LET $ID= `SELECT connection_id()`;
+SET @@SESSION.wait_timeout = 2;
+
+--echo # Wait for ssl_con to be disconnected.
+connection default;
+let $wait_condition=
+  SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST
+  WHERE ID = $ID;
+--source include/wait_condition.inc
+
+--echo # Check that ssl_con has been disconnected.
+connection ssl_con;
+--echo # CR_SERVER_LOST, CR_SERVER_GONE_ERROR
+--error 2006,2013
+SELECT 1;
+
+connection default;
+disconnect ssl_con;
+
 # Wait till all disconnects are completed
 --source include/wait_until_count_sessions.inc
 

=== modified file 'mysql-test/t/subselect_notembedded.test'
--- a/mysql-test/t/subselect_notembedded.test	2010-03-20 12:01:47 +0000
+++ b/mysql-test/t/subselect_notembedded.test	2014-03-24 11:45:19 +0000
@@ -60,3 +60,16 @@ while ($nesting)
 drop table t1;
 
 --echo End of 5.1 tests
+
+#
+# BUG#33245 "Crash on VIEW referencing FROM table in an IN clause"
+# (this is a second copy of testcase that uses disconnect/connect commands
+#  which increase probability of crash)
+--disconnect default
+--connect (default,localhost,root,,test)
+CREATE TABLE t1 (f1 INT NOT NULL);
+CREATE VIEW v1 (a) AS SELECT f1 IN (SELECT f1 FROM t1) FROM t1;
+SELECT * FROM v1;
+drop view v1;
+drop table t1;
+



More information about the commits mailing list