summaryrefslogtreecommitdiff
path: root/mysql-test/t/rpl000001.test
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2005-03-02 17:52:38 +0100
committerunknown <guilhem@mysql.com>2005-03-02 17:52:38 +0100
commit5a5fc3433c06eb09708b24d2c94dbf60e20a0779 (patch)
tree8449033fea5596d634679cd3191bf73ae3883346 /mysql-test/t/rpl000001.test
parent1972aa7d522529d6fd66ae8f7e685f0c9fcf56f5 (diff)
downloadmariadb-git-5a5fc3433c06eb09708b24d2c94dbf60e20a0779.tar.gz
Last part of fix for BUG#7998 "Replication should be more clever about when to replicate RELEASE_LOCK()" + fixes after merge
mysql-test/r/drop_temp_table.result: result update mysql-test/r/mix_innodb_myisam_binlog.result: result update mysql-test/r/rpl000001.result: result update mysql-test/r/rpl_change_master.result: result update mysql-test/r/rpl_deadlock.result: result update (merge) mysql-test/t/rpl000001.test: can't rely on GET_LOCK() to do slave synchro (use table lock instead) mysql-test/t/rpl_change_master.test: changing the test as we can't use GET_LOCK() for slave synchro mysql-test/t/rpl_deadlock.test: update (merge) binlog positions mysql-test/t/rpl_get_lock.test: comment
Diffstat (limited to 'mysql-test/t/rpl000001.test')
-rw-r--r--mysql-test/t/rpl000001.test23
1 files changed, 13 insertions, 10 deletions
diff --git a/mysql-test/t/rpl000001.test b/mysql-test/t/rpl000001.test
index 835af92186f..e9a87529706 100644
--- a/mysql-test/t/rpl000001.test
+++ b/mysql-test/t/rpl000001.test
@@ -39,7 +39,13 @@ save_master_pos;
connection slave;
sync_with_master;
-#test handling of aborted connection in the middle of update
+# Test if the slave SQL thread can be more than 16K behind the slave
+# I/O thread (> IO_SIZE)
+
+connection master;
+# we'll use table-level locking to delay slave SQL thread
+create table t1 (n int) engine=myisam;
+sync_slave_with_master;
connection master;
reset master;
connection slave;
@@ -47,29 +53,26 @@ stop slave;
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;
+# Generate 16K of relay log
disable_query_log;
while ($1)
{
- eval insert into t1 values($1+get_lock("hold_slave",10)*0);
+ eval insert into t1 values($1);
dec $1;
}
enable_query_log;
-# Try to cause a large relay log lag on the slave
+# Try to cause a large relay log lag on the slave by locking t1
connection slave;
-select get_lock("hold_slave",10);
-explain extended select get_lock("hold_slave",10);
+lock tables t1 read;
start slave;
#hope this is long enough for I/O thread to fetch over 16K relay log data
sleep 3;
-select release_lock("hold_slave");
-explain extended select release_lock("hold_slave");
unlock tables;
+#test handling of aborted connection in the middle of update
+
connection master;
create table t2(id int);
insert into t2 values(connection_id());