Commit c75bab0a authored by Alfranio Correia's avatar Alfranio Correia

Post-fix after mysql-5.1-rep+2 --> mysql-5.1-rep+3.

mysql-test/extra/binlog_tests/binlog_failure_mixing_engines.test:
  Merged the test case into rpl_mixing_engines.test.
mysql-test/extra/rpl_tests/rpl_mixing_engines.inc:
  Incorporated some tests from binlog_failure_mixing_engines.test and
  fixed after BUG#47323.
mysql-test/extra/rpl_tests/rpl_mixing_engines.test:
  Incorporated some tests from binlog_failure_mixing_engines.test and
  fixed after BUG#47323.
mysql-test/suite/binlog/r/binlog_mixed_failure_mixing_engines.result:
  Merged the test case into rpl_mixing_engines.test.
mysql-test/suite/binlog/r/binlog_row_failure_mixing_engines.result:
  Merged the test case into rpl_mixing_engines.test.
mysql-test/suite/binlog/t/binlog_mixed_failure_mixing_engines.test:
  Merged the test case into rpl_mixing_engines.test.
mysql-test/suite/binlog/t/binlog_row_failure_mixing_engines.test:
  Merged the test case into rpl_mixing_engines.test.
mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result:
  Incorporated some tests from binlog_failure_mixing_engines.test and
  changed after BUG#47323.
mysql-test/suite/rpl/r/rpl_row_mixing_engines.result:
  Incorporated some tests from binlog_failure_mixing_engines.test and
  changed after BUG#47323.
mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result:
  Incorporated some tests from binlog_failure_mixing_engines.test and
  changed after BUG#47323.
