mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 21:42:35 +01:00
300b3fb642
Novell patches Makefile.am: Novell patch client/mysql.cc: Novell patch configure.in: Novell patch extra/mysql_waitpid.c: Novell patch include/my_pthread.h: Novell patch include/mysql.h: Novell patch libmysql/libmysql.c: Novell patch libmysqld/libmysqld.c: Novell patch mysql-test/mysql-test-run.sh: Don't use running server with --valgrind mysql-test/r/innodb.result: Updated results mysql-test/r/rpl000001.result: Updated results mysql-test/r/rpl000004.result: Updated results mysql-test/r/rpl_log.result: Updated results mysql-test/r/type_blob.result: Updated results mysql-test/std_data/words.dat: Added more words to make type_blob test relevant mysql-test/t/innodb.test: test of multi-table-delete mysql-test/t/rpl000001.test: Update for new word file mysql-test/t/type_blob.test: Test if BLOB IS NULL on NOT NULL column mysys/my_init.c: Novell patch mysys/my_netware.c: Novell patch netware/Makefile.am: Novell patch netware/init_db.sql: Novell patch netware/isamchk.def: Novell patch netware/isamlog.def: Novell patch netware/libmysql.def: Novell patch netware/my_print_defaults.def: Novell patch netware/myisamchk.def: Novell patch netware/myisamlog.def: Novell patch netware/myisampack.def: Novell patch netware/mysql.def: Novell patch netware/mysql_install_db.c: Novell patch netware/mysql_install_db.def: Novell patch netware/mysql_test_run.def: Novell patch netware/mysqladmin.def: Novell patch netware/mysqlbinlog.def: Novell patch netware/mysqlcheck.def: Novell patch netware/mysqld_safe.c: Novell patch netware/mysqldump.def: Novell patch netware/mysqlimport.def: Novell patch netware/mysqlshow.def: Novell patch netware/mysqltest.def: Novell patch netware/pack_isam.def: Novell patch netware/perror.def: Novell patch netware/replace.def: Novell patch netware/resolveip.def: Novell patch netware/test_db.sql: Novell patch scripts/make_binary_distribution.sh: Novell patch sql/item_cmpfunc.h: Optimization of 'IS NULL' sql/mysql_priv.h: Code cleanup sql/mysqld.cc: Novell patch sql/net_pkg.cc: Code cleanup sql/records.cc: Fixed multi-table-delete for InnoDB tables sql/sql_delete.cc: Fixed multi-table-delete for InnoDB tables sql/sql_handler.cc: Code cleanup sql/sql_table.cc: Code cleanup sql/structs.h: Fixed multi-table-delete for InnoDB tables
123 lines
3.1 KiB
Text
123 lines
3.1 KiB
Text
source include/master-slave.inc;
|
|
drop table if exists t1,t2,t3;
|
|
create table t1 (word char(20) not null);
|
|
load data infile '../../std_data/words.dat' into table t1;
|
|
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
|
eval load data local infile '$MYSQL_TEST_DIR/std_data/words.dat' into table t1;
|
|
select * from t1 limit 10;
|
|
|
|
#
|
|
# Test slave with wrong password
|
|
#
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
slave stop;
|
|
connection master;
|
|
set password for root@"localhost" = password('foo');
|
|
connection slave;
|
|
slave start;
|
|
connection master;
|
|
#
|
|
# Give slave time to do at last one failed connect retry
|
|
# This one must be short so that the slave will not stop retrying
|
|
real_sleep 2;
|
|
set password for root@"localhost" = password('');
|
|
# Give slave time to connect (will retry every second)
|
|
sleep 2;
|
|
|
|
create table t3(n int);
|
|
insert into t3 values(1),(2);
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
select * from t3;
|
|
select sum(length(word)) from t1;
|
|
connection master;
|
|
drop table t1,t3;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
|
|
#test handling of aborted connection in the middle of update
|
|
connection master;
|
|
reset master;
|
|
connection slave;
|
|
slave stop;
|
|
reset slave;
|
|
|
|
connection master;
|
|
create table t1(n int);
|
|
#we want the log to exceed 16K to test deal with the log that is bigger than
|
|
#IO_SIZE
|
|
let $1=5000;
|
|
disable_query_log;
|
|
while ($1)
|
|
{
|
|
eval insert into t1 values($1+get_lock("hold_slave",10)*0);
|
|
dec $1;
|
|
}
|
|
enable_query_log;
|
|
|
|
# Try to cause a large relay log lag on the slave
|
|
connection slave;
|
|
select get_lock("hold_slave",10);
|
|
slave start;
|
|
#hope this is long enough for I/O thread to fetch over 16K relay log data
|
|
sleep 3;
|
|
select release_lock("hold_slave");
|
|
unlock tables;
|
|
|
|
connection master;
|
|
create table t2(id int);
|
|
insert into t2 values(connection_id());
|
|
save_master_pos;
|
|
|
|
connection master1;
|
|
# Avoid generating result
|
|
create temporary table t3(n int);
|
|
insert into t3 select get_lock('crash_lock%20C', 1) from t2;
|
|
|
|
connection master;
|
|
send update t1 set n = n + get_lock('crash_lock%20C', 2);
|
|
connection master1;
|
|
sleep 3;
|
|
select (@id := id) - id from t2;
|
|
kill @id;
|
|
# We don't drop t3 as this is a temporary table
|
|
drop table t2;
|
|
connection master;
|
|
--error 1053;
|
|
reap;
|
|
connection slave;
|
|
sync_with_master;
|
|
#give the slave a chance to exit
|
|
wait_for_slave_to_stop;
|
|
|
|
# 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 global 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);
|
|
insert into mysql.user (Host, User, Password)
|
|
VALUES ("10.10.10.%", "blafasel2", password("blafasel2"));
|
|
select select_priv,user from mysql.user where user = 'blafasel2';
|
|
update mysql.user set Select_priv = "Y" where User="blafasel2";
|
|
select select_priv,user from mysql.user where user = 'blafasel2';
|
|
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;
|