summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-03-28 01:04:46 +0200
committerSergei Golubchik <sergii@pisem.net>2012-03-28 01:04:46 +0200
commit20e706689df1eb87c696304797e9d6184c0a75bb (patch)
treeff3eab8fa3e060b34687c6e9819cb559ac67d5c5 /mysql-test/r
parent3d0775e9af2fcf3fe92b7f19e299ea23068eca1e (diff)
parentbfaebe3f5e4b917c4498e234bad7a9d45d07ca62 (diff)
downloadmariadb-git-20e706689df1eb87c696304797e9d6184c0a75bb.tar.gz
mysql-5.5.22 merge
mysql-test/suite/innodb/t/group_commit_crash.test: remove autoincrement to avoid rbr being used for insert ... select mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test: remove autoincrement to avoid rbr being used for insert ... select mysys/my_addr_resolve.c: a pointer to a buffer is returned to the caller -> the buffer cannot be on the stack mysys/stacktrace.c: my_vsnprintf() is ok here, in 5.5
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/bug13633383.result53
-rw-r--r--mysql-test/r/join_outer.result58
-rw-r--r--mysql-test/r/join_outer_jcl6.result58
-rw-r--r--mysql-test/r/multi_update.result7
-rw-r--r--mysql-test/r/myisam.result13
-rw-r--r--mysql-test/r/partition.result40
-rw-r--r--mysql-test/r/partition_error.result26
-rw-r--r--mysql-test/r/ps.result1
-rw-r--r--mysql-test/r/sp-bugs.result19
-rw-r--r--mysql-test/r/sp.result23
10 files changed, 296 insertions, 2 deletions
diff --git a/mysql-test/r/bug13633383.result b/mysql-test/r/bug13633383.result
new file mode 100644
index 00000000000..89b522724f9
--- /dev/null
+++ b/mysql-test/r/bug13633383.result
@@ -0,0 +1,53 @@
+#
+# Bug#13633383 63183: SMALL SORT_BUFFER_SIZE CRASH IN MERGE_BUFFERS
+#
+CREATE TABLE t1 (
+`a` int(11) DEFAULT NULL,
+`col432` bit(8) DEFAULT NULL,
+`col433` multipoint DEFAULT NULL,
+`col434` polygon DEFAULT NULL,
+`col435` decimal(50,17) unsigned DEFAULT NULL,
+`col436` geometry NOT NULL,
+`col437` tinyblob NOT NULL,
+`col438` multipolygon DEFAULT NULL,
+`col439` mediumblob NOT NULL,
+`col440` tinyblob NOT NULL,
+`col441` double unsigned DEFAULT NULL
+);
+CREATE TABLE t2 (
+`a` multipoint DEFAULT NULL,
+`col460` date DEFAULT NULL,
+`col461` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+`col462` date NOT NULL,
+`col463` varbinary(89) NOT NULL,
+`col464` year(4) DEFAULT NULL,
+`col465` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+`col466` varchar(236) CHARACTER SET utf8 NOT NULL,
+`col467` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
+);
+CREATE TABLE t3 (
+`FTS_DOC_ID` bigint(20) unsigned NOT NULL,
+`col577` datetime DEFAULT NULL,
+`col579` bit(38) NOT NULL,
+`col580` varchar(93) NOT NULL,
+`col581` datetime DEFAULT NULL,
+`col583` multipolygon DEFAULT NULL,
+`col584` bit(47) NOT NULL
+);
+set session sort_buffer_size= 32768;
+select col435
+from t3
+natural right outer join t1
+natural right outer join t2 a
+left outer join t2 b on 1
+group by
+repeat('a',10000) desc,
+repeat('a',10000)
+with rollup
+;
+col435
+0.00000000000000000
+0.00000000000000000
+0.00000000000000000
+set session sort_buffer_size= default;
+DROP TABLE t1, t2, t3;
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result
index 163043c2cef..ebe8255fd8b 100644
--- a/mysql-test/r/join_outer.result
+++ b/mysql-test/r/join_outer.result
@@ -1648,6 +1648,64 @@ NULL
NULL
NULL
DROP TABLE h,m,k;
+
+# BUG#12567331 - INFINITE LOOP WHEN RESOLVING AN ALIASED COLUMN
+# USED IN GROUP BY
+
+CREATE TABLE t1 (
+col_varchar_1024_latin1_key varchar(1024),
+col_varchar_10_latin1 varchar(10),
+col_int int(11),
+pk int(11)
+);
+CREATE TABLE t2 (
+col_int_key int(11),
+col_int int(11),
+pk int(11)
+);
+PREPARE prep_stmt_9846 FROM '
+SELECT alias1.pk AS field1 FROM
+t1 AS alias1
+LEFT JOIN
+(
+ t2 AS alias2
+ RIGHT JOIN
+ (
+ t2 AS alias3
+ JOIN t1 AS alias4
+ ON 1
+ )
+ ON 1
+)
+ON 1
+GROUP BY field1';
+execute prep_stmt_9846;
+field1
+execute prep_stmt_9846;
+field1
+drop table t1,t2;
+#
+# Bug #11765810 58813: SERVER THREAD HANGS WHEN JOIN + WHERE + GROUP BY
+# IS EXECUTED TWICE FROM P
+#
+CREATE TABLE t1 ( a INT ) ENGINE = MYISAM;
+INSERT INTO t1 VALUES (1);
+PREPARE prep_stmt FROM '
+ SELECT 1 AS f FROM t1
+ LEFT JOIN t1 t2
+ RIGHT JOIN t1 t3
+ JOIN t1 t4
+ ON 1
+ ON 1
+ ON 1
+ GROUP BY f';
+EXECUTE prep_stmt;
+f
+1
+EXECUTE prep_stmt;
+f
+1
+DROP TABLE t1;
#
# Bug#49600: outer join of two single-row tables with joining attributes
# evaluated to nulls
diff --git a/mysql-test/r/join_outer_jcl6.result b/mysql-test/r/join_outer_jcl6.result
index b29c6241f14..3d0e4cbfc79 100644
--- a/mysql-test/r/join_outer_jcl6.result
+++ b/mysql-test/r/join_outer_jcl6.result
@@ -1659,6 +1659,64 @@ NULL
NULL
NULL
DROP TABLE h,m,k;
+
+# BUG#12567331 - INFINITE LOOP WHEN RESOLVING AN ALIASED COLUMN
+# USED IN GROUP BY
+
+CREATE TABLE t1 (
+col_varchar_1024_latin1_key varchar(1024),
+col_varchar_10_latin1 varchar(10),
+col_int int(11),
+pk int(11)
+);
+CREATE TABLE t2 (
+col_int_key int(11),
+col_int int(11),
+pk int(11)
+);
+PREPARE prep_stmt_9846 FROM '
+SELECT alias1.pk AS field1 FROM
+t1 AS alias1
+LEFT JOIN
+(
+ t2 AS alias2
+ RIGHT JOIN
+ (
+ t2 AS alias3
+ JOIN t1 AS alias4
+ ON 1
+ )
+ ON 1
+)
+ON 1
+GROUP BY field1';
+execute prep_stmt_9846;
+field1
+execute prep_stmt_9846;
+field1
+drop table t1,t2;
+#
+# Bug #11765810 58813: SERVER THREAD HANGS WHEN JOIN + WHERE + GROUP BY
+# IS EXECUTED TWICE FROM P
+#
+CREATE TABLE t1 ( a INT ) ENGINE = MYISAM;
+INSERT INTO t1 VALUES (1);
+PREPARE prep_stmt FROM '
+ SELECT 1 AS f FROM t1
+ LEFT JOIN t1 t2
+ RIGHT JOIN t1 t3
+ JOIN t1 t4
+ ON 1
+ ON 1
+ ON 1
+ GROUP BY f';
+EXECUTE prep_stmt;
+f
+1
+EXECUTE prep_stmt;
+f
+1
+DROP TABLE t1;
#
# Bug#49600: outer join of two single-row tables with joining attributes
# evaluated to nulls
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result
index ca72521a819..e991326cdce 100644
--- a/mysql-test/r/multi_update.result
+++ b/mysql-test/r/multi_update.result
@@ -1,3 +1,4 @@
+CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
drop table if exists t1,t2,t3;
drop database if exists mysqltest;
drop view if exists v1;
@@ -605,7 +606,8 @@ a b
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; UPDATE t2,t1 SET t2.a=t1.a+2
+master-bin.000001 # Table_map # # table_id: # (test.t2)
+master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
delete from t1;
delete from t2;
@@ -617,7 +619,8 @@ ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a
+master-bin.000001 # Table_map # # table_id: # (test.t2)
+master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
drop table t1, t2;
set @@session.binlog_format= @sav_binlog_format;
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 2a2197e7f98..64c61d4ee36 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -2494,6 +2494,19 @@ Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
SET GLOBAL myisam_use_mmap=default;
+#
+# BUG 11756869 - 48848: MYISAMCHK DOING SORT RECOVER IN CERTAIN
+# CASES RESETS DATA POINTER TO SMAL
+#
+CREATE TABLE t1(a INT, KEY(a));
+ALTER TABLE t1 DISABLE KEYS;
+SET @before:= (SELECT MAX_DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test');
+FLUSH TABLES;
+SET @after:= (SELECT MAX_DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test');
+SELECT @before=@after;
+@before=@after
+1
+DROP TABLE t1;
End of 5.1 tests
#
# Bug#51327 MyISAM table is automatically repaired on ALTER
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index 7c38fa18faa..1bc1ea31671 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -2354,6 +2354,46 @@ TRUNCATE TABLE t1;
INSERT INTO t1 VALUES(0);
DROP TABLE t1;
SET GLOBAL myisam_use_mmap=default;
+#
+# Bug#13580775 ASSERTION FAILED: RECORD_LENGTH == M_RECORD_LENGTH,
+# FILE FILESORT_UTILS.CC
+#
+CREATE TABLE t1 (
+a INT PRIMARY KEY,
+b INT,
+c CHAR(1),
+d INT,
+KEY (c,d)
+) PARTITION BY KEY () PARTITIONS 1;
+INSERT INTO t1 VALUES (1,1,'a',1), (2,2,'a',1);
+SELECT 1 FROM t1 WHERE 1 IN
+(SELECT group_concat(b)
+FROM t1
+WHERE c > geomfromtext('point(1 1)')
+GROUP BY b
+);
+1
+1
+1
+DROP TABLE t1;
+#
+# Bug#13011410 CRASH IN FILESORT CODE WITH GROUP BY/ROLLUP
+#
+CREATE TABLE t1 (
+a INT,
+b MEDIUMINT,
+c VARCHAR(300) CHARACTER SET hp8 COLLATE hp8_bin,
+PRIMARY KEY (a,c(299)))
+ENGINE=myisam
+PARTITION BY LINEAR KEY () PARTITIONS 2;
+INSERT INTO t1 VALUES (1,2,'test'), (2,3,'hi'), (4,5,'bye');
+SELECT 1 FROM t1 WHERE b < SOME
+( SELECT 1 FROM t1 WHERE a >= 1
+GROUP BY b WITH ROLLUP
+HAVING b > geomfromtext("")
+);
+1
+DROP TABLE t1;
End of 5.1 tests
#
# BUG#55385: UPDATE statement throws an error, but still updates
diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result
index 5cba49645b4..851c97c5ec3 100644
--- a/mysql-test/r/partition_error.result
+++ b/mysql-test/r/partition_error.result
@@ -1,5 +1,31 @@
drop table if exists t1, t2;
#
+# Bug#13608188 - 64038: CRASH IN HANDLER::HA_THD ON ALTER TABLE AFTER
+# REPAIR NON-EXISTING PARTITION
+#
+CREATE TABLE t1 ( a INT, b INT );
+INSERT INTO t1 VALUES (5,3),(5,6);
+ALTER TABLE t1 PARTITION BY KEY(b) PARTITIONS 3 ;
+ALTER TABLE t1 REPAIR PARTITION p1, p3;
+Table Op Msg_type Msg_text
+test.t1 repair error Error in list of partitions to test.t1
+ALTER TABLE t1 ORDER BY b;
+DROP TABLE t1;
+#
+# Bug#13593865 - 64037: CRASH IN HA_PARTITION::CREATE_HANDLERS ON
+# ALTER TABLE AFTER DROP PARTITION
+#
+CREATE TABLE t1 (a INT)
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (0),
+PARTITION p1 VALUES LESS THAN MAXVALUE ) ;
+ALTER TABLE t1 DROP PARTITION p1;
+ALTER TABLE t1 ANALYZE PARTITION p0, p1;
+Table Op Msg_type Msg_text
+test.t1 analyze error Error in list of partitions to test.t1
+ALTER TABLE t1 COMMENT 'altered';
+DROP TABLE t1;
+#
# Bug#57924: crash when creating partitioned table with
# multiple columns in the partition key
#
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index b4a09091aa6..5f04544e0fb 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -1,3 +1,4 @@
+call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.');
drop table if exists t1,t2,t3,t4;
drop database if exists client_test_db;
create table t1
diff --git a/mysql-test/r/sp-bugs.result b/mysql-test/r/sp-bugs.result
index 2425f40d9c2..7d08ffb2f71 100644
--- a/mysql-test/r/sp-bugs.result
+++ b/mysql-test/r/sp-bugs.result
@@ -111,4 +111,23 @@ DROP FUNCTION db1.f1;
DROP TABLE db1.t1;
DROP DATABASE db1;
DROP DATABASE db2;
+#
+# Bug#13105873:valgrind warning:possible crash in foreign
+# key handling on subsequent create table if not exists
+#
+DROP DATABASE IF EXISTS testdb;
+CREATE DATABASE testdb;
+USE testdb;
+CREATE TABLE t1 (id1 INT PRIMARY KEY);
+CREATE PROCEDURE `p1`()
+BEGIN
+CREATE TABLE IF NOT EXISTS t2(id INT PRIMARY KEY,
+CONSTRAINT FK FOREIGN KEY (id) REFERENCES t1( id1 ));
+END$
+CALL p1();
+# below stmt should not return valgrind warnings
+CALL p1();
+Warnings:
+Note 1050 Table 't2' already exists
+DROP DATABASE testdb;
End of 5.1 tests
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index c8743ab112d..ad54f9c0fdf 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -7746,3 +7746,26 @@ DROP PROCEDURE p1;
DROP PROCEDURE p2;
DROP TABLE t1;
# End of 5.5 test
+#
+# Bug#12663165 SP DEAD CODE REMOVAL DOESN'T UNDERSTAND CONTINUE HANDLERS
+#
+DROP FUNCTION IF EXISTS f1;
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION RETURN f1();
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION RETURN f1();
+RETURN f1();
+END;
+END;
+RETURN 1;
+END $
+SELECT f1();
+f1()
+1
+Warnings:
+Error 1424 Recursive stored functions and triggers are not allowed.
+Error 1305 FUNCTION test.f1 does not exist
+DROP FUNCTION f1;