~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to mysql-test/include/kill_query_and_diff_master_slave.inc

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# ==== Purpose ====
 
2
#
 
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.
 
6
#
 
7
# ==== Usage ====
 
8
#
 
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;
 
15
#
 
16
# Note: <CONNECTION> must not be 'master'.
 
17
#
 
18
# See also kill_query.inc and rpl_diff.inc for more
 
19
# information
 
20
 
 
21
source include/kill_query.inc;
 
22
 
 
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)
 
29
{
 
30
  eval SELECT RELEASE_LOCK($debug_lock);
 
31
}
 
32
enable_result_log;
 
33
enable_query_log;
 
34
 
 
35
--source include/rpl_diff.inc
 
36
 
 
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;
 
42
 
 
43
connection $connection_name;