mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
merge from 5.5 main
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
# in alphabetical order. This also helps with merge conflict resolution.
|
||||
|
||||
binlog.binlog_multi_engine # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
binlog.binlog_bug23533 # WL#5867: skozlov: test case moved from unused bugs suite
|
||||
binlog.binlog_bug36391 # WL#5867: skozlov: test case moved from unused bugs suite
|
||||
|
||||
|
||||
funcs_1.charset_collation_1 # depends on compile-time decisions
|
||||
|
||||
@@ -15,18 +18,11 @@ main.type_float @freebsd # Bug#38965 2010-05-04 alik test cases
|
||||
main.wait_timeout @solaris # Bug#51244 2010-04-26 alik wait_timeout fails on OpenSolaris
|
||||
|
||||
rpl.rpl_innodb_bug28430 # Bug#46029
|
||||
rpl.rpl_bug37426 # WL#5867: skozlov: test case moved from unused bugs suite
|
||||
|
||||
sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
sys_vars.plugin_dir_basic # Bug#52223 2010-11-24 alik Test "plugin_dir_basic" does not support RPM build (test) directory structure
|
||||
sys_vars.slow_query_log_func @solaris # Bug#54819 2010-06-26 alik sys_vars.slow_query_log_func fails sporadically on Solaris 10
|
||||
sys_vars.wait_timeout_func # Bug#41255 2010-04-26 alik wait_timeout_func fails
|
||||
sys_vars.sys_vars # Bug #59148 2011-01-10 joro 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
|
||||
sys_vars.rpl_semi_sync_master_enabled_basic # Bug #59148 2011-01-10 joro 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
|
||||
sys_vars.rpl_semi_sync_master_timeout_basic # Bug #59148 2011-01-10 joro 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
|
||||
sys_vars.rpl_semi_sync_master_trace_level_basic # Bug #59148 2011-01-10 joro 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
|
||||
sys_vars.rpl_semi_sync_master_wait_no_slave_basic # Bug #59148 2011-01-10 joro 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
|
||||
rpl.rpl_semi_sync_event # Bug #59148 2011-02-02 svoj 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
|
||||
rpl.rpl_semi_sync # Bug #59148 2011-02-02 svoj 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
|
||||
|
||||
# BUG #59055 : All ndb tests should be removed from the repository
|
||||
# Leaving the sys_vars tests for now. sys_vars.all_vars.test fails on removing ndb tests
|
||||
|
||||
@@ -1765,6 +1765,22 @@ SELECT
|
||||
HEX(DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY)) AS field_date,
|
||||
HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS field_datetime;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11926811 / Bug#60625 Illegal mix of collations
|
||||
--echo #
|
||||
SELECT @@collation_connection;
|
||||
DELIMITER //;
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE v_LastPaymentDate DATETIME DEFAULT NULL;
|
||||
SELECT v_LastPaymentDate < NOW();
|
||||
EXPLAIN EXTENDED SELECT v_LastPaymentDate < NOW();
|
||||
SHOW WARNINGS;
|
||||
EXPLAIN EXTENDED SELECT CONCAT(v_LastPaymentDate, NOW());
|
||||
END//
|
||||
DELIMITER ;//
|
||||
CALL p1;
|
||||
DROP PROCEDURE p1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
|
||||
@@ -1391,3 +1391,16 @@ CREATE DATABASE db1 CHARACTER SET utf8;
|
||||
CREATE TABLE db1.t1 (bar TINYTEXT, KEY (bar(100)));
|
||||
ALTER TABLE db1.t1 ADD baz INT;
|
||||
DROP DATABASE db1;
|
||||
#
|
||||
# Bug#11938039 RE-EXECUTION OF FRM-ONLY ALTER TABLE WITH RENAME
|
||||
# CLAUSE FAILS OR ABORTS SERVER.
|
||||
#
|
||||
drop table if exists t1;
|
||||
create table t1 (a int);
|
||||
prepare stmt1 from 'alter table t1 alter column a set default 1, rename to t2';
|
||||
execute stmt1;
|
||||
rename table t2 to t1;
|
||||
# The below statement should succeed and not emit error or abort server.
|
||||
execute stmt1;
|
||||
deallocate prepare stmt1;
|
||||
drop table t2;
|
||||
|
||||
@@ -2807,6 +2807,32 @@ HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS fie
|
||||
field_str1 field1_str2 field_date field_datetime
|
||||
323030372D30382D30322032333A35393A3030 323030372D30382D30332031373A33323A3030 323030372D30382D3032 323030372D30382D30332031373A33323A3030
|
||||
#
|
||||
# Bug#11926811 / Bug#60625 Illegal mix of collations
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
binary
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE v_LastPaymentDate DATETIME DEFAULT NULL;
|
||||
SELECT v_LastPaymentDate < NOW();
|
||||
EXPLAIN EXTENDED SELECT v_LastPaymentDate < NOW();
|
||||
SHOW WARNINGS;
|
||||
EXPLAIN EXTENDED SELECT CONCAT(v_LastPaymentDate, NOW());
|
||||
END//
|
||||
CALL p1;
|
||||
v_LastPaymentDate < NOW()
|
||||
NULL
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Level Code Message
|
||||
Note 1003 select (v_LastPaymentDate@0 < now()) AS `v_LastPaymentDate < NOW()`
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 select concat(v_LastPaymentDate@0,now()) AS `CONCAT(v_LastPaymentDate, NOW())`
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
#
|
||||
CREATE FUNCTION f1() RETURNS TIME RETURN 1;
|
||||
|
||||
@@ -3199,6 +3199,32 @@ HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS fie
|
||||
field_str1 field1_str2 field_date field_datetime
|
||||
323030372D30382D30322032333A35393A3030 323030372D30382D30332031373A33323A3030 323030372D30382D3032 323030372D30382D30332031373A33323A3030
|
||||
#
|
||||
# Bug#11926811 / Bug#60625 Illegal mix of collations
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
cp1251_general_ci
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE v_LastPaymentDate DATETIME DEFAULT NULL;
|
||||
SELECT v_LastPaymentDate < NOW();
|
||||
EXPLAIN EXTENDED SELECT v_LastPaymentDate < NOW();
|
||||
SHOW WARNINGS;
|
||||
EXPLAIN EXTENDED SELECT CONCAT(v_LastPaymentDate, NOW());
|
||||
END//
|
||||
CALL p1;
|
||||
v_LastPaymentDate < NOW()
|
||||
NULL
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Level Code Message
|
||||
Note 1003 select (v_LastPaymentDate@0 < now()) AS `v_LastPaymentDate < NOW()`
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 select concat(convert(v_LastPaymentDate@0 using cp1251),now()) AS `CONCAT(v_LastPaymentDate, NOW())`
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
#
|
||||
CREATE FUNCTION f1() RETURNS TIME RETURN 1;
|
||||
|
||||
@@ -3226,6 +3226,32 @@ HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS fie
|
||||
field_str1 field1_str2 field_date field_datetime
|
||||
323030372D30382D30322032333A35393A3030 323030372D30382D30332031373A33323A3030 323030372D30382D3032 323030372D30382D30332031373A33323A3030
|
||||
#
|
||||
# Bug#11926811 / Bug#60625 Illegal mix of collations
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
latin1_swedish_ci
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE v_LastPaymentDate DATETIME DEFAULT NULL;
|
||||
SELECT v_LastPaymentDate < NOW();
|
||||
EXPLAIN EXTENDED SELECT v_LastPaymentDate < NOW();
|
||||
SHOW WARNINGS;
|
||||
EXPLAIN EXTENDED SELECT CONCAT(v_LastPaymentDate, NOW());
|
||||
END//
|
||||
CALL p1;
|
||||
v_LastPaymentDate < NOW()
|
||||
NULL
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Level Code Message
|
||||
Note 1003 select (v_LastPaymentDate@0 < now()) AS `v_LastPaymentDate < NOW()`
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 select concat(v_LastPaymentDate@0,now()) AS `CONCAT(v_LastPaymentDate, NOW())`
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
#
|
||||
CREATE FUNCTION f1() RETURNS TIME RETURN 1;
|
||||
|
||||
@@ -4060,6 +4060,32 @@ HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS fie
|
||||
field_str1 field1_str2 field_date field_datetime
|
||||
0032003000300037002D00300038002D00300032002000320033003A00350039003A00300030 0032003000300037002D00300038002D00300033002000310037003A00330032003A00300030 323030372D30382D3032 323030372D30382D30332031373A33323A3030
|
||||
#
|
||||
# Bug#11926811 / Bug#60625 Illegal mix of collations
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
ucs2_general_ci
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE v_LastPaymentDate DATETIME DEFAULT NULL;
|
||||
SELECT v_LastPaymentDate < NOW();
|
||||
EXPLAIN EXTENDED SELECT v_LastPaymentDate < NOW();
|
||||
SHOW WARNINGS;
|
||||
EXPLAIN EXTENDED SELECT CONCAT(v_LastPaymentDate, NOW());
|
||||
END//
|
||||
CALL p1;
|
||||
v_LastPaymentDate < NOW()
|
||||
NULL
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Level Code Message
|
||||
Note 1003 select (v_LastPaymentDate@0 < now()) AS `v_LastPaymentDate < NOW()`
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 select concat(convert(v_LastPaymentDate@0 using ucs2),convert(now() using ucs2)) AS `CONCAT(v_LastPaymentDate, NOW())`
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
#
|
||||
CREATE FUNCTION f1() RETURNS TIME RETURN 1;
|
||||
|
||||
@@ -4938,6 +4938,32 @@ HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS fie
|
||||
field_str1 field1_str2 field_date field_datetime
|
||||
323030372D30382D30322032333A35393A3030 323030372D30382D30332031373A33323A3030 323030372D30382D3032 323030372D30382D30332031373A33323A3030
|
||||
#
|
||||
# Bug#11926811 / Bug#60625 Illegal mix of collations
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
utf8_general_ci
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE v_LastPaymentDate DATETIME DEFAULT NULL;
|
||||
SELECT v_LastPaymentDate < NOW();
|
||||
EXPLAIN EXTENDED SELECT v_LastPaymentDate < NOW();
|
||||
SHOW WARNINGS;
|
||||
EXPLAIN EXTENDED SELECT CONCAT(v_LastPaymentDate, NOW());
|
||||
END//
|
||||
CALL p1;
|
||||
v_LastPaymentDate < NOW()
|
||||
NULL
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Level Code Message
|
||||
Note 1003 select (v_LastPaymentDate@0 < now()) AS `v_LastPaymentDate < NOW()`
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 select concat(convert(v_LastPaymentDate@0 using utf8),now()) AS `CONCAT(v_LastPaymentDate, NOW())`
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
#
|
||||
CREATE FUNCTION f1() RETURNS TIME RETURN 1;
|
||||
|
||||
@@ -135,4 +135,17 @@ SELECT * FROM t1 PROCEDURE ANALYSE();
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t1.a e e- 1 2 0 0 1.3333 NULL ENUM('e','e-') NOT NULL
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11756242 48137: PROCEDURE ANALYSE() LEAKS MEMORY WHEN RETURNING NULL
|
||||
#
|
||||
CREATE TABLE t1(f1 INT) ENGINE=MYISAM;
|
||||
CREATE TABLE t2(f2 INT) ENGINE=INNODB;
|
||||
INSERT INTO t2 VALUES (1);
|
||||
SELECT DISTINCTROW f1 FROM t1 NATURAL RIGHT OUTER JOIN t2 PROCEDURE ANALYSE();
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t1.f1 NULL NULL 0 0 0 1 0.0 0.0 CHAR(0)
|
||||
SELECT * FROM t2 LIMIT 1 PROCEDURE ANALYSE();
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t2.f2 1 1 1 1 0 0 1.0000 0.0000 ENUM('1') NOT NULL
|
||||
DROP TABLE t1, t2;
|
||||
End of 5.1 tests
|
||||
|
||||
@@ -1746,6 +1746,17 @@ MAX(LENGTH(a)) LENGTH(MAX(a)) MIN(a) MAX(a) CONCAT(MIN(a)) CONCAT(MAX(a))
|
||||
20 20 18446668621106209655 18446668621106209655 18446668621106209655 18446668621106209655
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #11766270 59343: YEAR(4): INCORRECT RESULT AND VALGRIND WARNINGS WITH MIN/MAX, UNION
|
||||
#
|
||||
CREATE TABLE t1(f1 YEAR(4));
|
||||
INSERT INTO t1 VALUES (0000),(2001);
|
||||
(SELECT MAX(f1) FROM t1) UNION (SELECT MAX(f1) FROM t1);
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def MAX(f1) MAX(f1) 13 4 4 Y 32864 0 63
|
||||
MAX(f1)
|
||||
2001
|
||||
DROP TABLE t1;
|
||||
#
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug#52123 Assertion failed: aggregator == aggr->Aggrtype(),
|
||||
|
||||
@@ -770,4 +770,10 @@ CASE a WHEN a THEN a END
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #11766212 59270: NOT IN (YEAR( ... ), ... ) PRODUCES MANY VALGRIND WARNINGS
|
||||
#
|
||||
SELECT 1 IN (YEAR(FROM_UNIXTIME(NULL)) ,1);
|
||||
1 IN (YEAR(FROM_UNIXTIME(NULL)) ,1)
|
||||
1
|
||||
#
|
||||
End of 5.1 tests
|
||||
|
||||
@@ -532,4 +532,11 @@ a
|
||||
0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U
|
||||
#
|
||||
CREATE TABLE t1(f1 INT);
|
||||
SELECT 0xE1BB30 INTO OUTFILE 't1.dat';
|
||||
LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
||||
@@ -225,3 +225,25 @@ DROP SCHEMA IF EXISTS `mysqlslap`;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
CREATE PROCEDURE p1() SELECT 1;
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug #11765157 - 58090: mysqlslap drops schema specified in
|
||||
# create_schema if auto-generate-sql also set.
|
||||
#
|
||||
# 'bug58090' database should not be present.
|
||||
SHOW DATABASES;
|
||||
Database
|
||||
information_schema
|
||||
mtr
|
||||
mysql
|
||||
performance_schema
|
||||
test
|
||||
# 'bug58090' database should be present.
|
||||
SHOW DATABASES;
|
||||
Database
|
||||
information_schema
|
||||
bug58090
|
||||
mtr
|
||||
mysql
|
||||
performance_schema
|
||||
test
|
||||
DROP DATABASE bug58090;
|
||||
|
||||
@@ -5058,6 +5058,24 @@ i
|
||||
DROP TABLE t1,t1s,t2s;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug #11765713 58705:
|
||||
# OPTIMIZER LET ENGINE DEPEND ON UNINITIALIZED VALUES
|
||||
# CREATED BY OPT_SUM_QUERY
|
||||
#
|
||||
CREATE TABLE t1(a INT NOT NULL, KEY (a));
|
||||
INSERT INTO t1 VALUES (0), (1);
|
||||
SELECT 1 as foo FROM t1 WHERE a < SOME
|
||||
(SELECT a FROM t1 WHERE a <=>
|
||||
(SELECT a FROM t1)
|
||||
);
|
||||
ERROR 21000: Subquery returns more than 1 row
|
||||
SELECT 1 as foo FROM t1 WHERE a < SOME
|
||||
(SELECT a FROM t1 WHERE a <=>
|
||||
(SELECT a FROM t1 where a is null)
|
||||
);
|
||||
foo
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #57704: Cleanup code dies with void TABLE::set_keyread(bool):
|
||||
# Assertion `file' failed.
|
||||
#
|
||||
|
||||
@@ -4012,6 +4012,15 @@ DROP TABLE t1;
|
||||
#
|
||||
CREATE VIEW v1 AS SELECT 1 IN (1 LIKE 2,0) AS f;
|
||||
DROP VIEW v1;
|
||||
#
|
||||
# Bug 11829681 - 60295: ERROR 1356 ON VIEW THAT EXECUTES FINE AS A QUERY
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE VIEW v1 AS SELECT s.* FROM t1 s, t1 b HAVING a;
|
||||
SELECT * FROM v1;
|
||||
a
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
# -----------------------------------------------------------------
|
||||
# -- End of 5.1 tests.
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
@@ -316,3 +316,25 @@ SHOW ERRORS;
|
||||
Level Code Message
|
||||
Error 1051 Unknown table 't1'
|
||||
End of 5.0 tests
|
||||
|
||||
-- Bug#55847
|
||||
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
CREATE TABLE t1(a INT UNIQUE);
|
||||
CREATE FUNCTION f1(x INT) RETURNS INT
|
||||
BEGIN
|
||||
INSERT INTO t1 VALUES(x);
|
||||
INSERT INTO t1 VALUES(x);
|
||||
RETURN x;
|
||||
END|
|
||||
|
||||
SHOW TABLES WHERE f1(11) = 11;
|
||||
ERROR 23000: Duplicate entry '11' for key 'a'
|
||||
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1062 Duplicate entry '11' for key 'a'
|
||||
|
||||
DROP TABLE t1;
|
||||
DROP FUNCTION f1;
|
||||
|
||||
@@ -166,3 +166,66 @@ ERROR XA102: XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was det
|
||||
XA END 'b';
|
||||
XA ROLLBACK 'b';
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11766752 59936: multiple xa assertions - transactional
|
||||
# statement fuzzer
|
||||
#
|
||||
CREATE TABLE t1 (a INT) engine=InnoDB;
|
||||
XA START 'a';
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SAVEPOINT savep;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the ACTIVE state
|
||||
XA END 'a';
|
||||
SELECT * FROM t1;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
|
||||
INSERT INTO t1 VALUES (2);
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
|
||||
SAVEPOINT savep;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
|
||||
SET @a=(SELECT * FROM t1);
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
|
||||
XA PREPARE 'a';
|
||||
SELECT * FROM t1;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
|
||||
INSERT INTO t1 VALUES (2);
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
|
||||
SAVEPOINT savep;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
|
||||
SET @a=(SELECT * FROM t1);
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
|
||||
UPDATE t1 SET a=1 WHERE a=2;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
|
||||
XA COMMIT 'a';
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#12352846 - TRANS_XA_START(THD*):
|
||||
# ASSERTION THD->TRANSACTION.XID_STATE.XID.IS_NULL()
|
||||
# FAILED
|
||||
#
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (a INT);
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
# Connection con2
|
||||
XA START 'xid1';
|
||||
# Sending:
|
||||
INSERT INTO t2 SELECT a FROM t1;
|
||||
# Connection default
|
||||
# Waiting until INSERT ... is blocked
|
||||
DELETE FROM t1;
|
||||
COMMIT;
|
||||
# Connection con2
|
||||
# Reaping: INSERT INTO t2 SELECT a FROM t1
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
XA COMMIT 'xid1';
|
||||
ERROR XA102: XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected
|
||||
XA START 'xid1';
|
||||
XA END 'xid1';
|
||||
XA PREPARE 'xid1';
|
||||
XA ROLLBACK 'xid1';
|
||||
# Connection default
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
16
mysql-test/suite/binlog/r/binlog_bug23533.result
Normal file
16
mysql-test/suite/binlog/r/binlog_bug23533.result
Normal file
@@ -0,0 +1,16 @@
|
||||
SET AUTOCOMMIT=0;
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1000
|
||||
SET @saved_max_binlog_cache_size=@@max_binlog_cache_size;
|
||||
SET GLOBAL max_binlog_cache_size=4096;
|
||||
START TRANSACTION;
|
||||
CREATE TABLE t2 SELECT * FROM t1;
|
||||
ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
|
||||
COMMIT;
|
||||
SHOW TABLES LIKE 't%';
|
||||
Tables_in_test (t%)
|
||||
t1
|
||||
SET GLOBAL max_binlog_cache_size=@saved_max_binlog_cache_size;
|
||||
DROP TABLE t1;
|
||||
10
mysql-test/suite/binlog/r/binlog_bug36391.result
Normal file
10
mysql-test/suite/binlog/r/binlog_bug36391.result
Normal file
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE t1(id INT);
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
t1
|
||||
FLUSH LOGS;
|
||||
DROP TABLE t1;
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
t1
|
||||
DROP TABLE t1;
|
||||
@@ -4,15 +4,13 @@
|
||||
#############################################################
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_log_bin.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
SET AUTOCOMMIT=0;
|
||||
SET GLOBAL max_binlog_cache_size=4096;
|
||||
SHOW VARIABLES LIKE 'max_binlog_cache_size';
|
||||
|
||||
# Create 1st table
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB;
|
||||
|
||||
--disable_query_log
|
||||
let $i= 1000;
|
||||
while ($i)
|
||||
@@ -21,16 +19,19 @@ while ($i)
|
||||
dec $i;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
# Set small value for max_binlog_cache_size
|
||||
SET @saved_max_binlog_cache_size=@@max_binlog_cache_size;
|
||||
SET GLOBAL max_binlog_cache_size=4096;
|
||||
|
||||
# Copied data from t1 into t2 large than max_binlog_cache_size
|
||||
START TRANSACTION;
|
||||
--error 1534
|
||||
--error 1197
|
||||
CREATE TABLE t2 SELECT * FROM t1;
|
||||
COMMIT;
|
||||
SHOW TABLES LIKE 't%';
|
||||
|
||||
|
||||
# 5.1 End of Test
|
||||
--source include/rpl_end.inc
|
||||
SET GLOBAL max_binlog_cache_size=@saved_max_binlog_cache_size;
|
||||
DROP TABLE t1;
|
||||
@@ -13,17 +13,18 @@
|
||||
#
|
||||
#
|
||||
|
||||
--source include/master-slave.inc
|
||||
--source include/have_log_bin.inc
|
||||
--source include/have_binlog_format_mixed.inc
|
||||
|
||||
create table t1(id int);
|
||||
CREATE TABLE t1(id INT);
|
||||
let $binlog= query_get_value(SHOW MASTER STATUS, File, 1);
|
||||
let $binlog_path= `SELECT CONCAT(@@DATADIR, '$binlog')`;
|
||||
SHOW TABLES;
|
||||
FLUSH LOGS;
|
||||
DROP TABLE t1;
|
||||
|
||||
show tables;
|
||||
--exec $MYSQL_BINLOG $binlog_path | $MYSQL test
|
||||
SHOW TABLES;
|
||||
|
||||
--source include/show_master_status.inc
|
||||
|
||||
flush logs;
|
||||
|
||||
--exec $MYSQL_BINLOG $MYSQL_TEST_DIR/var/log/master-bin.000001 | $MYSQL test
|
||||
|
||||
drop table t1;
|
||||
--source include/rpl_end.inc
|
||||
# Clean up
|
||||
DROP TABLE t1;
|
||||
@@ -1,8 +0,0 @@
|
||||
[row]
|
||||
binlog-format=row
|
||||
|
||||
[stmt]
|
||||
binlog-format=statement
|
||||
|
||||
[mix]
|
||||
binlog-format=mixed
|
||||
@@ -1,3 +0,0 @@
|
||||
a
|
||||
b
|
||||
c
|
||||
@@ -1,5 +0,0 @@
|
||||
INSTALL PLUGIN example SONAME 'ha_example.so';
|
||||
SELECT @@global.connect_timeout AS connect_timeout, @@global.local_infile AS local_infile;
|
||||
connect_timeout 4711
|
||||
local_infile 1
|
||||
UNINSTALL PLUGIN example;
|
||||
@@ -1,33 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
|
||||
**** On Master ****
|
||||
CREATE TABLE t1 (b CHAR(10));
|
||||
|
||||
**** On Slave ****
|
||||
STOP SLAVE;
|
||||
|
||||
**** On Master ****
|
||||
LOAD DATA INFILE FILENAME
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
3
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (b CHAR(10))
|
||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat' INTO TABLE `t1` FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`b`) ;file_id=#
|
||||
|
||||
**** On Slave ****
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
START SLAVE;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
|
||||
**** On Master ****
|
||||
DROP TABLE t1;
|
||||
@@ -1,23 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
SET AUTOCOMMIT=0;
|
||||
SET GLOBAL max_binlog_cache_size=4096;
|
||||
SHOW VARIABLES LIKE 'max_binlog_cache_size';
|
||||
Variable_name Value
|
||||
max_binlog_cache_size 4096
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1000
|
||||
START TRANSACTION;
|
||||
CREATE TABLE t2 SELECT * FROM t1;
|
||||
ERROR HY000: Writing one row to the row-based binary log failed
|
||||
COMMIT;
|
||||
SHOW TABLES LIKE 't%';
|
||||
Tables_in_test (t%)
|
||||
t1
|
||||
@@ -1,16 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('a');
|
||||
UPDATE t1 SET a = 'MyISAM';
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
MyISAM
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
MyISAM
|
||||
DROP TABLE t1;
|
||||
@@ -1,16 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE t1 ( a INT, b INT DEFAULT -3 );
|
||||
INSERT INTO t1 VALUES (1, DEFAULT);
|
||||
UPDATE t1 SET a = 3;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
3 -3
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
3 -3
|
||||
DROP TABLE t1;
|
||||
@@ -1,15 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
create table `t1` (`id` int not null auto_increment primary key);
|
||||
create trigger `trg` before insert on `t1` for each row begin end;
|
||||
set @@global.debug="+d,simulate_bug33029";
|
||||
stop slave;
|
||||
start slave;
|
||||
insert into `t1` values ();
|
||||
select * from t1;
|
||||
id
|
||||
1
|
||||
@@ -1,18 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
create table t1(id int);
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
|
||||
flush logs;
|
||||
drop table t1;
|
||||
@@ -1,17 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE char128_utf8 (
|
||||
i1 INT NOT NULL,
|
||||
c CHAR(128) CHARACTER SET utf8 NOT NULL,
|
||||
i2 INT NOT NULL);
|
||||
INSERT INTO char128_utf8 VALUES ( 1, "123", 1 );
|
||||
SELECT * FROM char128_utf8;
|
||||
i1 c i2
|
||||
1 123 1
|
||||
SELECT * FROM char128_utf8;
|
||||
i1 c i2
|
||||
1 123 1
|
||||
@@ -1,56 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
create table t1i(n int primary key) engine=innodb;
|
||||
create table t2m(n int primary key) engine=myisam;
|
||||
begin;
|
||||
insert into t1i values (1);
|
||||
insert into t1i values (2);
|
||||
insert into t1i values (3);
|
||||
commit;
|
||||
begin;
|
||||
insert into t1i values (5);
|
||||
begin;
|
||||
insert into t1i values (4);
|
||||
insert into t2m values (1);
|
||||
update t1i set n = 5 where n = 4;
|
||||
commit;
|
||||
zero
|
||||
0
|
||||
*** kill sql thread ***
|
||||
rollback;
|
||||
*** sql thread is *not* running: No ***
|
||||
*** the prove: the killed slave has not finished the current transaction ***
|
||||
three
|
||||
3
|
||||
one
|
||||
1
|
||||
zero
|
||||
0
|
||||
delete from t2m;
|
||||
start slave sql_thread;
|
||||
delete from t1i;
|
||||
delete from t2m;
|
||||
begin;
|
||||
insert into t1i values (5);
|
||||
begin;
|
||||
insert into t1i values (4);
|
||||
update t1i set n = 5 where n = 4;
|
||||
commit;
|
||||
zero
|
||||
0
|
||||
stop slave sql_thread;
|
||||
rollback;
|
||||
*** sql thread is *not* running: No ***
|
||||
*** the prove: the stopped slave has rolled back the current transaction ***
|
||||
zero
|
||||
0
|
||||
zero
|
||||
0
|
||||
one
|
||||
1
|
||||
start slave sql_thread;
|
||||
drop table t1i, t2m;
|
||||
@@ -1,2 +0,0 @@
|
||||
--defaults-file=std_data/bug57108.cnf
|
||||
$EXAMPLE_PLUGIN_OPT
|
||||
@@ -1,12 +0,0 @@
|
||||
--source include/not_windows_embedded.inc
|
||||
--source include/have_example_plugin.inc
|
||||
|
||||
# Test that we can install a plugin despite the fact that we have
|
||||
# switched directory after starting the server and am using a relative
|
||||
# --defaults-file.
|
||||
--replace_regex /\.dll/.so/
|
||||
eval INSTALL PLUGIN example SONAME '$EXAMPLE_PLUGIN';
|
||||
|
||||
--query_vertical SELECT @@global.connect_timeout AS connect_timeout, @@global.local_infile AS local_infile
|
||||
|
||||
UNINSTALL PLUGIN example;
|
||||
@@ -1,48 +0,0 @@
|
||||
# Bug#12691: Exec_master_log_pos corrupted with SQL_SLAVE_SKIP_COUNTER
|
||||
|
||||
--source include/master-slave.inc
|
||||
--source include/have_binlog_format_mixed_or_statement.inc
|
||||
|
||||
--echo
|
||||
--echo **** On Master ****
|
||||
CREATE TABLE t1 (b CHAR(10));
|
||||
--echo
|
||||
--echo **** On Slave ****
|
||||
--sync_slave_with_master
|
||||
STOP SLAVE;
|
||||
--source include/wait_for_slave_to_stop.inc
|
||||
|
||||
--connection master
|
||||
|
||||
--echo
|
||||
--echo **** On Master ****
|
||||
--exec cp $MYSQL_TEST_DIR/suite/bugs/data/rpl_bug12691.dat $MYSQLTEST_VARDIR/tmp/
|
||||
--echo LOAD DATA INFILE FILENAME
|
||||
--disable_query_log
|
||||
--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat' INTO TABLE t1 FIELDS TERMINATED BY '|'
|
||||
--enable_query_log
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat
|
||||
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
--save_master_pos
|
||||
|
||||
--connection slave
|
||||
--echo
|
||||
--echo **** On Slave ****
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
START SLAVE;
|
||||
--source include/wait_for_slave_to_start.inc
|
||||
--sync_with_master
|
||||
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
# Clean up
|
||||
--connection master
|
||||
--echo
|
||||
--echo **** On Master ****
|
||||
DROP TABLE t1;
|
||||
|
||||
--source include/rpl_end.inc
|
||||
@@ -1,25 +0,0 @@
|
||||
|
||||
# BUG#31582: 5.1-telco-6.1 -> 5.1.22. Slave crashes when reading
|
||||
# UPDATE for VARCHAR
|
||||
|
||||
# This is a problem for any update statement replicating from an old
|
||||
# server to a new server. The bug consisted of a new slave trying to
|
||||
# read two column bitmaps, but there is only one available in the old
|
||||
# format.
|
||||
|
||||
# This test case should be executed replicating from an old server to
|
||||
# a new server, so make sure you have one handy.
|
||||
|
||||
source include/master-slave.inc;
|
||||
|
||||
CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('a');
|
||||
UPDATE t1 SET a = 'MyISAM';
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
sync_slave_with_master;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
|
||||
--source include/rpl_end.inc
|
||||
@@ -1,25 +0,0 @@
|
||||
#
|
||||
# BUG#31583: 5.1-telco-6.1 -> 5.1.22. Slave returns Error in unknown event
|
||||
|
||||
# This is a problem for any update statement replicating from an old
|
||||
# server to a new server. The bug consisted of a new slave trying to
|
||||
# read two column bitmaps, but there is only one available in the old
|
||||
# format.
|
||||
|
||||
# This test case should be executed replicating from an old server to
|
||||
# a new server, so make sure you have one handy.
|
||||
|
||||
source include/master-slave.inc;
|
||||
|
||||
CREATE TABLE t1 ( a INT, b INT DEFAULT -3 );
|
||||
|
||||
INSERT INTO t1 VALUES (1, DEFAULT);
|
||||
UPDATE t1 SET a = 3;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
sync_slave_with_master;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
|
||||
--source include/rpl_end.inc
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# Bug #36443 Server crashes when executing insert when insert trigger on table
|
||||
#
|
||||
# Emulating the former bug#33029 situation to see that there is no crash anymore.
|
||||
#
|
||||
|
||||
|
||||
source include/master-slave.inc;
|
||||
|
||||
create table `t1` (`id` int not null auto_increment primary key);
|
||||
create trigger `trg` before insert on `t1` for each row begin end;
|
||||
|
||||
sync_slave_with_master;
|
||||
set @@global.debug="+d,simulate_bug33029";
|
||||
|
||||
stop slave;
|
||||
start slave;
|
||||
|
||||
connection master;
|
||||
|
||||
insert into `t1` values ();
|
||||
|
||||
sync_slave_with_master;
|
||||
select * from t1;
|
||||
|
||||
--source include/rpl_end.inc
|
||||
@@ -1,166 +0,0 @@
|
||||
#
|
||||
# Bug #38205 Row-based Replication (RBR) causes inconsistencies: HA_ERR_FOUND_DUPP_KEY
|
||||
# Bug#319 if while a non-transactional slave is replicating a transaction possible problem
|
||||
#
|
||||
# Verifying the fact that STOP SLAVE in the middle of a group execution waits
|
||||
# for the end of the group before the slave sql thread will stop.
|
||||
# The patch refines STOP SLAVE to not interrupt a transaction or other type of
|
||||
# the replication events group (the part I).
|
||||
# Killing the sql thread continues to provide a "hard" stop (the part II).
|
||||
#
|
||||
# Non-deterministic tests
|
||||
#
|
||||
|
||||
source include/master-slave.inc;
|
||||
source include/have_innodb.inc;
|
||||
|
||||
|
||||
#
|
||||
# Part II, killed sql slave leaves instantly
|
||||
#
|
||||
|
||||
# A. multi-statement transaction as the replication group
|
||||
|
||||
connection master;
|
||||
|
||||
create table t1i(n int primary key) engine=innodb;
|
||||
create table t2m(n int primary key) engine=myisam;
|
||||
|
||||
sync_slave_with_master;
|
||||
|
||||
connection master;
|
||||
|
||||
begin;
|
||||
insert into t1i values (1);
|
||||
insert into t1i values (2);
|
||||
insert into t1i values (3);
|
||||
commit;
|
||||
|
||||
sync_slave_with_master;
|
||||
|
||||
#
|
||||
# todo: first challenge is to find out the SQL thread id
|
||||
# the following is not fully reliable
|
||||
#
|
||||
|
||||
let $id=`SELECT id from information_schema.processlist where user like 'system user' and state like '%Has read all relay log%' or user like 'system user' and state like '%Reading event from the relay log%'`;
|
||||
connection slave;
|
||||
begin;
|
||||
insert into t1i values (5);
|
||||
|
||||
connection master;
|
||||
let $pos0_master= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
begin;
|
||||
insert into t1i values (4);
|
||||
insert into t2m values (1); # non-ta update
|
||||
update t1i set n = 5 where n = 4; # to block at. can't be played with killed
|
||||
commit;
|
||||
let $pos1_master= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
|
||||
connection slave;
|
||||
# slave sql thread must be locked out by the conn `slave' explicit lock
|
||||
let $pos0_slave= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
|
||||
--disable_query_log
|
||||
eval select $pos0_master - $pos0_slave as zero;
|
||||
--enable_query_log
|
||||
|
||||
connection slave1;
|
||||
|
||||
let $count= 1;
|
||||
let $table= t2m;
|
||||
source include/wait_until_rows_count.inc;
|
||||
#
|
||||
# todo: may fail as said above
|
||||
#
|
||||
--echo *** kill sql thread ***
|
||||
--disable_query_log
|
||||
eval kill connection $id;
|
||||
--enable_query_log
|
||||
|
||||
connection slave;
|
||||
rollback; # release the sql thread
|
||||
|
||||
connection slave1;
|
||||
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
let $sql_status= query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1);
|
||||
--echo *** sql thread is *not* running: $sql_status ***
|
||||
let $pos1_slave= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
|
||||
|
||||
connection slave;
|
||||
--echo *** the prove: the killed slave has not finished the current transaction ***
|
||||
|
||||
--disable_query_log
|
||||
select count(*) as three from t1i;
|
||||
eval select $pos1_master > $pos1_slave as one;
|
||||
eval select $pos1_slave - $pos0_slave as zero;
|
||||
--enable_query_log
|
||||
|
||||
delete from t2m; # remove the row to be able to replay
|
||||
start slave sql_thread;
|
||||
|
||||
#
|
||||
# Part I: B The homogenous transaction remains interuptable in between
|
||||
#
|
||||
|
||||
connection master;
|
||||
delete from t1i;
|
||||
delete from t2m;
|
||||
|
||||
sync_slave_with_master;
|
||||
begin;
|
||||
insert into t1i values (5);
|
||||
|
||||
connection master;
|
||||
let $pos0_master= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
begin;
|
||||
insert into t1i values (4);
|
||||
update t1i set n = 5 where n = 4; # to block at. not to be played
|
||||
commit;
|
||||
let $pos1_master= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
|
||||
|
||||
connection slave1;
|
||||
# slave sql can't advance as must be locked by the conn `slave' trans
|
||||
let $pos0_slave= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
|
||||
--disable_query_log
|
||||
eval select $pos0_master - $pos0_slave as zero;
|
||||
--enable_query_log
|
||||
|
||||
#
|
||||
# the replicated trans is blocked by the slave's local.
|
||||
# However, it's not easy to catch the exact moment when it happens.
|
||||
# The test issues sleep which makes the test either non-deterministic or
|
||||
# wasting too much time.
|
||||
#
|
||||
--sleep 3
|
||||
|
||||
send stop slave sql_thread;
|
||||
|
||||
connection slave;
|
||||
rollback; # release the sql thread
|
||||
|
||||
connection slave1;
|
||||
reap;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
let $sql_status= query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1);
|
||||
--echo *** sql thread is *not* running: $sql_status ***
|
||||
|
||||
let $pos1_slave= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
|
||||
|
||||
--echo *** the prove: the stopped slave has rolled back the current transaction ***
|
||||
|
||||
--disable_query_log
|
||||
select count(*) as zero from t1i;
|
||||
eval select $pos0_master - $pos0_slave as zero;
|
||||
eval select $pos1_master > $pos0_slave as one;
|
||||
--enable_query_log
|
||||
|
||||
start slave sql_thread;
|
||||
|
||||
# clean-up
|
||||
|
||||
connection master;
|
||||
drop table t1i, t2m;
|
||||
|
||||
--source include/rpl_end.inc
|
||||
12
mysql-test/suite/rpl/r/rpl_bug37426.result
Normal file
12
mysql-test/suite/rpl/r/rpl_bug37426.result
Normal file
@@ -0,0 +1,12 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
CREATE TABLE char128_utf8 (i1 INT NOT NULL, c CHAR(128) CHARACTER SET utf8 NOT NULL, i2 INT NOT NULL);
|
||||
INSERT INTO char128_utf8 VALUES ( 1, "123", 1 );
|
||||
SELECT * FROM char128_utf8;
|
||||
i1 c i2
|
||||
1 123 1
|
||||
SELECT * FROM char128_utf8;
|
||||
i1 c i2
|
||||
1 123 1
|
||||
DROP TABLE char128_utf8;
|
||||
include/rpl_end.inc
|
||||
@@ -7,15 +7,16 @@ source include/master-slave.inc;
|
||||
source include/have_binlog_format_row.inc;
|
||||
|
||||
connection master;
|
||||
CREATE TABLE char128_utf8 (
|
||||
i1 INT NOT NULL,
|
||||
c CHAR(128) CHARACTER SET utf8 NOT NULL,
|
||||
i2 INT NOT NULL);
|
||||
|
||||
CREATE TABLE char128_utf8 (i1 INT NOT NULL, c CHAR(128) CHARACTER SET utf8 NOT NULL, i2 INT NOT NULL);
|
||||
INSERT INTO char128_utf8 VALUES ( 1, "123", 1 );
|
||||
|
||||
SELECT * FROM char128_utf8;
|
||||
sync_slave_with_master;
|
||||
|
||||
SELECT * FROM char128_utf8;
|
||||
|
||||
# Clean up
|
||||
connection master;
|
||||
DROP TABLE char128_utf8;
|
||||
sync_slave_with_master;
|
||||
--source include/rpl_end.inc
|
||||
@@ -1159,3 +1159,20 @@ CREATE TABLE db1.t1 (bar TINYTEXT, KEY (bar(100)));
|
||||
ALTER TABLE db1.t1 ADD baz INT;
|
||||
|
||||
DROP DATABASE db1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11938039 RE-EXECUTION OF FRM-ONLY ALTER TABLE WITH RENAME
|
||||
--echo # CLAUSE FAILS OR ABORTS SERVER.
|
||||
--echo #
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
create table t1 (a int);
|
||||
prepare stmt1 from 'alter table t1 alter column a set default 1, rename to t2';
|
||||
execute stmt1;
|
||||
rename table t2 to t1;
|
||||
--echo # The below statement should succeed and not emit error or abort server.
|
||||
execute stmt1;
|
||||
deallocate prepare stmt1;
|
||||
drop table t2;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#
|
||||
# Test of procedure analyse
|
||||
#
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2;
|
||||
@@ -144,4 +145,15 @@ INSERT INTO t1 VALUES ('e'),('e'),('e-');
|
||||
SELECT * FROM t1 PROCEDURE ANALYSE();
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11756242 48137: PROCEDURE ANALYSE() LEAKS MEMORY WHEN RETURNING NULL
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(f1 INT) ENGINE=MYISAM;
|
||||
CREATE TABLE t2(f2 INT) ENGINE=INNODB;
|
||||
INSERT INTO t2 VALUES (1);
|
||||
SELECT DISTINCTROW f1 FROM t1 NATURAL RIGHT OUTER JOIN t2 PROCEDURE ANALYSE();
|
||||
SELECT * FROM t2 LIMIT 1 PROCEDURE ANALYSE();
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
@@ -1127,6 +1127,18 @@ INSERT INTO t1 VALUES (18446668621106209655);
|
||||
SELECT MAX(LENGTH(a)), LENGTH(MAX(a)), MIN(a), MAX(a), CONCAT(MIN(a)), CONCAT(MAX(a)) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #11766270 59343: YEAR(4): INCORRECT RESULT AND VALGRIND WARNINGS WITH MIN/MAX, UNION
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(f1 YEAR(4));
|
||||
INSERT INTO t1 VALUES (0000),(2001);
|
||||
--enable_metadata
|
||||
(SELECT MAX(f1) FROM t1) UNION (SELECT MAX(f1) FROM t1);
|
||||
--disable_metadata
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo End of 5.1 tests
|
||||
|
||||
|
||||
@@ -554,6 +554,12 @@ SELECT CASE a WHEN a THEN a END FROM t1 GROUP BY a WITH ROLLUP;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #11766212 59270: NOT IN (YEAR( ... ), ... ) PRODUCES MANY VALGRIND WARNINGS
|
||||
--echo #
|
||||
|
||||
SELECT 1 IN (YEAR(FROM_UNIXTIME(NULL)) ,1);
|
||||
|
||||
--echo #
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
@@ -601,5 +601,18 @@ DROP TABLE t1;
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
remove_file $MYSQLD_DATADIR/test/tmpp2.txt;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(f1 INT);
|
||||
EVAL SELECT 0xE1BB30 INTO OUTFILE 't1.dat';
|
||||
--disable_warnings
|
||||
LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8;
|
||||
--enable_warnings
|
||||
|
||||
DROP TABLE t1;
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
remove_file $MYSQLD_DATADIR/test/t1.dat;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
@@ -53,3 +53,18 @@ CREATE PROCEDURE p1() SELECT 1;
|
||||
--exec $MYSQL_SLAP --create-schema=test --delimiter=";" --query="CALL p1; SELECT 1;" --silent 2>&1
|
||||
|
||||
DROP PROCEDURE p1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #11765157 - 58090: mysqlslap drops schema specified in
|
||||
--echo # create_schema if auto-generate-sql also set.
|
||||
--echo #
|
||||
|
||||
--exec $MYSQL_SLAP --silent --create-schema=bug58090 --concurrency=5 --iterations=20 --auto-generate-sql
|
||||
--echo # 'bug58090' database should not be present.
|
||||
SHOW DATABASES;
|
||||
--exec $MYSQL_SLAP --silent --create-schema=bug58090 --no-drop --auto-generate-sql
|
||||
--echo # 'bug58090' database should be present.
|
||||
SHOW DATABASES;
|
||||
DROP DATABASE bug58090;
|
||||
|
||||
|
||||
@@ -3996,6 +3996,28 @@ DROP TABLE t1,t1s,t2s;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug #11765713 58705:
|
||||
--echo # OPTIMIZER LET ENGINE DEPEND ON UNINITIALIZED VALUES
|
||||
--echo # CREATED BY OPT_SUM_QUERY
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a INT NOT NULL, KEY (a));
|
||||
INSERT INTO t1 VALUES (0), (1);
|
||||
|
||||
--error ER_SUBQUERY_NO_1_ROW
|
||||
SELECT 1 as foo FROM t1 WHERE a < SOME
|
||||
(SELECT a FROM t1 WHERE a <=>
|
||||
(SELECT a FROM t1)
|
||||
);
|
||||
|
||||
SELECT 1 as foo FROM t1 WHERE a < SOME
|
||||
(SELECT a FROM t1 WHERE a <=>
|
||||
(SELECT a FROM t1 where a is null)
|
||||
);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #57704: Cleanup code dies with void TABLE::set_keyread(bool):
|
||||
--echo # Assertion `file' failed.
|
||||
|
||||
@@ -3979,6 +3979,18 @@ DROP TABLE t1;
|
||||
CREATE VIEW v1 AS SELECT 1 IN (1 LIKE 2,0) AS f;
|
||||
DROP VIEW v1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug 11829681 - 60295: ERROR 1356 ON VIEW THAT EXECUTES FINE AS A QUERY
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE VIEW v1 AS SELECT s.* FROM t1 s, t1 b HAVING a;
|
||||
|
||||
SELECT * FROM v1;
|
||||
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # -----------------------------------------------------------------
|
||||
--echo # -- End of 5.1 tests.
|
||||
--echo # -----------------------------------------------------------------
|
||||
|
||||
@@ -228,3 +228,43 @@ DROP TABLE t1;
|
||||
SHOW ERRORS;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
#
|
||||
# Bug#55847: SHOW WARNINGS returns empty result set when SQLEXCEPTION is active
|
||||
#
|
||||
|
||||
--echo
|
||||
--echo -- Bug#55847
|
||||
--echo
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1(a INT UNIQUE);
|
||||
|
||||
delimiter |;
|
||||
|
||||
CREATE FUNCTION f1(x INT) RETURNS INT
|
||||
BEGIN
|
||||
INSERT INTO t1 VALUES(x);
|
||||
INSERT INTO t1 VALUES(x);
|
||||
RETURN x;
|
||||
END|
|
||||
|
||||
delimiter ;|
|
||||
|
||||
--echo
|
||||
|
||||
--error ER_DUP_ENTRY
|
||||
SHOW TABLES WHERE f1(11) = 11;
|
||||
|
||||
--echo
|
||||
|
||||
SHOW WARNINGS;
|
||||
|
||||
--echo
|
||||
|
||||
DROP TABLE t1;
|
||||
DROP FUNCTION f1;
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
--source include/not_embedded.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
@@ -287,6 +289,98 @@ DROP TABLE t1;
|
||||
disconnect con1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11766752 59936: multiple xa assertions - transactional
|
||||
--echo # statement fuzzer
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT) engine=InnoDB;
|
||||
XA START 'a';
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--error ER_XAER_RMFAIL
|
||||
SAVEPOINT savep;
|
||||
|
||||
XA END 'a';
|
||||
--error ER_XAER_RMFAIL
|
||||
SELECT * FROM t1;
|
||||
--error ER_XAER_RMFAIL
|
||||
INSERT INTO t1 VALUES (2);
|
||||
--error ER_XAER_RMFAIL
|
||||
SAVEPOINT savep;
|
||||
--error ER_XAER_RMFAIL
|
||||
SET @a=(SELECT * FROM t1);
|
||||
|
||||
XA PREPARE 'a';
|
||||
--error ER_XAER_RMFAIL
|
||||
SELECT * FROM t1; # used to cause InnoDB assert
|
||||
--error ER_XAER_RMFAIL
|
||||
INSERT INTO t1 VALUES (2); # used to cause InnoDB assert
|
||||
--error ER_XAER_RMFAIL
|
||||
SAVEPOINT savep;
|
||||
--error ER_XAER_RMFAIL
|
||||
SET @a=(SELECT * FROM t1); # used to cause InnoDB assert
|
||||
--error ER_XAER_RMFAIL
|
||||
UPDATE t1 SET a=1 WHERE a=2;
|
||||
|
||||
XA COMMIT 'a';
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#12352846 - TRANS_XA_START(THD*):
|
||||
--echo # ASSERTION THD->TRANSACTION.XID_STATE.XID.IS_NULL()
|
||||
--echo # FAILED
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (a INT);
|
||||
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--echo # Connection con2
|
||||
--connect (con2,localhost,root)
|
||||
XA START 'xid1';
|
||||
--echo # Sending:
|
||||
--send INSERT INTO t2 SELECT a FROM t1
|
||||
|
||||
--echo # Connection default
|
||||
--connection default
|
||||
let $wait_condition=
|
||||
SELECT COUNT(*) = 1 FROM information_schema.processlist
|
||||
WHERE state = "Sending data"
|
||||
AND info = "INSERT INTO t2 SELECT a FROM t1";
|
||||
--echo # Waiting until INSERT ... is blocked
|
||||
--source include/wait_condition.inc
|
||||
DELETE FROM t1;
|
||||
COMMIT;
|
||||
|
||||
--echo # Connection con2
|
||||
--connection con2
|
||||
--echo # Reaping: INSERT INTO t2 SELECT a FROM t1
|
||||
--error ER_LOCK_DEADLOCK
|
||||
--reap
|
||||
--error ER_XA_RBDEADLOCK
|
||||
XA COMMIT 'xid1';
|
||||
# This caused the assert to be triggered
|
||||
XA START 'xid1';
|
||||
|
||||
XA END 'xid1';
|
||||
XA PREPARE 'xid1';
|
||||
XA ROLLBACK 'xid1';
|
||||
|
||||
--echo # Connection default
|
||||
connection default;
|
||||
DROP TABLE t1, t2;
|
||||
disconnect con2;
|
||||
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user