File: rpl_perfschema_connection_applier_status_mts.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (50 lines) | stat: -rw-r--r-- 1,962 bytes parent folder | download
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
#
# ==== Purpose ====
#
# This test asserts that the information regarding the replication timestamps
# is displayed correctly when the system is running with MTS enabled.
#
# ==== Implementation ====
#
# Five transaction types are tested:
#  - create table
#  - insert
#  - update
#  - delete
#  - drop table
# For each statement, the test asserts that the information concerning the
# transaction that is currently being processed matches what is expected
# before and after each of the following replication stages is completed for
# that transaction:
#  1) The connection thread queues the transaction to be processed by the
#     MTS coordinator (table: performance_schema.replication_connection_status)
#  2) The MTS coordinator puts the transaction into a worker's queue
#     (table: performance_schema.replication_applier_status_by_coordinator)
#  3) A worker applies the transaction
#     (table: performance_schema.replication_applier_status_by_worker)
#
# The second part of the test checks if the table
# performance_schema.replication_applier_status_by_worker displays the correct
# information when the slave cannot apply a transaction due to an error.
# Two types of transactions are tested: DDL (DROP table) and DML (insert). After
# the slave fails applying each transaction, the test verifies that
# last_applied_transaction still shows the last transaction applied before the
# failed one, and also that applying_transaction was cleared.
#
# ==== References ====
#
# WL#7374 Performance schema tables to monitor replication lags and queue

# the test is binlog-format agnostic
--source include/have_binlog_format_row.inc
--source include/have_debug_sync.inc
--source include/only_mts_replica_parallel_workers.inc
--source include/master-slave.inc

--let $is_mts= 1

--source extra/rpl_tests/rpl_ps_connection_applier_status.inc

--source extra/rpl_tests/rpl_ps_connection_applier_status_by_worker_failed_trx.inc

--source include/rpl_end.inc