mariadb/mysql-test/t/rpl000001.test

93 lines
2.1 KiB
Text
Raw Normal View History

fixed up mysql-test - will not push this yet, as more clean up/testing is to follow BitKeeper/deleted/.del-README~b8e00a1b57b91f69: ***MISSING WEAVE*** BitKeeper/deleted/.del-README~2bddc2706d0834d0: ***MISSING WEAVE*** mysql-test/r/alt000001.result: mvdir mysql-test/r/ins000001.result: mvdir mysql-test/r/rpl000001.a.result: mvdir mysql-test/r/rpl000001.b.result: mvdir mysql-test/r/rpl000002.result: mvdir mysql-test/r/rpl000003.result: mvdir mysql-test/r/rpl000004.a.result: mvdir mysql-test/r/rpl000004.b.result: mvdir mysql-test/r/rpl000005.result: mvdir mysql-test/r/rpl000006.result: mvdir mysql-test/r/rpl000007.result: mvdir mysql-test/r/rpl000008.result: mvdir mysql-test/r/rpl000009.result: mvdir mysql-test/r/rpl000010.result: mvdir mysql-test/r/rpl000011.result: mvdir mysql-test/r/rpl000012.result: mvdir mysql-test/r/rpl000012.status.result: mvdir mysql-test/r/rpl000013.result: mvdir mysql-test/r/rpl000013.status.result: mvdir mysql-test/r/sel000001.result: mvdir mysql-test/r/sel000002.result: mvdir mysql-test/r/sel000003.result: mvdir mysql-test/r/sel000004.result: mvdir mysql-test/r/sel000005.result: mvdir mysql-test/r/sel000006.result: mvdir mysql-test/r/sel000007.result: mvdir mysql-test/r/sel000008.result: mvdir mysql-test/r/sel000009.result: mvdir mysql-test/r/sel000010.result: mvdir mysql-test/r/sel000011.result: mvdir mysql-test/r/sel000012.result: mvdir mysql-test/r/sel000013.result: mvdir mysql-test/r/sel000014.result: mvdir mysql-test/r/sel000015.result: mvdir mysql-test/r/sel000016.result: mvdir mysql-test/r/sel000017.result: mvdir mysql-test/r/sel000018.result: mvdir mysql-test/r/sel000019.result: mvdir mysql-test/r/sel000020.result: mvdir mysql-test/r/sel000021.result: mvdir mysql-test/r/sel000022.result: mvdir mysql-test/r/sel000023.result: mvdir mysql-test/r/sel000024.result: mvdir mysql-test/r/sel000025.result: mvdir mysql-test/r/sel000026.result: mvdir mysql-test/r/sel000027.result: mvdir mysql-test/r/sel000028.result: mvdir mysql-test/r/sel000029.result: mvdir mysql-test/r/sel000030.result: mvdir mysql-test/r/sel000100.result: mvdir mysql-test/r/shw000001.result: mvdir mysql-test/t/README: mvdir mysql-test/t/err000001.test: mvdir mysql-test/t/rpl000007-slave.opt: mvdir mysql-test/t/rpl000008-slave.opt: mvdir mysql-test/t/rpl000009-slave.opt: mvdir mysql-test/t/rpl000010-slave.opt: mvdir mysql-test/t/rpl000013-slave.opt: mvdir BitKeeper/deleted/.del-start-mysqld~9c8f21a7ab97793a: ***MISSING WEAVE*** BitKeeper/deleted/.del-stop-mysqld~89a1194045f05d1c: ***MISSING WEAVE*** BitKeeper/deleted/.del-translate-tests~3869c1fdf0a5ea1a: ***MISSING WEAVE*** BitKeeper/deleted/.del-README~108667adaeabe3f5: ***MISSING WEAVE*** BitKeeper/deleted/.del-README~c5aaceda4c2b1a8: ***MISSING WEAVE*** BitKeeper/deleted/.del-select-key.master~e6b83af25df0ce5: ***MISSING WEAVE*** mysql-test/std_data/words.dat: Rename: mysql-test/std_data/words -> mysql-test/std_data/words.dat BitKeeper/deleted/.del-simple-select.master~6f3eb98812926caf: ***MISSING WEAVE*** Makefile.am: add mysql-test to distribution configure.in: added mysql-test libmysql/Makefile.am: include hash.h libmysql/Makefile.shared: add hash to libmysqlclient mysql-test/Makefile.am: mysql-test is now in source dist also mysql-test/chew_on_this/select.res: ***MISSING WEAVE*** mysql-test/install_test_db: renamed file, moved to different directory, and fixed up to work on binary dist mysql-test/mysql-test-run: clean-up of test suite, make it work on binary dist mysql-test/t/alt000001.test: moved directory mysql-test/t/ins000001.test: moved directory mysql-test/t/rpl000001.test: moved dir mysql-test/t/rpl000002.test: moved dir mysql-test/t/rpl000003.test: moved dir mysql-test/t/rpl000004.test: moved dir mysql-test/t/rpl000005.test: moved dir mysql-test/t/rpl000006.test: moved dir mysql-test/t/rpl000007.test: moved dir mysql-test/t/rpl000008.test: moved dir mysql-test/t/rpl000009.test: moved dir mysql-test/t/rpl000010.test: moved dir mysql-test/t/rpl000011.test: moved dir mysql-test/t/rpl000012.test: moved dir mysql-test/t/rpl000013.test: moved dir mysql-test/t/sel000001.test: moved dir mysql-test/t/sel000002.test: moved dir BitKeeper/etc/ignore: Added libmysql_r/hash.c scripts/mysql-3.23.29-gamma-pc-linux-gnu-i686.tar.gz to the ignore list mysql-test/t/sel000003.test: moved dir mysql-test/t/sel000004.test: moved dir mysql-test/t/sel000005.test: moved dir mysql-test/t/sel000100.test: moved dir mysql-test/t/shw000001.test: moved dir scripts/make_binary_distribution.sh: fixes to include mysql-test added -debug option to exit after building temp dir before tar.gz removed a bunch of SCCS files
2000-12-07 15:54:59 +01:00
source include/master-slave.inc;
connection master;
use test;
drop table if exists t1,t3;
create table t1 (word char(20) not null);
load data infile '../../std_data/words.dat' into table t1;
set password = password('foo');
set password = password('');
create table t3(n int);
insert into t3 values(1),(2);
rpl000016.test sync rpl000001.result BitKeeper file /home/sasha/src/bk/mysql/mysql-test/r/rpl000001.result ignore Added BitKeeper/tmp/bkr3sAHD to the ignore list slave.h MASTER_POS_WAIT lex.h MASTER_POS_WAIT slave.cc MASTER_POS_WAIT, do automagic restart on debugging abort, skip rotate events in slave.cc debug abort count sql_repl.cc announce the log name at the start of the log with a fake rotate event item_create.h MASTER_POS_WAIT item_func.cc MASTER_POS_WAIT item_func.h MASTER_POS_WAIT sql_class.h enter_cond(), exit_cond() helper inliners item_create.cc added MASTER_POS_WAIT mysql-test-run.sh speed improvement fixes rpl000007.test sync rpl000003.test sleep -> sync rpl000004.test sleep -> sync, fixed clean up bug rpl000014.test sync rpl000009.test sync rpl000013.test sync rpl000001.test sleep -> sync rpl000008.test sync rpl000006.test sync on cleanup rpl000011.test sync rpl000012.test sync rpl000005.test sleep -> sync rpl000010.test sync rpl000015.test sync rpl000002.test sleep -> sync rpl000014.result we now know the master log name as soon as we connect mysql.cc added optional agrument to --wait mysqltest.c added save_master_pos and sync_with_master commands client/mysql.cc: added optional agrument to --wait client/mysqltest.c: added save_master_pos and sync_with_master commands mysql-test/mysql-test-run.sh: speed improvement fixes mysql-test/r/rpl000014.result: we now know the master log name as soon as we connect mysql-test/t/rpl000001.test: sleep -> sync mysql-test/t/rpl000002.test: sleep -> sync mysql-test/t/rpl000003.test: sleep -> sync mysql-test/t/rpl000004.test: sleep -> sync, fixed clean up bug mysql-test/t/rpl000005.test: sleep -> sync mysql-test/t/rpl000006.test: sync on cleanup mysql-test/t/rpl000007.test: sync mysql-test/t/rpl000008.test: sync mysql-test/t/rpl000009.test: sync mysql-test/t/rpl000010.test: sync mysql-test/t/rpl000011.test: sync mysql-test/t/rpl000012.test: sync mysql-test/t/rpl000013.test: sync mysql-test/t/rpl000014.test: sync mysql-test/t/rpl000015.test: sync BitKeeper/etc/ignore: Added BitKeeper/tmp/bkr3sAHD to the ignore list mysql-test/t/rpl000016.test: sync sql/item_create.cc: added MASTER_POS_WAIT sql/item_create.h: MASTER_POS_WAIT sql/item_func.cc: MASTER_POS_WAIT sql/item_func.h: MASTER_POS_WAIT sql/lex.h: MASTER_POS_WAIT sql/slave.cc: MASTER_POS_WAIT, do automagic restart on debugging abort, skip rotate events in debug abort count sql/slave.h: MASTER_POS_WAIT sql/sql_class.h: enter_cond(), exit_cond() helper inliners sql/sql_repl.cc: announce the log name at the start of the log with a fake rotate event
2001-01-17 13:47:33 +01:00
save_master_pos;
connection slave;
rpl000016.test sync rpl000001.result BitKeeper file /home/sasha/src/bk/mysql/mysql-test/r/rpl000001.result ignore Added BitKeeper/tmp/bkr3sAHD to the ignore list slave.h MASTER_POS_WAIT lex.h MASTER_POS_WAIT slave.cc MASTER_POS_WAIT, do automagic restart on debugging abort, skip rotate events in slave.cc debug abort count sql_repl.cc announce the log name at the start of the log with a fake rotate event item_create.h MASTER_POS_WAIT item_func.cc MASTER_POS_WAIT item_func.h MASTER_POS_WAIT sql_class.h enter_cond(), exit_cond() helper inliners item_create.cc added MASTER_POS_WAIT mysql-test-run.sh speed improvement fixes rpl000007.test sync rpl000003.test sleep -> sync rpl000004.test sleep -> sync, fixed clean up bug rpl000014.test sync rpl000009.test sync rpl000013.test sync rpl000001.test sleep -> sync rpl000008.test sync rpl000006.test sync on cleanup rpl000011.test sync rpl000012.test sync rpl000005.test sleep -> sync rpl000010.test sync rpl000015.test sync rpl000002.test sleep -> sync rpl000014.result we now know the master log name as soon as we connect mysql.cc added optional agrument to --wait mysqltest.c added save_master_pos and sync_with_master commands client/mysql.cc: added optional agrument to --wait client/mysqltest.c: added save_master_pos and sync_with_master commands mysql-test/mysql-test-run.sh: speed improvement fixes mysql-test/r/rpl000014.result: we now know the master log name as soon as we connect mysql-test/t/rpl000001.test: sleep -> sync mysql-test/t/rpl000002.test: sleep -> sync mysql-test/t/rpl000003.test: sleep -> sync mysql-test/t/rpl000004.test: sleep -> sync, fixed clean up bug mysql-test/t/rpl000005.test: sleep -> sync mysql-test/t/rpl000006.test: sync on cleanup mysql-test/t/rpl000007.test: sync mysql-test/t/rpl000008.test: sync mysql-test/t/rpl000009.test: sync mysql-test/t/rpl000010.test: sync mysql-test/t/rpl000011.test: sync mysql-test/t/rpl000012.test: sync mysql-test/t/rpl000013.test: sync mysql-test/t/rpl000014.test: sync mysql-test/t/rpl000015.test: sync BitKeeper/etc/ignore: Added BitKeeper/tmp/bkr3sAHD to the ignore list mysql-test/t/rpl000016.test: sync sql/item_create.cc: added MASTER_POS_WAIT sql/item_create.h: MASTER_POS_WAIT sql/item_func.cc: MASTER_POS_WAIT sql/item_func.h: MASTER_POS_WAIT sql/lex.h: MASTER_POS_WAIT sql/slave.cc: MASTER_POS_WAIT, do automagic restart on debugging abort, skip rotate events in debug abort count sql/slave.h: MASTER_POS_WAIT sql/sql_class.h: enter_cond(), exit_cond() helper inliners sql/sql_repl.cc: announce the log name at the start of the log with a fake rotate event
2001-01-17 13:47:33 +01:00
sync_with_master;
use test;
select * from t3;
rpl000016.test sync rpl000001.result BitKeeper file /home/sasha/src/bk/mysql/mysql-test/r/rpl000001.result ignore Added BitKeeper/tmp/bkr3sAHD to the ignore list slave.h MASTER_POS_WAIT lex.h MASTER_POS_WAIT slave.cc MASTER_POS_WAIT, do automagic restart on debugging abort, skip rotate events in slave.cc debug abort count sql_repl.cc announce the log name at the start of the log with a fake rotate event item_create.h MASTER_POS_WAIT item_func.cc MASTER_POS_WAIT item_func.h MASTER_POS_WAIT sql_class.h enter_cond(), exit_cond() helper inliners item_create.cc added MASTER_POS_WAIT mysql-test-run.sh speed improvement fixes rpl000007.test sync rpl000003.test sleep -> sync rpl000004.test sleep -> sync, fixed clean up bug rpl000014.test sync rpl000009.test sync rpl000013.test sync rpl000001.test sleep -> sync rpl000008.test sync rpl000006.test sync on cleanup rpl000011.test sync rpl000012.test sync rpl000005.test sleep -> sync rpl000010.test sync rpl000015.test sync rpl000002.test sleep -> sync rpl000014.result we now know the master log name as soon as we connect mysql.cc added optional agrument to --wait mysqltest.c added save_master_pos and sync_with_master commands client/mysql.cc: added optional agrument to --wait client/mysqltest.c: added save_master_pos and sync_with_master commands mysql-test/mysql-test-run.sh: speed improvement fixes mysql-test/r/rpl000014.result: we now know the master log name as soon as we connect mysql-test/t/rpl000001.test: sleep -> sync mysql-test/t/rpl000002.test: sleep -> sync mysql-test/t/rpl000003.test: sleep -> sync mysql-test/t/rpl000004.test: sleep -> sync, fixed clean up bug mysql-test/t/rpl000005.test: sleep -> sync mysql-test/t/rpl000006.test: sync on cleanup mysql-test/t/rpl000007.test: sync mysql-test/t/rpl000008.test: sync mysql-test/t/rpl000009.test: sync mysql-test/t/rpl000010.test: sync mysql-test/t/rpl000011.test: sync mysql-test/t/rpl000012.test: sync mysql-test/t/rpl000013.test: sync mysql-test/t/rpl000014.test: sync mysql-test/t/rpl000015.test: sync BitKeeper/etc/ignore: Added BitKeeper/tmp/bkr3sAHD to the ignore list mysql-test/t/rpl000016.test: sync sql/item_create.cc: added MASTER_POS_WAIT sql/item_create.h: MASTER_POS_WAIT sql/item_func.cc: MASTER_POS_WAIT sql/item_func.h: MASTER_POS_WAIT sql/lex.h: MASTER_POS_WAIT sql/slave.cc: MASTER_POS_WAIT, do automagic restart on debugging abort, skip rotate events in debug abort count sql/slave.h: MASTER_POS_WAIT sql/sql_class.h: enter_cond(), exit_cond() helper inliners sql/sql_repl.cc: announce the log name at the start of the log with a fake rotate event
2001-01-17 13:47:33 +01:00
select sum(length(word)) from t1;
connection master;
drop table t1,t3;
rpl000016.test sync rpl000001.result BitKeeper file /home/sasha/src/bk/mysql/mysql-test/r/rpl000001.result ignore Added BitKeeper/tmp/bkr3sAHD to the ignore list slave.h MASTER_POS_WAIT lex.h MASTER_POS_WAIT slave.cc MASTER_POS_WAIT, do automagic restart on debugging abort, skip rotate events in slave.cc debug abort count sql_repl.cc announce the log name at the start of the log with a fake rotate event item_create.h MASTER_POS_WAIT item_func.cc MASTER_POS_WAIT item_func.h MASTER_POS_WAIT sql_class.h enter_cond(), exit_cond() helper inliners item_create.cc added MASTER_POS_WAIT mysql-test-run.sh speed improvement fixes rpl000007.test sync rpl000003.test sleep -> sync rpl000004.test sleep -> sync, fixed clean up bug rpl000014.test sync rpl000009.test sync rpl000013.test sync rpl000001.test sleep -> sync rpl000008.test sync rpl000006.test sync on cleanup rpl000011.test sync rpl000012.test sync rpl000005.test sleep -> sync rpl000010.test sync rpl000015.test sync rpl000002.test sleep -> sync rpl000014.result we now know the master log name as soon as we connect mysql.cc added optional agrument to --wait mysqltest.c added save_master_pos and sync_with_master commands client/mysql.cc: added optional agrument to --wait client/mysqltest.c: added save_master_pos and sync_with_master commands mysql-test/mysql-test-run.sh: speed improvement fixes mysql-test/r/rpl000014.result: we now know the master log name as soon as we connect mysql-test/t/rpl000001.test: sleep -> sync mysql-test/t/rpl000002.test: sleep -> sync mysql-test/t/rpl000003.test: sleep -> sync mysql-test/t/rpl000004.test: sleep -> sync, fixed clean up bug mysql-test/t/rpl000005.test: sleep -> sync mysql-test/t/rpl000006.test: sync on cleanup mysql-test/t/rpl000007.test: sync mysql-test/t/rpl000008.test: sync mysql-test/t/rpl000009.test: sync mysql-test/t/rpl000010.test: sync mysql-test/t/rpl000011.test: sync mysql-test/t/rpl000012.test: sync mysql-test/t/rpl000013.test: sync mysql-test/t/rpl000014.test: sync mysql-test/t/rpl000015.test: sync BitKeeper/etc/ignore: Added BitKeeper/tmp/bkr3sAHD to the ignore list mysql-test/t/rpl000016.test: sync sql/item_create.cc: added MASTER_POS_WAIT sql/item_create.h: MASTER_POS_WAIT sql/item_func.cc: MASTER_POS_WAIT sql/item_func.h: MASTER_POS_WAIT sql/lex.h: MASTER_POS_WAIT sql/slave.cc: MASTER_POS_WAIT, do automagic restart on debugging abort, skip rotate events in debug abort count sql/slave.h: MASTER_POS_WAIT sql/sql_class.h: enter_cond(), exit_cond() helper inliners sql/sql_repl.cc: announce the log name at the start of the log with a fake rotate event
2001-01-17 13:47:33 +01:00
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;
# The following test can't be done because the result of Pos will differ
# on different computers
# --replace_result 9306 9999 3334 9999 3335 9999
# 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);
use mysql;
insert into user (Host, User, Password)
VALUES ("10.10.10.%", "blafasel2", "blafasel2");
select select_priv,user from mysql.user where user = 'blafasel2';
update user set Select_priv = "Y" where User="blafasel2";
select select_priv,user from mysql.user where user = 'blafasel2';
use test;
save_master_pos;
connection slave;
sync_with_master;
select n from t1;
select select_priv,user from mysql.user where user = 'blafasel2';
connection master1;
drop table t1;
save_master_pos;
connection slave;
sync_with_master;