1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +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.


mysql-test/r/binlog_index.result:
  new results
mysql-test/r/ctype_big5.result:
  results changed
mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result:
  new results
mysql-test/suite/binlog/r/binlog_stm_blackhole.result:
  new results
mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test:
  cleanup. still todo: to let the test run multiple times w/o restarting the server (just ./mtr test)
mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result:
  results changed
mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test:
  guarding the test with statement format condition as the logics of the test requires
sql/log.cc:
  two changes. One for the bug, other manual merge.
  The bug change needs MYF(0) to pass to my_delete because not all error out of the function
  are critical. The finer check is done on the caller of my_delete similarly how it was implemented
  for bug@18199 fixes. Non-existance of a file is not a critical error.
sql/sql_class.cc:
  manual merge, removing extra automatically brought hunk.
This commit is contained in:
unknown
2008-03-30 00:54:08 +02:00
parent 6630d2e18c
commit 2a001d5389
9 changed files with 81 additions and 34 deletions

View File

@@ -1069,19 +1069,6 @@ bool THD::store_globals()
void THD::cleanup_after_query()
{
last_insert_id_used= FALSE;
if (clear_next_insert_id)
{
clear_next_insert_id= 0;
next_insert_id= 0;
/*
BUG#33029, if one statement in a SP set this member to 1, all
statment after this statement in the SP would be considered used
INSERT_ID value, reset this member after each query to fix this.
*/
insert_id_used= 0;
}
/*
Reset rand_used so that detection of calls to rand() will save random
seeds if needed by the slave.