File: binlog_mysqlbinlog_start_stop.inc

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 (64 lines) | stat: -rw-r--r-- 1,850 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# ==== Purpose ====
#
# Test the --[start|stop]-[position|datetime] options to mysqlbinlog,
# with/without --read-from-remote-server, with one or two binary logs
# as input.
#
# ==== Implementation ====

# TODO: Need to look at making row based version once new binlog client is complete.

CREATE TABLE t1 (a INT);
RESET MASTER;

--source extra/binlog_tests/binlog_mysqlbinlog_fill.inc

--let $MYSQLD_DATADIR= `select @@datadir`

--echo
--echo ==== Local ====

--let $start_position= $pos_1
--let $start_datetime= $datetime_1

--let $stop_position= $pos_2
--let $stop_datetime= $datetime_2
--let $extra_options= $MYSQLD_DATADIR/$file_1
--source extra/binlog_tests/mysqlbinlog_start_stop_1.inc

--echo
--echo ==== Local with 2 binlogs on command line ====
# This is to verify that some options apply only to first, or last binlog

--let $stop_position= $pos_3
--let $stop_datetime= $datetime_3
--let $extra_options= $MYSQLD_DATADIR/$file_1 $MYSQLD_DATADIR/$file_2
--source extra/binlog_tests/mysqlbinlog_start_stop_1.inc

--echo
--echo ==== Remote ====

--let $stop_position= $pos_2
--let $stop_datetime= $datetime_2
--let $extra_options= --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT $file_1
--source extra/binlog_tests/mysqlbinlog_start_stop_1.inc

--echo
--echo ==== Remote with 2 binlogs on command line ====

--let $stop_position= $pos_3
--let $stop_datetime= $datetime_3
--let $extra_options= --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT $file_1 $file_2
--source extra/binlog_tests/mysqlbinlog_start_stop_1.inc


# ==== to-last-log ====

--let $extra_options= --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT $file_1
--let $options= --to-last-log
--source extra/binlog_tests/mysqlbinlog_start_stop_2.inc


--echo
--echo ==== clean up ====
DROP TABLE t1;