1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug #35675 reset master finds assert if a binlog file can not be deleted

If a binlog file is manually replaced with a namesake directory the internal purging did
not handle the error of deleting the file so that eventually
a post-execution guards fires an assert.

Fixed with reusing a snippet of code for bug@18199 to tolerate lack of the file but no other error 
at an attempt to delete it.
The same applied to the index file deletion.

The cset carries pieces of manual merging.
This commit is contained in:
aelkin/andrei@mysql1000.(none)
2008-03-30 00:54:08 +02:00
parent d3d0a00635
commit ba7b1a7e55
9 changed files with 81 additions and 34 deletions

View File

@ -36,3 +36,4 @@ DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
DROP FUNCTION IF EXISTS f1;
DROP TRIGGER IF EXISTS tr1;
stop slave sql_thread;

View File

@ -172,6 +172,7 @@ master-bin.000001 # Query # # use `test`; BEGIN
master-bin.000001 # Query # # use `test`; insert into t1 values(1)
master-bin.000001 # Query # # use `test`; COMMIT
drop table if exists t1;
reset master;
create table t1 (a int auto_increment, primary key (a)) engine=blackhole;
insert into t1 values (11), (NULL), (NULL), (NULL);
set insert_id= 3;
@ -181,10 +182,16 @@ insert into t1 values (55), (NULL);
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (a int auto_increment, primary key (a)) engine=blackhole
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Intvar 1 # INSERT_ID=1
master-bin.000001 # Query 1 # use `test`; insert into t1 values (11), (NULL), (NULL), (NULL)
master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Intvar 1 # INSERT_ID=3
master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL), (33), (NULL)
master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Intvar 1 # INSERT_ID=5
master-bin.000001 # Query 1 # use `test`; insert into t1 values (55), (NULL)
master-bin.000001 # Query 1 # use `test`; COMMIT
drop table t1;

View File

@ -45,3 +45,10 @@ DROP PROCEDURE IF EXISTS p2;
DROP FUNCTION IF EXISTS f1;
DROP TRIGGER IF EXISTS tr1;
enable_warnings;
remove_file $MYSQLTEST_VARDIR/master-data/slave-relay-bin.000001;
remove_file $MYSQLTEST_VARDIR/master-data/slave-relay-bin.index;
stop slave sql_thread;
let $keep_connection=1;
source include/wait_for_slave_sql_to_stop.inc;