1
-- source include/have_binlog_format_mixed_or_statement.inc
2
-- source include/master-slave.inc
4
create table t1 (word char(20) not null);
5
load data infile '../std_data_ln/words.dat' into table t1;
6
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
7
eval load data local infile '$MYSQL_TEST_DIR/std_data/words.dat' into table t1;
8
select * from t1 limit 10;
11
# Test slave with wrong password
18
set password for root@"localhost" = password('foo');
23
# Give slave time to do at last one failed connect retry
24
# This one must be short so that the slave will not stop retrying
26
set password for root@"localhost" = password('');
27
# Give slave time to connect (will retry every second)
30
create table t3(n int);
31
insert into t3 values(1),(2);
36
select sum(length(word)) from t1;
43
# Test if the slave SQL thread can be more than 16K behind the slave
44
# I/O thread (> IO_SIZE)
47
# we'll use table-level locking to delay slave SQL thread
48
eval create table t1 (n int) engine=$engine_type;
49
sync_slave_with_master;
58
# Generate 16K of relay log
62
eval insert into t1 values($1);
67
# Try to cause a large relay log lag on the slave by locking t1
71
#hope this is long enough for I/O thread to fetch over 16K relay log data
75
#test handling of aborted connection in the middle of update
78
create table t2(id int);
79
insert into t2 values(connection_id());
83
# Avoid generating result
84
create temporary table t3(n int);
85
insert into t3 select get_lock('crash_lock%20C', 1) from t2;
88
send update t1 set n = n + get_lock('crash_lock%20C', 2);
91
select (@id := id) - id from t2;
93
# We don't drop t3 as this is a temporary table
99
# The SQL slave thread should now have stopped because the query was killed on
100
# the master (so it has a non-zero error code in the binlog).
101
--source include/wait_for_slave_sql_to_stop.inc
103
# The following test can't be done because the result of Pos will differ
104
# on different computers
105
# --replace_result $MASTER_MYPORT MASTER_PORT
108
set global sql_slave_skip_counter=1;
110
select count(*) from t1;
113
create table t1 (n int);
114
insert into t1 values(3456);
115
insert into mysql.user (Host, User, Password)
116
VALUES ("10.10.10.%", "blafasel2", password("blafasel2"));
117
select select_priv,user from mysql.user where user = _binary'blafasel2';
118
update mysql.user set Select_priv = "Y" where User= _binary"blafasel2";
119
select select_priv,user from mysql.user where user = _binary'blafasel2';
124
select select_priv,user from mysql.user where user = _binary'blafasel2';
127
delete from mysql.user where user="blafasel2";