binlog cache I/O error might be reported twice
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Low
|
Laurynas Biveinis | ||
5.1 |
Invalid
|
Undecided
|
Unassigned | ||
5.5 |
Invalid
|
Undecided
|
Unassigned | ||
5.6 |
Fix Released
|
Low
|
Laurynas Biveinis |
Bug Description
By code review:
bool MYSQL_BIN_
{
...
IO_CACHE *cache= &cache_
...
if ((write_error= do_write_cache(thd, cache)))
goto err;
...
if (cache->error) // Error on read
{
char errbuf[
goto err;
}
...
err:
if (!write_error)
write_error= 1;
{
char errbuf[
sql_
}
thd->
DBUG_RETURN(1);
}
In the case of cache->error will result in two sql_print_errors. This is a regression from upstream 5.6, introduced in the initial 5.6 merge. The upstream has
err:
if (!write_error)
{
char errbuf[
write_error= 1;
sql_
}
thd->
DBUG_RETURN(1);
}
which will result in a single sql_print_error as intended. I am unable to tell right now whether cache->error (presumably by my_b_fill in do_write_cache) might ever possibly happen in the first place. This bug is about restoring the upstream behavior regardless of this.
Related branches
- Laurynas Biveinis (community): Approve
-
Diff: 15 lines (+2/-2)1 file modifiedsql/binlog.cc (+2/-2)
This is uncovered by
$ ./mysql-test-run --big-test rpl_semi_ sync_group_ commit_ deadlock semi_sync_ group_commit_ deadlock 'stmt' [ fail ] Found warnings/errors in server log file! laurynas/ percona/ lp-mysql- server/ big-test- fixes/obj- debug/mysql- test/var/ log/mysqld. 1.err
...
rpl.rpl_
Test ended at 2015-02-10 16:16:44
line
2015-02-10 17:16:05 94862 [ERROR] Error writing file 'master-bin' (errno: 2 - No such file or directory)
.... repeated 2 times: [ERROR] Error writing file 'master-bin' (errno: 2 - No such file or directory)
2015-02-10 17:16:05 94862 [ERROR] Error writing file 'master-bin' (errno: 35 - Resource temporarily unavailable)
.... repeated 1681 times: [ERROR] Error writing file 'master-bin' (errno: 35 - Resource temporarily unavailable)
2015-02-10 17:16:25 94862 [ERROR] Error writing file 'master-bin' (errno: 2 - No such file or directory)
.... repeated 4 times: [ERROR] Error writing file 'master-bin' (errno: 2 - No such file or directory)
2015-02-10 17:16:25 94862 [ERROR] Error writing file 'master-bin' (errno: 35 - Resource temporarily unavailable)
.... repeated 1699 times: [ERROR] Error writing file 'master-bin' (errno: 35 - Resource temporarily unavailable)
^ Found warnings in /Users/
ok
because the testcase uses error injection simulate_ binlog_ flush_error hitting the same difference in err: code path between Percona Server and MySQL.