mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / include / kill_query_and_diff_master_slave.inc
blob59588551af532f9d2402c83f9eee6de32b02bf59
1 # ==== Purpose ====
3 # Kill a query, sync master with slave, and diff the output of a
4 # statement on master and slave to check if statement is correctly
5 # replicated.
7 # ==== Usage ====
9 # connection <CONNECTION>;
10 # let $connection_name=<CONNECTION>
11 # let $connection_id=`SELECT CONNECTION_ID()`;
12 # let $rpl_diff_statement=<SQL COMMAND>;
13 # send <SQL COMMAND>;
14 # source include/kill_query_and_diff_master_slave.inc;
16 # Note: <CONNECTION> must not be 'master'.
18 # See also kill_query.inc and rpl_diff.inc for more
19 # information
21 source include/kill_query.inc;
23 # Release the debug lock if used, so that the statements in
24 # rpl_diff.inc will not be blocked.
25 connection master;
26 disable_query_log;
27 disable_result_log;
28 if ($debug_lock)
30   eval SELECT RELEASE_LOCK($debug_lock);
32 enable_result_log;
33 enable_query_log;
35 --source include/rpl_diff.inc
37 # Acquire the debug lock again if used
38 connection master;
39 disable_query_log; disable_result_log;
40 if ($debug_lock) { eval SELECT GET_LOCK($debug_lock, 10); }
41 enable_result_log; enable_query_log;
43 connection $connection_name;