Code review comment for lp:~vlad-lesin/percona-server/5.5-bugs-1268729-1268735

Revision history for this message
Vlad Lesin (vlad-lesin) wrote :

> IMHO there's no problem with placing a ER_NET_READ_INTERRUPTED-injecting block
> into my_net_read even though it's a common function. Such injection is not
> linked to the particular bug scenario, could be reused in testing some other
> code path, and is similar to the already-existing simulate_net_write_failure
> in my_net_write.

Sure, but I did not mean ER_NET_READ_INTERRUPTED in my previous comment.

We set @global.debug to certain values in test for DBUG_SET("+d,inject_ER_NET_READ_INTERRUPTED") being executed in certain places of get_master_version_and_clock(). For example we set:

SET @@global.debug="+d,get_master_version.timestamp.ER_NET_READ_INTERRUPTED"

to execute DBUG_SET("+d,inject_ER_NET_READ_INTERRUPTED") just before timestamp is gotten from master. And then we must reset get_master_version.timestamp.ER_NET_READ_INTERRUPTED to avoid execution of DBUG_SET("+d,inject_ER_NET_READ_INTERRUPTED") at the same place on reconnect. We can do this in mysql_real_query() what is not good because we place the certain test-specific code in common function. Or we can do this at the end of get_master_version_and_clock() in three places as this function has three end points and in this case some macros will be used to avoid copy-paste. But as I understood right the main idea of your comment was in removing such macros from get_master_version_and_clock().

« Back to merge proposal