mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
This commit is contained in:
commit
da0684362f
14 changed files with 534 additions and 69 deletions
|
@ -10,7 +10,7 @@
|
|||
########### Clean up ################
|
||||
--disable_warnings
|
||||
--disable_query_log
|
||||
DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17;
|
||||
DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t14a,t15,t16,t17;
|
||||
--enable_query_log
|
||||
--enable_warnings
|
||||
|
||||
|
@ -662,6 +662,68 @@ sync_slave_with_master;
|
|||
--replace_column 7 CURRENT_TIMESTAMP
|
||||
SELECT * FROM t14 ORDER BY c1;
|
||||
|
||||
####################################################
|
||||
# - Alter Master drop column at end of table #
|
||||
# Expect: column dropped #
|
||||
####################################################
|
||||
|
||||
--echo *** Create t14a on slave ***
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
eval CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
|
||||
c6 INT DEFAULT '1',
|
||||
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
|
||||
)ENGINE=$engine_type;
|
||||
|
||||
--echo *** Create t14a on Master ***
|
||||
connection master;
|
||||
eval CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
|
||||
) ENGINE=$engine_type;
|
||||
RESET MASTER;
|
||||
|
||||
--echo *** Start Slave ***
|
||||
connection slave;
|
||||
START SLAVE;
|
||||
|
||||
--echo *** Master Data Insert ***
|
||||
connection master;
|
||||
set @b1 = 'b1b1b1b1';
|
||||
set @b1 = concat(@b1,@b1);
|
||||
INSERT INTO t14a () VALUES(1,@b1,'Kyle'),
|
||||
(2,@b1,'JOE'),
|
||||
(3,@b1,'QA');
|
||||
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
--echo *** Select on Slave ****
|
||||
sync_slave_with_master;
|
||||
--replace_column 5 CURRENT_TIMESTAMP
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
|
||||
--echo *** Master Drop c5 ***
|
||||
connection master;
|
||||
ALTER TABLE t14a DROP COLUMN c5;
|
||||
RESET MASTER;
|
||||
|
||||
--echo *** Start Slave ***
|
||||
connection slave;
|
||||
START SLAVE;
|
||||
|
||||
--echo *** Master Data Insert ***
|
||||
connection master;
|
||||
set @b1 = 'b1b1b1b1';
|
||||
set @b1 = concat(@b1,@b1);
|
||||
|
||||
INSERT INTO t14a () VALUES(4,@b1),
|
||||
(5,@b1),
|
||||
(6,@b1);
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
|
||||
--echo *** Select on Slave ****
|
||||
sync_slave_with_master;
|
||||
--replace_column 5 CURRENT_TIMESTAMP
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
|
||||
####################################################
|
||||
# - Alter Master Dropping columns from the middle. #
|
||||
|
@ -858,7 +920,10 @@ sync_slave_with_master;
|
|||
#### Clean Up ####
|
||||
--disable_warnings
|
||||
--disable_query_log
|
||||
DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17;
|
||||
connection master;
|
||||
DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t14a,t15,t16,t17;
|
||||
sync_slave_with_master;
|
||||
connection master;
|
||||
--enable_query_log
|
||||
--enable_warnings
|
||||
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
|
||||
--disable_query_log
|
||||
--disable_warnings
|
||||
connection slave;
|
||||
STOP SLAVE;
|
||||
source include/wait_for_slave_to_stop.inc;
|
||||
connection master;
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
RESET MASTER;
|
||||
--enable_warnings
|
||||
connection slave;
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
RESET SLAVE;
|
||||
START SLAVE;
|
||||
--enable_warnings
|
||||
--enable_query_log
|
||||
|
||||
--echo **** On Master ****
|
||||
connection master;
|
||||
|
@ -38,3 +37,6 @@ connection master;
|
|||
DROP TABLE t1;
|
||||
let $SERVER_VERSION=`select version()`;
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
connection master;
|
||||
RESET MASTER;
|
||||
|
|
|
@ -214,17 +214,44 @@ sub collect_one_suite($$)
|
|||
|
||||
mtr_verbose("Collecting: $suite");
|
||||
|
||||
my $combination_file= "combinations";
|
||||
my $combinations = [];
|
||||
|
||||
my $suitedir= "$::glob_mysql_test_dir"; # Default
|
||||
my $combination_file= "$::glob_mysql_test_dir/$combination_file";
|
||||
if ( $suite ne "main" )
|
||||
{
|
||||
$suitedir= mtr_path_exists("$suitedir/suite/$suite",
|
||||
"$suitedir/$suite");
|
||||
mtr_verbose("suitedir: $suitedir");
|
||||
$combination_file= "$suitedir/$combination_file";
|
||||
}
|
||||
|
||||
my $testdir= "$suitedir/t";
|
||||
my $resdir= "$suitedir/r";
|
||||
|
||||
if (!@::opt_combination)
|
||||
{
|
||||
# Read combinations file
|
||||
if ( open(COMB,$combination_file) )
|
||||
{
|
||||
while (<COMB>)
|
||||
{
|
||||
chomp;
|
||||
s/\ +/ /g;
|
||||
push (@$combinations, $_) unless ($_ eq '');
|
||||
}
|
||||
close COMB;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
# take the combination from command-line
|
||||
@$combinations = @::opt_combination;
|
||||
}
|
||||
# Remember last element position
|
||||
my $begin_index = $#{@$cases} + 1;
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Build a hash of disabled testcases for this suite
|
||||
# ----------------------------------------------------------------------
|
||||
|
@ -335,6 +362,78 @@ sub collect_one_suite($$)
|
|||
closedir TESTDIR;
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Proccess combinations only if new tests were added
|
||||
# ----------------------------------------------------------------------
|
||||
if ($combinations && $begin_index <= $#{@$cases})
|
||||
{
|
||||
my $end_index = $#{@$cases};
|
||||
my $is_copy;
|
||||
# Keep original master/slave options
|
||||
my @orig_opts;
|
||||
for (my $idx = $begin_index; $idx <= $end_index; $idx++)
|
||||
{
|
||||
foreach my $param (('master_opt','slave_opt','slave_mi'))
|
||||
{
|
||||
@{$orig_opts[$idx]{$param}} = @{$cases->[$idx]->{$param}};
|
||||
}
|
||||
}
|
||||
my $comb_index = 1;
|
||||
# Copy original test cases
|
||||
foreach my $comb_set (@$combinations)
|
||||
{
|
||||
for (my $idx = $begin_index; $idx <= $end_index; $idx++)
|
||||
{
|
||||
my $test = $cases->[$idx];
|
||||
my $copied_test = {};
|
||||
foreach my $param (keys %{$test})
|
||||
{
|
||||
# Scalar. Copy as is.
|
||||
$copied_test->{$param} = $test->{$param};
|
||||
# Array. Copy reference instead itself
|
||||
if ($param =~ /(master_opt|slave_opt|slave_mi)/)
|
||||
{
|
||||
my $new_arr = [];
|
||||
@$new_arr = @{$orig_opts[$idx]{$param}};
|
||||
$copied_test->{$param} = $new_arr;
|
||||
}
|
||||
elsif ($param =~ /(comment|combinations)/)
|
||||
{
|
||||
$copied_test->{$param} = '';
|
||||
}
|
||||
}
|
||||
if ($is_copy)
|
||||
{
|
||||
push(@$cases, $copied_test);
|
||||
$test = $cases->[$#{@$cases}];
|
||||
}
|
||||
foreach my $comb_opt (split(/ /,$comb_set))
|
||||
{
|
||||
push(@{$test->{'master_opt'}},$comb_opt);
|
||||
push(@{$test->{'slave_opt'}},$comb_opt);
|
||||
# Enable rpl if added option is --binlog-format and test case supports that
|
||||
if ($comb_opt =~ /^--binlog-format=.+$/)
|
||||
{
|
||||
my @opt_pairs = split(/=/, $comb_opt);
|
||||
if ($test->{'binlog_format'} =~ /^$opt_pairs[1]$/ || $test->{'binlog_format'} eq '')
|
||||
{
|
||||
$test->{'skip'} = 0;
|
||||
$test->{'comment'} = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$test->{'skip'} = 1;
|
||||
$test->{'comment'} = "Requiring binlog format '$test->{'binlog_format'}'";;
|
||||
}
|
||||
}
|
||||
}
|
||||
$test->{'combination'} = $comb_set;
|
||||
}
|
||||
$is_copy = 1;
|
||||
$comb_index++;
|
||||
}
|
||||
}
|
||||
|
||||
return $cases;
|
||||
}
|
||||
|
||||
|
|
|
@ -164,6 +164,8 @@ our $opt_bench= 0;
|
|||
our $opt_small_bench= 0;
|
||||
our $opt_big_test= 0;
|
||||
|
||||
our @opt_combination;
|
||||
|
||||
our @opt_extra_mysqld_opt;
|
||||
|
||||
our $opt_compress;
|
||||
|
@ -529,6 +531,7 @@ sub command_line_setup () {
|
|||
'skip-im' => \$opt_skip_im,
|
||||
'skip-test=s' => \$opt_skip_test,
|
||||
'big-test' => \$opt_big_test,
|
||||
'combination=s' => \@opt_combination,
|
||||
|
||||
# Specify ports
|
||||
'master_port=i' => \$opt_master_myport,
|
||||
|
@ -5134,6 +5137,8 @@ Options to control what test suites or cases to run
|
|||
skip-im Don't start IM, and skip the IM test cases
|
||||
big-test Set the environment variable BIG_TEST, which can be
|
||||
checked from test cases.
|
||||
combination="ARG1 .. ARG2" Specify a set of "mysqld" arguments for one
|
||||
combination.
|
||||
|
||||
Options that specify ports
|
||||
|
||||
|
|
|
@ -17,8 +17,7 @@ update t1 set b=11 where a=2;
|
|||
update t1 set b=b+10;
|
||||
kill query ID;
|
||||
rollback;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
select * from t1 /* must be the same as before (1,1),(2,2) */;
|
||||
select * from t1 order by a /* must be the same as before (1,1),(2,2) */;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
|
@ -27,8 +26,7 @@ delete from t1 where a=2;
|
|||
delete from t1 where a=2;
|
||||
kill query ID;
|
||||
rollback;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
select * from t1 /* must be the same as before (1,1),(2,2) */;
|
||||
select * from t1 order by a /* must be the same as before (1,1),(2,2) */;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
|
@ -41,67 +39,45 @@ begin;
|
|||
insert into t1 select * from t4 for update;
|
||||
kill query ID;
|
||||
rollback;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
rollback;
|
||||
select * from t1 /* must be the same as before (1,1),(2,2) */;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
drop table t4;
|
||||
create table t4 (a int, b int) ENGINE=MyISAM /* for killing update and delete */;
|
||||
create function bug27563(n int)
|
||||
RETURNS int(11)
|
||||
DETERMINISTIC
|
||||
begin
|
||||
if n > 1 then
|
||||
if @b > 0 then
|
||||
select get_lock("a", 10) into @a;
|
||||
else
|
||||
set @b= 1;
|
||||
end if;
|
||||
return n;
|
||||
end|
|
||||
delete from t2;
|
||||
insert into t2 values (1,1), (2,2);
|
||||
delete from t4;
|
||||
insert into t4 values (1,1), (1,1);
|
||||
reset master;
|
||||
select get_lock("a", 20);
|
||||
get_lock("a", 20)
|
||||
1
|
||||
update t2 set b=b + bug27563(b) order by a;
|
||||
set @b= 0;
|
||||
update t4 set b=b + bug27563(b);
|
||||
kill query ID;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
select * from t2 /* must be (1,2), (2,2) */;
|
||||
a b
|
||||
1 2
|
||||
2 2
|
||||
must have the update event more to FD
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; update t2 set b=b + bug27563(b) order by a
|
||||
select
|
||||
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
|
||||
is not null;
|
||||
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
|
||||
is not null
|
||||
1
|
||||
select 0 /* must return 0 to mean the killed query is in */;
|
||||
0
|
||||
0
|
||||
select RELEASE_LOCK("a");
|
||||
RELEASE_LOCK("a")
|
||||
1
|
||||
delete from t2;
|
||||
insert into t2 values (1,1), (2,2);
|
||||
reset master;
|
||||
select get_lock("a", 20);
|
||||
get_lock("a", 20)
|
||||
1
|
||||
delete from t2 where a=1 or a=bug27563(2) order by a;
|
||||
kill query ID;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
select * from t2 /* must be (1,2), (2,2) */;
|
||||
select * from t4 order by b /* must be (1,1), (1,2) */;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
must have the update event more to FD
|
||||
1 2
|
||||
select @b /* must be 1 at the end of a stmt calling bug27563() */;
|
||||
@b
|
||||
1
|
||||
must have the update query event more to FD
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # User var # # @`b`=0
|
||||
master-bin.000001 # Query # # use `test`; update t4 set b=b + bug27563(b)
|
||||
select
|
||||
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
|
||||
is not null;
|
||||
|
@ -114,6 +90,39 @@ select 0 /* must return 0 to mean the killed query is in */;
|
|||
select RELEASE_LOCK("a");
|
||||
RELEASE_LOCK("a")
|
||||
1
|
||||
delete from t4;
|
||||
insert into t4 values (1,1), (2,2);
|
||||
reset master;
|
||||
select get_lock("a", 20);
|
||||
get_lock("a", 20)
|
||||
1
|
||||
set @b= 0;
|
||||
delete from t4 where b=bug27563(1) or b=bug27563(2);
|
||||
kill query ID;
|
||||
select count(*) from t4 /* must be 1 */;
|
||||
count(*)
|
||||
1
|
||||
select @b /* must be 1 at the end of a stmt calling bug27563() */;
|
||||
@b
|
||||
1
|
||||
must have the delete query event more to FD
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # User var # # @`b`=0
|
||||
master-bin.000001 # Query # # use `test`; delete from t4 where b=bug27563(1) or b=bug27563(2)
|
||||
select
|
||||
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
|
||||
is not null;
|
||||
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
|
||||
is not null
|
||||
1
|
||||
select 0 /* must return 0 to mean the killed query is in */;
|
||||
0
|
||||
0
|
||||
select RELEASE_LOCK("a");
|
||||
RELEASE_LOCK("a")
|
||||
1
|
||||
drop table t4;
|
||||
drop function bug27563;
|
||||
drop table t1,t2,t3;
|
||||
end of the tests
|
||||
|
|
|
@ -68,7 +68,6 @@ select @result /* must be zero either way */;
|
|||
delete from t1;
|
||||
delete from t2;
|
||||
insert into t1 values (1,1),(2,2);
|
||||
let $ID= `select connection_id()`;
|
||||
|
||||
#
|
||||
# simple update
|
||||
|
@ -77,6 +76,7 @@ connection con1;
|
|||
begin; update t1 set b=11 where a=2;
|
||||
|
||||
connection con2;
|
||||
let $ID= `select connection_id()`;
|
||||
send update t1 set b=b+10;
|
||||
|
||||
connection con1;
|
||||
|
@ -85,9 +85,9 @@ eval kill query $ID;
|
|||
rollback;
|
||||
|
||||
connection con2;
|
||||
--error ER_QUERY_INTERRUPTED
|
||||
--error 0,ER_QUERY_INTERRUPTED
|
||||
reap;
|
||||
select * from t1 /* must be the same as before (1,1),(2,2) */;
|
||||
select * from t1 order by a /* must be the same as before (1,1),(2,2) */;
|
||||
|
||||
#
|
||||
# multi update
|
||||
|
@ -120,6 +120,7 @@ connection con1;
|
|||
begin; delete from t1 where a=2;
|
||||
|
||||
connection con2;
|
||||
let $ID= `select connection_id()`;
|
||||
send delete from t1 where a=2;
|
||||
|
||||
connection con1;
|
||||
|
@ -128,9 +129,9 @@ eval kill query $ID;
|
|||
rollback;
|
||||
|
||||
connection con2;
|
||||
--error ER_QUERY_INTERRUPTED
|
||||
--error 0,ER_QUERY_INTERRUPTED
|
||||
reap;
|
||||
select * from t1 /* must be the same as before (1,1),(2,2) */;
|
||||
select * from t1 order by a /* must be the same as before (1,1),(2,2) */;
|
||||
|
||||
#
|
||||
# multi delete
|
||||
|
@ -163,6 +164,7 @@ insert into t4 values (3, 3);
|
|||
begin; insert into t1 values (3, 3);
|
||||
|
||||
connection con2;
|
||||
let $ID= `select connection_id()`;
|
||||
begin;
|
||||
send insert into t1 select * from t4 for update;
|
||||
|
||||
|
@ -172,7 +174,7 @@ eval kill query $ID;
|
|||
rollback;
|
||||
|
||||
connection con2;
|
||||
--error ER_QUERY_INTERRUPTED
|
||||
--error 0,ER_QUERY_INTERRUPTED
|
||||
reap;
|
||||
rollback;
|
||||
select * from t1 /* must be the same as before (1,1),(2,2) */;
|
||||
|
@ -182,13 +184,17 @@ drop table t4; # cleanup for the sub-case
|
|||
###
|
||||
## non-ta table case: killing must be recorded in binlog
|
||||
###
|
||||
create table t4 (a int, b int) ENGINE=MyISAM /* for killing update and delete */;
|
||||
|
||||
delimiter |;
|
||||
create function bug27563(n int)
|
||||
RETURNS int(11)
|
||||
DETERMINISTIC
|
||||
begin
|
||||
if n > 1 then
|
||||
if @b > 0 then
|
||||
select get_lock("a", 10) into @a;
|
||||
else
|
||||
set @b= 1;
|
||||
end if;
|
||||
return n;
|
||||
end|
|
||||
|
@ -198,25 +204,27 @@ delimiter ;|
|
|||
# update
|
||||
#
|
||||
|
||||
delete from t2;
|
||||
insert into t2 values (1,1), (2,2);
|
||||
delete from t4;
|
||||
insert into t4 values (1,1), (1,1);
|
||||
reset master;
|
||||
connection con1;
|
||||
select get_lock("a", 20);
|
||||
|
||||
connection con2;
|
||||
let $ID= `select connection_id()`;
|
||||
send update t2 set b=b + bug27563(b) order by a;
|
||||
set @b= 0;
|
||||
send update t4 set b=b + bug27563(b);
|
||||
|
||||
connection con1;
|
||||
--replace_result $ID ID
|
||||
eval kill query $ID;
|
||||
|
||||
connection con2;
|
||||
--error ER_QUERY_INTERRUPTED
|
||||
--error 0,ER_QUERY_INTERRUPTED
|
||||
reap;
|
||||
select * from t2 /* must be (1,2), (2,2) */;
|
||||
--echo must have the update event more to FD
|
||||
select * from t4 order by b /* must be (1,1), (1,2) */;
|
||||
select @b /* must be 1 at the end of a stmt calling bug27563() */;
|
||||
--echo must have the update query event more to FD
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
# a proof the query is binlogged with an error
|
||||
|
@ -239,25 +247,27 @@ select RELEASE_LOCK("a");
|
|||
# delete
|
||||
#
|
||||
|
||||
delete from t2;
|
||||
insert into t2 values (1,1), (2,2);
|
||||
delete from t4;
|
||||
insert into t4 values (1,1), (2,2);
|
||||
reset master;
|
||||
connection con1;
|
||||
select get_lock("a", 20);
|
||||
|
||||
connection con2;
|
||||
let $ID= `select connection_id()`;
|
||||
send delete from t2 where a=1 or a=bug27563(2) order by a;
|
||||
set @b= 0;
|
||||
send delete from t4 where b=bug27563(1) or b=bug27563(2);
|
||||
|
||||
connection con1;
|
||||
--replace_result $ID ID
|
||||
eval kill query $ID;
|
||||
|
||||
connection con2;
|
||||
--error ER_QUERY_INTERRUPTED
|
||||
--error 0,ER_QUERY_INTERRUPTED
|
||||
reap;
|
||||
select * from t2 /* must be (1,2), (2,2) */;
|
||||
--echo must have the update event more to FD
|
||||
select count(*) from t4 /* must be 1 */;
|
||||
select @b /* must be 1 at the end of a stmt calling bug27563() */;
|
||||
--echo must have the delete query event more to FD
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
# a proof the query is binlogged with an error
|
||||
|
@ -276,6 +286,8 @@ connection con1;
|
|||
select RELEASE_LOCK("a");
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
|
||||
|
||||
drop table t4;
|
||||
|
||||
#
|
||||
# load data - see simulation tests
|
||||
#
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
-- source include/have_debug.inc
|
||||
-- source include/have_binlog_format_mixed_or_statement.inc
|
||||
#
|
||||
# bug#27571 asynchronous setting mysql_$query()'s local error and
|
||||
|
|
|
@ -615,6 +615,66 @@ c1 c2 c3 c4 c5 c6 c7
|
|||
1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
|
||||
2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
|
||||
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
|
||||
*** Create t14a on slave ***
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
|
||||
c6 INT DEFAULT '1',
|
||||
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
|
||||
)ENGINE='InnoDB';
|
||||
*** Create t14a on Master ***
|
||||
CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
|
||||
) ENGINE='InnoDB';
|
||||
RESET MASTER;
|
||||
*** Start Slave ***
|
||||
START SLAVE;
|
||||
*** Master Data Insert ***
|
||||
set @b1 = 'b1b1b1b1';
|
||||
set @b1 = concat(@b1,@b1);
|
||||
INSERT INTO t14a () VALUES(1,@b1,'Kyle'),
|
||||
(2,@b1,'JOE'),
|
||||
(3,@b1,'QA');
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
c1 c4 c5
|
||||
1 b1b1b1b1b1b1b1b1 Kyle
|
||||
2 b1b1b1b1b1b1b1b1 JOE
|
||||
3 b1b1b1b1b1b1b1b1 QA
|
||||
*** Select on Slave ****
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
c1 c4 c5 c6 c7
|
||||
1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
|
||||
2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
|
||||
3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
*** Master Drop c5 ***
|
||||
ALTER TABLE t14a DROP COLUMN c5;
|
||||
RESET MASTER;
|
||||
*** Start Slave ***
|
||||
START SLAVE;
|
||||
*** Master Data Insert ***
|
||||
set @b1 = 'b1b1b1b1';
|
||||
set @b1 = concat(@b1,@b1);
|
||||
INSERT INTO t14a () VALUES(4,@b1),
|
||||
(5,@b1),
|
||||
(6,@b1);
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
c1 c4
|
||||
1 b1b1b1b1b1b1b1b1
|
||||
2 b1b1b1b1b1b1b1b1
|
||||
3 b1b1b1b1b1b1b1b1
|
||||
4 b1b1b1b1b1b1b1b1
|
||||
5 b1b1b1b1b1b1b1b1
|
||||
6 b1b1b1b1b1b1b1b1
|
||||
*** Select on Slave ****
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
c1 c4 c5 c6 c7
|
||||
1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
|
||||
2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
|
||||
3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
|
||||
4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
|
||||
5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
|
||||
6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
|
||||
*** connect to master and drop columns ***
|
||||
ALTER TABLE t14 DROP COLUMN c2;
|
||||
ALTER TABLE t14 DROP COLUMN c4;
|
||||
|
|
|
@ -615,6 +615,66 @@ c1 c2 c3 c4 c5 c6 c7
|
|||
1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
|
||||
2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
|
||||
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
|
||||
*** Create t14a on slave ***
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
|
||||
c6 INT DEFAULT '1',
|
||||
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
|
||||
)ENGINE='MyISAM';
|
||||
*** Create t14a on Master ***
|
||||
CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
|
||||
) ENGINE='MyISAM';
|
||||
RESET MASTER;
|
||||
*** Start Slave ***
|
||||
START SLAVE;
|
||||
*** Master Data Insert ***
|
||||
set @b1 = 'b1b1b1b1';
|
||||
set @b1 = concat(@b1,@b1);
|
||||
INSERT INTO t14a () VALUES(1,@b1,'Kyle'),
|
||||
(2,@b1,'JOE'),
|
||||
(3,@b1,'QA');
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
c1 c4 c5
|
||||
1 b1b1b1b1b1b1b1b1 Kyle
|
||||
2 b1b1b1b1b1b1b1b1 JOE
|
||||
3 b1b1b1b1b1b1b1b1 QA
|
||||
*** Select on Slave ****
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
c1 c4 c5 c6 c7
|
||||
1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
|
||||
2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
|
||||
3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
*** Master Drop c5 ***
|
||||
ALTER TABLE t14a DROP COLUMN c5;
|
||||
RESET MASTER;
|
||||
*** Start Slave ***
|
||||
START SLAVE;
|
||||
*** Master Data Insert ***
|
||||
set @b1 = 'b1b1b1b1';
|
||||
set @b1 = concat(@b1,@b1);
|
||||
INSERT INTO t14a () VALUES(4,@b1),
|
||||
(5,@b1),
|
||||
(6,@b1);
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
c1 c4
|
||||
1 b1b1b1b1b1b1b1b1
|
||||
2 b1b1b1b1b1b1b1b1
|
||||
3 b1b1b1b1b1b1b1b1
|
||||
4 b1b1b1b1b1b1b1b1
|
||||
5 b1b1b1b1b1b1b1b1
|
||||
6 b1b1b1b1b1b1b1b1
|
||||
*** Select on Slave ****
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
c1 c4 c5 c6 c7
|
||||
1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP
|
||||
2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
|
||||
3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
|
||||
4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
|
||||
5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
|
||||
6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP
|
||||
*** connect to master and drop columns ***
|
||||
ALTER TABLE t14 DROP COLUMN c2;
|
||||
ALTER TABLE t14 DROP COLUMN c4;
|
||||
|
|
|
@ -4,6 +4,11 @@ reset master;
|
|||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
STOP SLAVE;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
RESET SLAVE;
|
||||
START SLAVE;
|
||||
**** On Master ****
|
||||
SET SESSION BINLOG_FORMAT=STATEMENT;
|
||||
SET GLOBAL BINLOG_FORMAT=STATEMENT;
|
||||
|
@ -31,10 +36,17 @@ a b
|
|||
DROP TABLE t1;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
RESET SLAVE;
|
||||
START SLAVE;
|
||||
**** On Master ****
|
||||
SET SESSION BINLOG_FORMAT=MIXED;
|
||||
SET GLOBAL BINLOG_FORMAT=MIXED;
|
||||
|
@ -62,10 +74,17 @@ a b
|
|||
DROP TABLE t1;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
RESET SLAVE;
|
||||
START SLAVE;
|
||||
**** On Master ****
|
||||
SET SESSION BINLOG_FORMAT=ROW;
|
||||
SET GLOBAL BINLOG_FORMAT=ROW;
|
||||
|
@ -93,11 +112,18 @@ a b
|
|||
DROP TABLE t1;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
RESET SLAVE;
|
||||
START SLAVE;
|
||||
**** On Master ****
|
||||
SET SESSION BINLOG_FORMAT=STATEMENT;
|
||||
SET GLOBAL BINLOG_FORMAT=STATEMENT;
|
||||
|
@ -125,10 +151,17 @@ a b
|
|||
DROP TABLE t1;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
||||
master-bin.000001 # Query # # use `test`; DELETE FROM t1
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
RESET SLAVE;
|
||||
START SLAVE;
|
||||
**** On Master ****
|
||||
SET SESSION BINLOG_FORMAT=MIXED;
|
||||
SET GLOBAL BINLOG_FORMAT=MIXED;
|
||||
|
@ -156,10 +189,17 @@ a b
|
|||
DROP TABLE t1;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
||||
master-bin.000001 # Query # # use `test`; DELETE FROM t1
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
RESET SLAVE;
|
||||
START SLAVE;
|
||||
**** On Master ****
|
||||
SET SESSION BINLOG_FORMAT=ROW;
|
||||
SET GLOBAL BINLOG_FORMAT=ROW;
|
||||
|
@ -188,9 +228,11 @@ a b
|
|||
DROP TABLE t1;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
RESET MASTER;
|
||||
|
|
|
@ -4,6 +4,11 @@ reset master;
|
|||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
STOP SLAVE;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
RESET SLAVE;
|
||||
START SLAVE;
|
||||
**** On Master ****
|
||||
SET SESSION BINLOG_FORMAT=STATEMENT;
|
||||
SET GLOBAL BINLOG_FORMAT=STATEMENT;
|
||||
|
@ -31,12 +36,19 @@ a b
|
|||
DROP TABLE t1;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
RESET SLAVE;
|
||||
START SLAVE;
|
||||
**** On Master ****
|
||||
SET SESSION BINLOG_FORMAT=MIXED;
|
||||
SET GLOBAL BINLOG_FORMAT=MIXED;
|
||||
|
@ -64,12 +76,19 @@ a b
|
|||
DROP TABLE t1;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
RESET SLAVE;
|
||||
START SLAVE;
|
||||
**** On Master ****
|
||||
SET SESSION BINLOG_FORMAT=ROW;
|
||||
SET GLOBAL BINLOG_FORMAT=ROW;
|
||||
|
@ -97,6 +116,7 @@ a b
|
|||
DROP TABLE t1;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
|
@ -104,6 +124,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */
|
|||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
RESET SLAVE;
|
||||
START SLAVE;
|
||||
**** On Master ****
|
||||
SET SESSION BINLOG_FORMAT=STATEMENT;
|
||||
SET GLOBAL BINLOG_FORMAT=STATEMENT;
|
||||
|
@ -131,12 +157,19 @@ a b
|
|||
DROP TABLE t1;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; DELETE FROM t1
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
RESET SLAVE;
|
||||
START SLAVE;
|
||||
**** On Master ****
|
||||
SET SESSION BINLOG_FORMAT=MIXED;
|
||||
SET GLOBAL BINLOG_FORMAT=MIXED;
|
||||
|
@ -164,12 +197,19 @@ a b
|
|||
DROP TABLE t1;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; DELETE FROM t1
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
RESET MASTER;
|
||||
STOP SLAVE;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
RESET SLAVE;
|
||||
START SLAVE;
|
||||
**** On Master ****
|
||||
SET SESSION BINLOG_FORMAT=ROW;
|
||||
SET GLOBAL BINLOG_FORMAT=ROW;
|
||||
|
@ -198,6 +238,7 @@ a b
|
|||
DROP TABLE t1;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
|
@ -206,3 +247,4 @@ master-bin.000001 # Table_map # # table_id: # (test.t1)
|
|||
master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
||||
RESET MASTER;
|
||||
|
|
|
@ -13,6 +13,8 @@ save_master_pos;
|
|||
connection slave;
|
||||
sync_with_master;
|
||||
stop slave;
|
||||
# Make sure the slave sql and io thread has stopped
|
||||
--source include/wait_for_slave_to_stop.inc
|
||||
|
||||
connection master;
|
||||
# create some events on master
|
||||
|
@ -52,6 +54,8 @@ save_master_pos;
|
|||
connection slave;
|
||||
sync_with_master;
|
||||
stop slave;
|
||||
# Make sure the slave sql and io thread has stopped
|
||||
--source include/wait_for_slave_to_stop.inc
|
||||
|
||||
# this should stop immediately as we are already there
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=740;
|
||||
|
|
|
@ -12,6 +12,8 @@ save_master_pos;
|
|||
connection slave;
|
||||
sync_with_master;
|
||||
stop slave;
|
||||
# Make sure the slave sql and io thread has stopped
|
||||
--source include/wait_for_slave_to_stop.inc
|
||||
|
||||
connection master;
|
||||
# create some events on master
|
||||
|
@ -51,6 +53,8 @@ save_master_pos;
|
|||
connection slave;
|
||||
sync_with_master;
|
||||
stop slave;
|
||||
# Make sure the slave sql and io thread has stopped
|
||||
--source include/wait_for_slave_to_stop.inc
|
||||
|
||||
# this should stop immediately as we are already there
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=776;
|
||||
|
|
|
@ -615,6 +615,66 @@ c1 c2 c3 c4 c5 c6 c7
|
|||
1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP
|
||||
2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP
|
||||
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP
|
||||
*** Create t14a on slave ***
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
|
||||
c6 INT DEFAULT '1',
|
||||
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
|
||||
)ENGINE='NDB';
|
||||
*** Create t14a on Master ***
|
||||
CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
|
||||
) ENGINE='NDB';
|
||||
RESET MASTER;
|
||||
*** Start Slave ***
|
||||
START SLAVE;
|
||||
*** Master Data Insert ***
|
||||
set @b1 = 'b1b1b1b1';
|
||||
set @b1 = concat(@b1,@b1);
|
||||
INSERT INTO t14a () VALUES(1,@b1,'Kyle'),
|
||||
(2,@b1,'JOE'),
|
||||
(3,@b1,'QA');
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
c1 c4 c5
|
||||
1 b1b1b1b1b1b1b1b1 Kyle
|
||||
2 b1b1b1b1b1b1b1b1 JOE
|
||||
3 b1b1b1b1b1b1b1b1 QA
|
||||
*** Select on Slave ****
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
c1 c4 c5 c6 c7
|
||||
1 b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP
|
||||
2 b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP
|
||||
3 b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
*** Master Drop c5 ***
|
||||
ALTER TABLE t14a DROP COLUMN c5;
|
||||
RESET MASTER;
|
||||
*** Start Slave ***
|
||||
START SLAVE;
|
||||
*** Master Data Insert ***
|
||||
set @b1 = 'b1b1b1b1';
|
||||
set @b1 = concat(@b1,@b1);
|
||||
INSERT INTO t14a () VALUES(4,@b1),
|
||||
(5,@b1),
|
||||
(6,@b1);
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
c1 c4
|
||||
1 b1b1b1b1b1b1b1b1
|
||||
2 b1b1b1b1b1b1b1b1
|
||||
3 b1b1b1b1b1b1b1b1
|
||||
4 b1b1b1b1b1b1b1b1
|
||||
5 b1b1b1b1b1b1b1b1
|
||||
6 b1b1b1b1b1b1b1b1
|
||||
*** Select on Slave ****
|
||||
SELECT * FROM t14a ORDER BY c1;
|
||||
c1 c4 c5 c6 c7
|
||||
1 b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP
|
||||
2 b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP
|
||||
3 b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP
|
||||
4 b1b1b1b1b1b1b1b1 NULL NULL CURRENT_TIMESTAMP
|
||||
5 b1b1b1b1b1b1b1b1 NULL NULL CURRENT_TIMESTAMP
|
||||
6 b1b1b1b1b1b1b1b1 NULL NULL CURRENT_TIMESTAMP
|
||||
*** connect to master and drop columns ***
|
||||
ALTER TABLE t14 DROP COLUMN c2;
|
||||
ALTER TABLE t14 DROP COLUMN c4;
|
||||
|
|
Loading…
Reference in a new issue