Commit 33df97df authored by unknown's avatar unknown

Bug#28369 rpl test cases fail with binlog disabled

 - Turn on binlog only for tests that need it
 - Skip those tests if --skip-binlog is used


BitKeeper/deleted/.del-ctype_cp932_notembedded.result:
  Rename: mysql-test/r/ctype_cp932_notembedded.result -> BitKeeper/deleted/.del-ctype_cp932_notembedded.result
BitKeeper/deleted/.del-ctype_cp932_notembedded.test:
  Rename: mysql-test/t/ctype_cp932_notembedded.test -> BitKeeper/deleted/.del-ctype_cp932_notembedded.test
mysql-test/include/master-slave.inc:
  Need binlog
mysql-test/lib/mtr_cases.pl:
  Turn on binlog only for tests that need it
  Skip those tests if --skip-binlog is used
mysql-test/r/sp_trans.result:
  Moved to "sp_binlog"
mysql-test/t/binlog.test:
  Need binlog
mysql-test/t/blackhole.test:
  Need binlog
mysql-test/t/ctype_cp932_binlog.test:
  Need binlog
mysql-test/t/ctype_ucs_binlog.test:
  Need binlog
mysql-test/t/drop_temp_table.test:
  Need binlog
mysql-test/t/flush_block_commit_notembedded.test:
  Need binlog
mysql-test/t/innodb.test:
  Need binlog
mysql-test/t/insert_select-binlog.test:
  Need binlog
mysql-test/t/mix_innodb_myisam_binlog.test:
  Need binlog
mysql-test/t/mysqlbinlog-cp932.test:
  Need binlog
mysql-test/t/mysqlbinlog.test:
  Need binlog
mysql-test/t/mysqlbinlog2.test:
  Need binlog
mysql-test/t/mysqldump.test:
  Need binlog
mysql-test/t/rpl000015.test:
  Need binlog
mysql-test/t/rpl000017.test:
  Need binlog
mysql-test/t/rpl_rotate_logs.test:
  Need binlog
mysql-test/t/sp_trans.test:
  Moved to "sp_binlog"
mysql-test/t/user_var-binlog.test:
  Need binlog
mysql-test/r/sp_trans_log.result:
  New BitKeeper file ``mysql-test/r/sp_trans_log.result''
mysql-test/t/sp_trans_log.test:
  New BitKeeper file ``mysql-test/t/sp_trans_log.test''