parent 2b6eaa0e
......@@ -138,6 +138,7 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
let $pos_trans_command= query_get_value("SHOW MASTER STATUS", Position, 1);
let $trans_id= 7;
let $tb_id= 1;
let $stmt_id= 1;
let $commands= '';
......@@ -172,7 +173,7 @@ if (`SELECT HEX(@commands) = HEX('clean')`)
SET @commands= '';
}
if (`SELECT HEX(@commands) != HEX('')`)
while (`SELECT HEX(@commands) != HEX('')`)
{
--disable_query_log
SET @command= SUBSTRING_INDEX(@commands, ' ', 1);
......@@ -413,54 +414,104 @@ if (`SELECT HEX(@commands) != HEX('')`)
}
if (`SELECT HEX(@command) = HEX('CS-T->T')`)
{
--eval CREATE TABLE tt_xx_$trans_id engine=$engine_type SELECT * FROM tt_1;
--eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=$engine_type SELECT * FROM tt_1;
}
if (`SELECT HEX(@command) = HEX('CS-N->N')`)
{
--eval CREATE TABLE nt_xx_$trans_id engine=MyIsam SELECT * FROM nt_1;
--eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1;
}
if (`SELECT HEX(@command) = HEX('CS-T->N')`)
{
--eval CREATE TABLE tt_xx_$trans_id engine=$engine_type SELECT * FROM nt_1;
--eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=$engine_type SELECT * FROM nt_1;
}
if (`SELECT HEX(@command) = HEX('CS-N->T')`)
{
--eval CREATE TABLE nt_xx_$trans_id engine=MyIsam SELECT * FROM tt_1;
--eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1;
}
if (`SELECT HEX(@command) = HEX('CSe-T->T')`)
{
--error ER_DUP_ENTRY, ER_DUP_KEY
--eval CREATE TABLE tt_xx_$trans_id (PRIMARY KEY (stmt_id)) engine=$engine_type SELECT stmt_id FROM tt_1;
--eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=$engine_type SELECT stmt_id FROM tt_1;
}
if (`SELECT HEX(@command) = HEX('CSe-N->N')`)
{
--error ER_DUP_ENTRY, ER_DUP_KEY
--eval CREATE TABLE nt_xx_$trans_id (PRIMARY KEY (stmt_id)) engine=MyIsam SELECT stmt_id FROM nt_1;
--eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=MyIsam SELECT stmt_id FROM nt_1;
}
if (`SELECT HEX(@command) = HEX('CSe-T->N')`)
{
--error ER_DUP_ENTRY, ER_DUP_KEY
--eval CREATE TABLE tt_xx_$trans_id (PRIMARY KEY (stmt_id)) engine=$engine_type SELECT stmt_id FROM nt_1;
--eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=$engine_type SELECT stmt_id FROM nt_1;
}
if (`SELECT HEX(@command) = HEX('CSe-N->T')`)
{
--error ER_DUP_ENTRY, ER_DUP_KEY
--eval CREATE TABLE nt_xx_$trans_id (PRIMARY KEY (stmt_id)) engine=MyIsam SELECT stmt_id FROM tt_1;
--eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=MyIsam SELECT stmt_id FROM tt_1;
}
if (`SELECT HEX(@command) = HEX('CT')`)
{
--eval CREATE TEMPORARY TABLE tt_xx_$trans_id (a int) engine=$engine_type;
--eval CREATE TEMPORARY TABLE tt_xx_$tb_id (a int) engine=$engine_type;
}
if (`SELECT HEX(@command) = HEX('IS-T<-N')`)
{
--eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1;
}
if (`SELECT HEX(@command) = HEX('ISe-T<-N')`)
{
--error ER_DUP_ENTRY, ER_DUP_KEY
--eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1;
}
if (`SELECT HEX(@command) = HEX('IS-N<-T')`)
{
--eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1;
}
if (`SELECT HEX(@command) = HEX('ISe-N<-T')`)
{
--error ER_DUP_ENTRY, ER_DUP_KEY
--eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1;
}
if (`SELECT HEX(@command) = HEX('IS-T<-T')`)
{
--eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1;
}
if (`SELECT HEX(@command) = HEX('ISe-T<-T')`)
{
--error ER_DUP_ENTRY, ER_DUP_KEY
--eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1;
}
if (`SELECT HEX(@command) = HEX('IS-N<-N')`)
{
--eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1;
}
if (`SELECT HEX(@command) = HEX('ISe-N<-N')`)
{
--error ER_DUP_ENTRY, ER_DUP_KEY
--eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1;
}
if (`SELECT HEX(@command) = HEX('trunc-CS-T')`)
{
eval TRUNCATE TABLE tt_xx_$tb_id;
}
if (`SELECT HEX(@command) = HEX('trunc-CS-N')`)
{
eval TRUNCATE TABLE nt_xx_$tb_id;
}
if (`SELECT HEX(@command) = HEX('trunc-CT')`)
{
eval TRUNCATE TABLE tt_xx_$tb_id;
}
if (`SELECT HEX(@command) = HEX('drop-CS')`)
{
--disable_warnings
eval DROP TABLE IF EXISTS tt_xx_$trans_id, nt_xx_$trans_id;
eval DROP TABLE IF EXISTS tt_xx_$tb_id, nt_xx_$tb_id;
inc $tb_id;
--enable_warnings
}
if (`SELECT HEX(@command) = HEX('drop-CT')`)
{
--disable_warnings
eval DROP TEMPORARY TABLE IF EXISTS tt_xx_$trans_id;
eval DROP TEMPORARY TABLE IF EXISTS tt_xx_$tb_id;
inc $tb_id;
--enable_warnings
}
if (`SELECT HEX(@command) = HEX('C')`)
......@@ -498,6 +549,4 @@ if (`SELECT HEX(@commands) != HEX('')`)
inc $trans_id;
let $commands= '';
}
--source extra/rpl_tests/rpl_mixing_engines.inc
}
......@@ -214,9 +214,26 @@
# CSe-T->N - Fails while creating a T-table selecting from a a N-table.
# CSe-N->T - Fails while creating a N-table selecting from a T-table.
# drop-CS - Drops any of the tables previously created.
# trunc-CS-T - Truncates a T-table previously created.
# trunc-CS-N - Truncates a N-table previously created.
# CT - Creates a temporary T-table.
# drop-CT - Drops a temporary T-table.
#
# - This is INSERT...SELECT:
# IS-T<-T - Inserts data from a T-table into a T-table.
# IS-T<-N - Inserts data from a N-table into a T-table.
# IS-N<-T - Inserts data from a T-table into a N-table.
# IS-N<-N - Inserts data from a N-table into a N-table.
# ISe-T<-T - Fails while inserting data from a T-table into a T-table.
# ISe-T<-N - Fails while inserting data from a N-table into a T-table.
# ISe-N<-T - Fails while inserting data from a T-table into a N-table.
# ISe-N<-N - Fails while inserting data from a N-table into a N-table.
#
# For the CREATE...SELECT and INSERT...SELECT, the table names are defined based
# on the variable $tb_id which is automatically incremented after each drop.
# This indirectly means that two tables cannot co-exist unless we manually keep
# the variable $tb_id.
#
# The format of the entries in the binlog depends on the mode and on the type
# statements: S - statement and R - row. And when it is clear from the context
# which statement is referred to, we sometimes use "M" to denote a "Mixed"
......@@ -1624,27 +1641,124 @@ SET @commands= 'CSe-N->T CS-N->T drop-CS';
SET @commands= 'CSe-N->T CS-N->T drop-CS';
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo ###################################################################################
--echo # 4 - INSERT TABLE...SELECT
--echo ###################################################################################
SET @commands= 'CS-T->T';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-T B T IS-T<-N T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-T B T ISe-T<-N T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-T B IS-T<-N T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-T B ISe-T<-N T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'drop-CS';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'CS-T->T';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-T B T IS-T<-T T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-T B T ISe-T<-T T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-T B IS-T<-T T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-T B ISe-T<-T T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'drop-CS';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'CS-N->N';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-N B T IS-N<-T T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-N B T ISe-N<-T T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-N B IS-N<-T T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-N B ISe-N<-T T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'drop-CS';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'CS-N->N';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-N B T IS-N<-N T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-N B T ISe-N<-N T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-N B IS-N<-N T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'trunc-CS-N B ISe-N<-N T C';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'drop-CS';
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo ###################################################################################
--echo # 4 - ROLLBACK TEMPORARY TABLE
--echo # 5 - ROLLBACK TEMPORARY TABLE
--echo ###################################################################################
SET @commands= 'B T CT R';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'drop-CT';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'B T S1 T CT R1 R';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'drop-CT';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'B T CT T R';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'drop-CT';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'B tN CT T R';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'drop-CT';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'B CT T R';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'drop-CT';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'B N CT T R';
--source extra/rpl_tests/rpl_mixing_engines.inc
SET @commands= 'drop-CT';
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo ###################################################################################
--echo # CHECK CONSISTENCY
--echo ###################################################################################
......
--source include/have_binlog_format_mixed.inc
--source include/have_innodb.inc
--source extra/binlog_tests/binlog_failure_mixing_engines.test
--source include/have_binlog_format_row.inc
--source include/have_innodb.inc
--source extra/binlog_tests/binlog_failure_mixing_engines.test
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment