1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Bug#14324766:PARTIALLY WRITTEN INSERT STATEMENT IN BINLOG

NO ERRORS REPORTED
      
Problem:
=======
Errors from my_b_fill are ignored. MYSQL_BIN_LOG::write_cache
code assumes that 0 returned from my_b_fill always means
end-of-cache, but that is incorrect. It can result in error
and the error is ignored. Other callers of my_b_fill don't
check for error: my_b_copy_to_file, maybe my_b_gets.
      
Fix:
===
An error handler is already present to check the "cache"
error that is reported during "MYSQL_BIN_LOG::write_cache"
call. Hence error handlers are added for "my_b_copy_to_file"
and "my_b_gets".
During my_b_fill() function call, when the cache read fails
info->error= -1 is set. Hence a check for "info->error"
is added for the above to callers upon their return.
This commit is contained in:
Sujatha Sivakumar
2013-03-28 14:14:39 +05:30
parent 9d7f333a62
commit c78c1fe52d
4 changed files with 21 additions and 3 deletions

View File

@@ -1732,6 +1732,8 @@ bool show_binlogs(THD* thd)
if (protocol->write())
goto err;
}
if(index_file->error == -1)
goto err;
mysql_bin_log.unlock_index();
my_eof(thd);
DBUG_RETURN(FALSE);