Merge lp:~vlad-lesin/percona-server/5.5-bugs-1268729-1268735 into lp:percona-server/5.5
Proposed by
Vlad Lesin
Status: | Merged |
---|---|
Approved by: | Laurynas Biveinis |
Approved revision: | no longer in the source branch. |
Merged at revision: | 633 |
Proposed branch: | lp:~vlad-lesin/percona-server/5.5-bugs-1268729-1268735 |
Merge into: | lp:percona-server/5.5 |
Diff against target: |
204 lines (+141/-11) 4 files modified
mysql-test/suite/rpl/r/rpl_percona_gmvac_net_err.result (+30/-0) mysql-test/suite/rpl/t/rpl_percona_gmvac_net_err.test (+67/-0) sql-common/client.c (+6/-0) sql/slave.cc (+38/-11) |
To merge this branch: | bzr merge lp:~vlad-lesin/percona-server/5.5-bugs-1268729-1268735 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Laurynas Biveinis (community) | Approve | ||
Review via email: mp+204782@code.launchpad.net |
Description of the change
The fix for bug #1268735.
Process the network error during setting @master_
get_master_
The fix for bug #1268729:
Slave I/O thread won't attempt to automatically reconnect to the master.
The fix is in including ER_NET_
network related error codes in is_network_error() function.
The test case tests a couple of cases when get_master_
fails due to ER_NET_
http://
To post a comment you must log in.
- It is possible to make the code changes for error injection
less invasive and IMHO easier to read. Instead of
// Inject ER_NET_ READ_INTERRUPTE D network error for testing. EXECUTE_ IF("get_ master_ version. timestamp. ER_NET_ READ_INTERRUPTE D",
mysql- >net.last_ errno= ER_NET_ READ_INTERRUPTE D;); IF("get_ master_ version. timestamp. ER_NET_ READ_INTERRUPTE D",
false, true) &&
!mysql_ real_query( mysql, STRING_ WITH_LEN( "SELECT TIMESTAMP( )")) &&
DBUG_
if (DBUG_EVALUATE_
UNIX_
you can push down the ER_NET_ READ_INTERRUPTE D injection deeper
all the way to e.g. my_net_read, and make it one-shot:
... EXECUTE_ IF("inject_ ER_NET_ READ_INTERRUPTE D",
{
... whatever action..., e.g. net->last_error= ER_NET...
DBUG_ SET("-d, inject_ ER_NET_ READ_INTERRUPTE D");
... early return or whatever...
});
DBUG_
and in the three original injection points you just prime the
above injection:
DBUG_ EXECUTE_ IF("get_ master_ version. timestamp. ER_NET_ READ_INTERRUPTE D",
DBUG_SET( "+d,inject_ ER_NET_ READ_INTERRUPTE D"););
if (!mysql_real_query ...
and the surrounding code (the mysql_real_query call) itself is
not touched.
- The debug sync points and all their support code are not slave_io. inc (I guess I/O thread is enough), which will
required. Even if START SLAVE is async (cannot recall at the
moment whether it really is), you can use MTR include file
start_
wait until slave is up and running, and so the error injection
point has passed.
- Instead of own log grepper in Perl use one already provided: search_ pattern. inc or search_ pattern_ in_file. inc,
include/
depending on whether you prefer testcase abort or a result file
mismatch in case of the pattern not found. (s_p_in_file.inc
exists in both 5.5 and 5.6, s_p.inc only in 5.6. In case you
want that one, just bzr add it with the correct file id to
5.5).
- 58: s/binglog/binlog
- 188, 259: spurious whitespace change