~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-201203300109

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/t/rpl_row_find_row_debug.test

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-02-14 23:59:22 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120214235922-cux5uek1e5l0hje9
Tags: 5.5.20-0ubuntu1
* New upstream release.
* d/mysql-server-5.5.mysql.upstart: Fix stop on to make sure mysql is
  fully stopped before shutdown commences. (LP: #688541) Also simplify
  start on as it is redundant.
* d/control: Depend on upstart version which has apparmor profile load
  script to prevent failure on upgrade from lucid to precise.
  (LP: #907465)
* d/apparmor-profile: need to allow /run since that is the true path
  of /var/run files. (LP: #917542)
* d/control: mysql-server-5.5 has files in it that used to be owned
  by libmysqlclient-dev, so it must break/replace it. (LP: #912487)
* d/rules, d/control: 5.5.20 Fixes segfault on tests with gcc 4.6,
  change compiler back to system default.
* d/rules: Turn off embedded libedit/readline.(Closes: #659566)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Bug#11760927: 53375: RBR + NO PK => HIGH LOAD ON SLAVE (TABLE SCAN/CPU) => SLAVE FAILURE
 
3
#
 
4
--source include/master-slave.inc
 
5
--source include/have_binlog_format_row.inc
 
6
--source include/have_debug.inc
 
7
 
 
8
# SETUP
 
9
# - setup log_warnings and debug 
 
10
--connection slave
 
11
--source include/stop_slave.inc
 
12
--let $debug_save= `SELECT @@GLOBAL.debug`
 
13
--let $log_warnings_save= `SELECT @@GLOBAL.log_warnings`
 
14
 
 
15
SET GLOBAL log_warnings = 2;
 
16
 
 
17
let $log_error_= `SELECT @@GLOBAL.log_error`;
 
18
if(!$log_error_)
 
19
{
 
20
    # MySQL Server on windows is started with --console and thus
 
21
    # does not know the location of its .err log, use default location
 
22
    let $log_error_ = $MYSQLTEST_VARDIR/log/mysqld.2.err;
 
23
}
 
24
 
 
25
# Assign env variable LOG_ERROR
 
26
let LOG_ERROR=$log_error_;
 
27
 
 
28
# force printing the notes to the error log
 
29
SET GLOBAL debug="d,inject_long_find_row_note";
 
30
--source include/start_slave.inc
 
31
 
 
32
# test
 
33
--connection master
 
34
CREATE TABLE t1 (c1 INT);
 
35
--sync_slave_with_master
 
36
--connection master
 
37
 
 
38
INSERT INTO t1 VALUES (1), (2);
 
39
UPDATE t1 SET c1= 1000 WHERE c1=2;
 
40
DELETE FROM t1;
 
41
DROP TABLE t1;
 
42
--sync_slave_with_master
 
43
 
 
44
--echo # Check if any note related to long DELETE_ROWS and UPDATE_ROWS appears in the error log
 
45
perl;
 
46
  use strict;
 
47
  my $log_error= $ENV{'LOG_ERROR'} or die "LOG_ERROR not set";
 
48
  open(FILE, "$log_error") or die("Unable to open $log_error: $!\n");
 
49
  my $upd_count = () = grep(/The slave is applying a ROW event on behalf of an UPDATE statement on table t1 and is currently taking a considerable amount/g,<FILE>);
 
50
  seek(FILE, 0, 0) or die "Can't seek to beginning of file: $!";
 
51
  my $del_count = () = grep(/The slave is applying a ROW event on behalf of a DELETE statement on table t1 and is currently taking a considerable amount/g,<FILE>);
 
52
  print "Occurrences: update=$upd_count, delete=$del_count\n";
 
53
  close(FILE);
 
54
EOF
 
55
 
 
56
# cleanup
 
57
--source include/stop_slave.inc
 
58
--eval SET GLOBAL debug = '$debug_save'
 
59
--eval SET GLOBAL log_warnings = $log_warnings_save
 
60
--source include/start_slave.inc
 
61
 
 
62
--source include/rpl_end.inc