mariadb/mysql-test/t/rpl000001.test
unknown 4d4dbc94c2 BitKeeper/triggers/post-commit
do REAL_EMAIL magic
mysql-test/mysql-test-run.sh
    added show_failed_diffs
mysql-test/r/bench_count_distinct.result
    tired of waiting :-)
mysql-test/r/rpl000001.result
    new test results after implementing Monty's Hack (TM)
mysql-test/t/bench_count_distinct.test
    tired of waiting
mysql-test/t/rpl000001.test
    implemented Monty's Hack (TM) to kill a query in the middle of update
    without generating a table with 30,000 rows. This will also avoice the
    timing uncertainty


BitKeeper/triggers/post-commit:
  do REAL_EMAIL magic
mysql-test/mysql-test-run.sh:
  added show_failed_diffs
mysql-test/r/bench_count_distinct.result:
  tired of waiting :-)
mysql-test/r/rpl000001.result:
  new test results after implementing Monty's Hack (TM)
mysql-test/t/bench_count_distinct.test:
  tired of waiting
mysql-test/t/rpl000001.test:
  implemented Monty's Hack (TM) to kill a query in the middle of update
  without generating a table with 30,000 rows. This will also avoice the
  timing uncertainty
2001-04-12 13:46:19 -06:00

80 lines
1.6 KiB
Text

source include/master-slave.inc;
connection master;
use test;
drop table if exists t1;
create table t1 (word char(20) not null);
load data infile '../../std_data/words.dat' into table t1;
drop table if exists foo;
set password = password('foo');
set password = password('');
create table foo(n int);
insert into foo values(1),(2);
save_master_pos;
connection slave;
sync_with_master;
use test;
select * from foo;
select sum(length(word)) from t1;
connection master;
drop table t1;
save_master_pos;
connection slave;
sync_with_master;
#test handling of aborted connection in the middle of update
connection master;
reset master;
connection slave;
reset slave;
connection master;
drop table if exists t1,t2;
create table t1(n int);
let $1=10;
while ($1)
{
eval insert into t1 values($1);
dec $1;
}
create table t2(id int);
insert into t2 values(connection_id());
save_master_pos;
connection master1;
#avoid generating result
create temporary table t1_temp(n int);
insert into t1_temp select get_lock('crash_lock', 1) from t2;
connection master;
send update t1 set n = n + get_lock('crash_lock', 2);
connection master1;
sleep 2;
select (@id := id) - id from t2;
kill @id;
drop table t2;
connection master;
--error 1053;
reap;
connection slave;
sync_with_master ;
#give the slave a chance to exit
sleep 0.5;
show slave status;
set sql_slave_skip_counter=1;
slave start;
select count(*) from t1;
connection master1;
drop table t1;
create table t1 (n int);
insert into t1 values(3456);
save_master_pos;
connection slave;
sync_with_master;
select n from t1;
connection master1;
drop table t1;
save_master_pos;
connection slave;
sync_with_master;