parent 4507f7ed
# Replication tests need binlog
source include/have_binlog.inc;
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,);
connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,);
......
......@@ -596,6 +596,22 @@ sub collect_one_test_case($$$$$$$) {
}
}
if ( $tinfo->{'need_binlog'} )
{
if (grep(/^--skip-log-bin/, @::opt_extra_mysqld_opt) )
{
$tinfo->{'skip'}= 1;
$tinfo->{'comment'}= "Test need binlog";
return;
}
}
else
{
# Test does not need binlog, add --skip-binlog to
# the options used when starting it
push(@{$tinfo->{'master_opt'}}, "--skip-log-bin");
}
}
}
......@@ -608,6 +624,7 @@ our @tags=
["include/have_binlog_format_row.inc", "binlog_format", "row"],
["include/have_binlog_format_statement.inc", "binlog_format", "stmt"],
["include/have_binlog_format_mixed.inc", "binlog_format", "mixed"],
["include/have_binlog.inc", "need_binlog", 1],
["include/big_test.inc", "big_test", 1],
["include/have_debug.inc", "need_debug", 1],
["include/have_ndb.inc", "ndb_test", 1],
......
drop table if exists t1;
set names cp932;
set character_set_database = cp932;
RESET MASTER;
CREATE TABLE t1(f1 blob);
PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
SET @var1= x'8300';
EXECUTE stmt1 USING @var1;
SHOW BINLOG EVENTS FROM 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 188 use `test`; CREATE TABLE t1(f1 blob)
master-bin.000001 188 Query 1 283 use `test`; INSERT INTO t1 VALUES(0x8300)
SELECT HEX(f1) FROM t1;
HEX(f1)
8300
DROP table t1;
......@@ -530,23 +530,3 @@ count(*)
drop table t3, t4|
drop procedure bug14210|
set @@session.max_heap_table_size=default|
CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM|
CREATE TABLE t2 (a int NOT NULL auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB|
insert into t2 values (1,1)|
create function bug23333()
RETURNS int(11)
DETERMINISTIC
begin
insert into t1 values (null);
select count(*) from t1 into @a;
return @a;
end|
reset master|
insert into t2 values (bug23333(),1)|
ERROR 23000: Duplicate entry '1' for key 1
show binlog events from 98 /* with fixes for #23333 will show there is the query */|
Log_name Pos Event_type Server_id End_log_pos Info
select count(*),@a from t1 /* must be 1,1 */|
count(*) @a
1 1
drop table t1, t2|
CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM|
CREATE TABLE t2 (a int NOT NULL auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB|
insert into t2 values (1,1)|
create function bug23333()
RETURNS int(11)
DETERMINISTIC
begin
insert into t1 values (null);
select count(*) from t1 into @a;
return @a;
end|
reset master|
insert into t2 values (bug23333(),1)|
ERROR 23000: Duplicate entry '1' for key 1
show binlog events from 98 /* with fixes for #23333 will show there is the query */|
Log_name Pos Event_type Server_id End_log_pos Info
select count(*),@a from t1 /* must be 1,1 */|
count(*) @a
1 1
drop table t1, t2|
......@@ -4,6 +4,7 @@
-- source include/not_embedded.inc
-- source include/have_bdb.inc
-- source include/have_innodb.inc
-- source include/have_log_bin.inc
--disable_warnings
drop table if exists t1, t2;
......
......@@ -4,6 +4,7 @@
#
-- source include/not_embedded.inc
-- source include/have_blackhole.inc
-- source include/have_log_bin.inc
--disable_warnings
drop table if exists t1,t2;
......
-- source include/not_embedded.inc
-- source include/have_cp932.inc
-- source include/have_log_bin.inc
--character_set cp932
--disable_warnings
......
-- source include/not_embedded.inc
-- source include/have_cp932.inc
--character_set cp932
--disable_warnings
drop table if exists t1;
--enable_warnings
set names cp932;
set character_set_database = cp932;
# Test prepared statement with 0x8300 sequence in parameter while
# running with cp932 client character set.
RESET MASTER;
CREATE TABLE t1(f1 blob);
PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
SET @var1= x'8300';
# TODO: Note that this doesn't actually test the code which was added for
# bug#11338 because this syntax for prepared statements causes the PS to
# be replicated differently than if we executed the PS from C or Java.
# Using this syntax, variable names are inserted into the binlog instead
# of values. The real goal of this test is to check the code that was
# added to Item_param::query_val_str() in order to do hex encoding of
# PS parameters when the client character set is cp932;
# Bug#11338 has an example java program which can be used to verify this
# code (and I have used it to test the fix) until there is some way to
# exercise this code from mysql-test-run.
EXECUTE stmt1 USING @var1;
SHOW BINLOG EVENTS FROM 98;
SELECT HEX(f1) FROM t1;
DROP table t1;
# end test for bug#11338
--source include/not_embedded.inc
--source include/have_ucs2.inc
--source include/have_log_bin.inc
#
# Check correct binlogging of UCS2 user variables (BUG#3875)
......
# Embedded server doesn't support binlog
-- source include/not_embedded.inc
--source include/have_log_bin.inc
--disable_warnings
drop database if exists `drop-temp+table-test`;
......
......@@ -4,7 +4,7 @@
# This is intended to mimick how mysqldump and innobackup work.
# And it requires InnoDB
-- source include/not_embedded.inc
-- source include/have_log_bin.inc
-- source include/have_innodb.inc
connect (con1,localhost,root,,);
......
......@@ -12,6 +12,7 @@
#######################################################################
-- source include/have_innodb.inc
-- source include/have_log_bin.inc
#
# Small basic test with ignore
......
# Embedded server doesn't support binlog
-- source include/not_embedded.inc
-- source include/have_log_bin.inc
# Check if a partly-completed INSERT SELECT in a MyISAM table goes into the
# binlog
......
......@@ -5,9 +5,7 @@
# did some tests manually on a slave; tables are replicated fine and
# Exec_Master_Log_Pos advances as expected.
# Embedded server doesn't support binlogging
-- source include/not_embedded.inc
-- source include/have_log_bin.inc
-- source include/have_innodb.inc
--disable_warnings
......
# disabled in embedded until tools running is fixed with embedded
--source include/not_embedded.inc
-- source include/have_cp932.inc
-- source include/have_log_bin.inc
# Bug#16217 (mysql client did not know how not switch its internal charset)
flush logs;
......
# We are using .opt file since we need small binlog size
# Embedded server doesn't support binlogging
-- source include/not_embedded.inc
-- source include/have_log_bin.inc
# we need this for getting fixed timestamps inside of this test
set timestamp=1000000000;
......
# Test for the new options --start-datetime, stop-datetime,
# and a few others.
# Embedded server doesn't support binlogging
-- source include/not_embedded.inc
-- source include/have_log_bin.inc
--disable_warnings
drop table if exists t1;
......
# Embedded server doesn't support external clients
--source include/not_embedded.inc
--source include/have_log_bin.inc
--disable_warnings
DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa, t3;
......
-- source include/have_log_bin.inc
connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK);
connection master;
......
-- source include/have_log_bin.inc
connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK);
connection master;
......
# This test uses chmod, can't be run with root permissions
-- source include/not_as_root.inc
-- source include/have_log_bin.inc
#
# Test is run with max_binlog_size=2048 to force automatic rotation of the
# binary log
......
......@@ -553,34 +553,6 @@ drop procedure bug14210|
set @@session.max_heap_table_size=default|
#
# Bug #13270 INSERT,UPDATE,etc that calls func with side-effect does not binlog
# Bug #23333 stored function + non-transac table + transac table =
# breaks stmt-based binlog
# Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF()
#
CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM|
CREATE TABLE t2 (a int NOT NULL auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB|
insert into t2 values (1,1)|
create function bug23333()
RETURNS int(11)
DETERMINISTIC
begin
insert into t1 values (null);
select count(*) from t1 into @a;
return @a;
end|
reset master|
--error ER_DUP_ENTRY
insert into t2 values (bug23333(),1)|
--replace_column 2 # 5 # 6 #
show binlog events from 98 /* with fixes for #23333 will show there is the query */|
select count(*),@a from t1 /* must be 1,1 */|
drop table t1, t2|
#
# BUG#NNNN: New bug synopsis
#
......
-- source include/have_innodb.inc
-- source include/have_log_bin.inc
delimiter |;
#
# Bug #13270 INSERT,UPDATE,etc that calls func with side-effect does not binlog
# Bug #23333 stored function + non-transac table + transac table =
# breaks stmt-based binlog
# Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF()
#
CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM|
CREATE TABLE t2 (a int NOT NULL auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB|
insert into t2 values (1,1)|
create function bug23333()
RETURNS int(11)
DETERMINISTIC
begin
insert into t1 values (null);
select count(*) from t1 into @a;
return @a;
end|
reset master|
--error ER_DUP_ENTRY
insert into t2 values (bug23333(),1)|
--replace_column 2 # 5 # 6 #
show binlog events from 98 /* with fixes for #23333 will show there is the query */|
select count(*),@a from t1 /* must be 1,1 */|
drop table t1, t2|
# Embedded server does not support binlogging
--source include/not_embedded.inc
-- source include/have_log_bin.inc
# Check that user variables are binlogged correctly (BUG#3875)
create table t1 (a varchar(50));
......
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