blob: 59588551af532f9d2402c83f9eee6de32b02bf59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# ==== Purpose ====
#
# Kill a query, sync master with slave, and diff the output of a
# statement on master and slave to check if statement is correctly
# replicated.
#
# ==== Usage ====
#
# connection <CONNECTION>;
# let $connection_name=<CONNECTION>
# let $connection_id=`SELECT CONNECTION_ID()`;
# let $rpl_diff_statement=<SQL COMMAND>;
# send <SQL COMMAND>;
# source include/kill_query_and_diff_master_slave.inc;
#
# Note: <CONNECTION> must not be 'master'.
#
# See also kill_query.inc and rpl_diff.inc for more
# information
source include/kill_query.inc;
# Release the debug lock if used, so that the statements in
# rpl_diff.inc will not be blocked.
connection master;
disable_query_log;
disable_result_log;
if ($debug_lock)
{
eval SELECT RELEASE_LOCK($debug_lock);
}
enable_result_log;
enable_query_log;
--source include/rpl_diff.inc
# Acquire the debug lock again if used
connection master;
disable_query_log; disable_result_log;
if ($debug_lock) { eval SELECT GET_LOCK($debug_lock, 10); }
enable_result_log; enable_query_log;
connection $connection_name;
|