File: rpl_row_find_row_debug.test

package info (click to toggle)
mariadb 1%3A11.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 765,428 kB
  • sloc: ansic: 2,382,827; cpp: 1,803,532; asm: 378,315; perl: 63,176; sh: 46,496; pascal: 40,776; java: 39,363; yacc: 20,428; python: 19,506; sql: 17,864; xml: 12,463; ruby: 8,544; makefile: 6,059; cs: 5,855; ada: 1,700; lex: 1,193; javascript: 1,039; objc: 80; tcl: 73; awk: 46; php: 22
file content (59 lines) | stat: -rw-r--r-- 1,843 bytes parent folder | download | duplicates (4)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# Bug#11760927: 53375: RBR + NO PK => HIGH LOAD ON SLAVE (TABLE SCAN/CPU) => SLAVE FAILURE
#
--source include/have_binlog_format_row.inc
--source include/have_debug.inc
--source include/master-slave.inc

# SETUP
# - setup log_warnings and debug 
--connection slave
--source include/stop_slave.inc
SET @saved_dbug = @@GLOBAL.debug_dbug;
--let $log_warnings_save= `SELECT @@GLOBAL.log_warnings`

SET GLOBAL log_warnings = 2;

let $log_error_= `SELECT @@GLOBAL.log_error`;
if(!$log_error_)
{
    # MySQL Server on windows is started with --console and thus
    # does not know the location of its .err log, use default location
    let $log_error_ = $MYSQLTEST_VARDIR/log/mysqld.2.err;
}

# Assign env variable LOG_ERROR
let LOG_ERROR=$log_error_;

# force printing the notes to the error log
SET GLOBAL debug_dbug="d,inject_long_find_row_note";
--source include/start_slave.inc

# test
--connection master
CREATE TABLE t1 (c1 INT);
--sync_slave_with_master
--connection master

INSERT INTO t1 VALUES (1), (2);
UPDATE t1 SET c1= 1000 WHERE c1=2;
DELETE FROM t1;
DROP TABLE t1;
--sync_slave_with_master

--echo # Check if any note related to long DELETE_ROWS and UPDATE_ROWS appears in the error log
--let SEARCH_FILE=$log_error_
--let SEARCH_PATTERN=The slave is applying a ROW event on behalf of an UPDATE statement on table t1 and is currently taking a considerable amount
--source include/search_pattern_in_file.inc
--let SEARCH_PATTERN=The slave is applying a ROW event on behalf of a DELETE statement on table t1 and is currently taking a considerable amount
--source include/search_pattern_in_file.inc

# cleanup
--source include/stop_slave.inc
SET @@GLOBAL.debug_dbug = @saved_dbug;
--disable_query_log
--eval SET GLOBAL log_warnings = $log_warnings_save
--enable_query_log
--source include/start_slave.inc

--source include/rpl_end.inc