diff options
author | unknown <guilhem@mysql.com> | 2004-03-17 10:35:03 +0100 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2004-03-17 10:35:03 +0100 |
commit | 9d78adc16fa0141921395be232348af8ef8c9181 (patch) | |
tree | c33f645c0ede61c2f00434dcae9577d092d0862d /mysql-test/t/rpl000009.test | |
parent | e9eb02398cb1883081117be0c4f3334d6634724e (diff) | |
download | mariadb-git-9d78adc16fa0141921395be232348af8ef8c9181.tar.gz |
Fix for BUG#2922 "Crash (signal11) after "load data from master""
with a testcase.
We needed to init_master_info before we flush_master_info
in LOAD DATA FROM MASTER.
mysql-test/r/rpl000009.result:
result update
mysql-test/t/rpl000009.test:
adding a test for RESET SLAVE + LOAD DATA FROM MASTER
sql/repl_failsafe.cc:
LOAD DATA FROM MASTER udpates the master info in the slave,
so needs to ensure that it is properly inited first
(otherwise, after RESET SLAVE, we are flush_io_cache()ing
an uninitialized IO_CACHE master.info).
Note that it master info is already inited (active_mi->inited==1),
init_master_info() will do nothing, which is what we want.
Diffstat (limited to 'mysql-test/t/rpl000009.test')
-rw-r--r-- | mysql-test/t/rpl000009.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/rpl000009.test b/mysql-test/t/rpl000009.test index e019e1fc3a7..4426cafe299 100644 --- a/mysql-test/t/rpl000009.test +++ b/mysql-test/t/rpl000009.test @@ -108,6 +108,21 @@ connection slave; sync_with_master; select * from bar.t1; +# Check that LOAD DATA FROM MASTER is able to create master.info +# if needed (if RESET SLAVE was used before), before writing to it (BUG#2922). + +stop slave; +reset slave; +load data from master; +start slave; +# see if replication coordinates were restored fine +connection master; +insert into bar.t1 values (5, 'five bar'); +save_master_pos; +connection slave; +sync_with_master; +select * from bar.t1; + # Check that LOAD DATA FROM MASTER reports the error if it can't drop a # table to be overwritten. # DISABLED FOR NOW AS chmod IS NOT PORTABLE ON NON-UNIX |