~ubuntu-branches/ubuntu/natty/mysql-5.1/natty-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 08:30:45 UTC
  • mfrom: (1.4.1)
  • Revision ID: package-import@ubuntu.com-20120222083045-2rd53r4bnyx7qus4
Tags: 5.1.61-0ubuntu0.11.04.1
* SECURITY UPDATE: Update to 5.1.61 to fix multiple security issues
  (LP: #937869)
  - http://www.oracle.com/technetwork/topics/security/cpujan2012-366304.html
  - CVE-2011-2262
  - CVE-2012-0075
  - CVE-2012-0112
  - CVE-2012-0113
  - CVE-2012-0114
  - CVE-2012-0115
  - CVE-2012-0116
  - CVE-2012-0117
  - CVE-2012-0118
  - CVE-2012-0119
  - CVE-2012-0120
  - CVE-2012-0484
  - CVE-2012-0485
  - CVE-2012-0486
  - CVE-2012-0487
  - CVE-2012-0488
  - CVE-2012-0489
  - CVE-2012-0490
  - CVE-2012-0491
  - CVE-2012-0492
  - CVE-2012-0493
  - CVE-2012-0494
  - CVE-2012-0495
  - CVE-2012-0496

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
#
6
6
# ==== Usage ====
7
7
#
8
 
# let $slave_sql_error= <ERRNO>;
9
 
# source include/wait_for_slave_sql_error_and_skip.inc;
 
8
# --let $slave_sql_error= NUMBER
 
9
# [--let $show_sql_error= 1]
 
10
# [--let $slave_skip_counter= 1]
 
11
# [--let $not_switch_connection= 1]
 
12
# [--let $rpl_debug= 1]
 
13
# [--let $slave_timeout= NUMBER]
 
14
# --source include/wait_for_slave_sql_error_and_skip.inc
10
15
#
11
16
# Parameters:
12
17
#
13
 
# $slave_sql_errno
14
 
#   The error number to wait for. This is required. (See
15
 
#   wait_for_slave_sql_error.inc)
16
 
#
17
 
# $show_sql_error
18
 
#   If set, will print the error to the query log.
19
 
#
20
 
# $slave_timeout
21
 
#   See wait_for_slave_param.inc for description.
 
18
#   $slave_sql_errno
 
19
#     The error number to wait for. This is required. (See
 
20
#     wait_for_slave_sql_error.inc)
 
21
#
 
22
#   $show_sql_error
 
23
#     If set, will print the error to the query log.
22
24
23
 
# $master_connection
24
 
#   See wait_for_slave_param.inc for description.
25
 
#
26
 
# $slave_skip_counter
27
 
#   If set, skip this number of events. If not set, skip one event.
28
 
#
29
 
# $not_switch_connection If set, don't switch to slave and don't switch back
30
 
# master.
31
 
#
32
 
 
33
 
echo --source include/wait_for_slave_sql_error_and_skip.inc;
 
25
#   $slave_skip_counter
 
26
#     If set, skip this number of events. If not set, skip one event.
 
27
#
 
28
#   $not_switch_connection
 
29
#     By default, this script executes on the connection 'slave'.  If
 
30
#     $not_switch_connection is set, this script executes on the current
 
31
#     connection.  In any case, the original connection is restored.
 
32
#
 
33
#   $slave_timeout
 
34
#     See include/wait_for_slave_param.inc
 
35
#
 
36
#   $rpl_debug
 
37
#     See include/rpl_init.inc
 
38
 
 
39
 
 
40
--let $include_filename= wait_for_slave_sql_error_and_skip.inc [errno=$slave_sql_errno]
 
41
--source include/begin_include_file.inc
 
42
 
 
43
 
 
44
if (!$rpl_debug)
 
45
{
 
46
  --disable_query_log
 
47
}
 
48
 
 
49
 
34
50
if (!$not_switch_connection)
35
51
{
36
 
  connection slave;
 
52
  --let $rpl_connection_name= slave
 
53
  --source include/rpl_connection.inc
37
54
}
 
55
 
 
56
 
38
57
source include/wait_for_slave_sql_error.inc;
39
58
 
 
59
 
40
60
# skip the erroneous statement
41
61
if ($slave_skip_counter) {
42
62
  eval SET GLOBAL SQL_SLAVE_SKIP_COUNTER= $slave_skip_counter;
45
65
  SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
46
66
}
47
67
source include/start_slave.inc;
48
 
if (!$not_switch_connection)
49
 
{
50
 
  connection master;
51
 
}
 
68
 
 
69
 
 
70
--let $include_filename= wait_for_slave_sql_error_and_skip.inc [errno=$slave_sql_errno]
 
71
--source include/end_include_file.inc