Debian Codegraph @

mysql-test/suite/clone/r/remote_restart.result

raw
1 CREATE TABLE t1(col1 INT PRIMARY KEY, col2 char(64));
2 INSERT INTO t1 VALUES(10, 'clone row 1');
3 INSERT INTO t1 VALUES(20, 'clone row 2');
4 INSERT INTO t1 VALUES(30, 'clone row 3');
5 SELECT * from t1 ORDER BY col1;
6 col1 col2
7 10 clone row 1
8 20 clone row 2
9 30 clone row 3
10 INSTALL PLUGIN clone SONAME 'CLONE_PLUGIN';
11 SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS
12 WHERE PLUGIN_NAME LIKE '%clone%';
13 PLUGIN_NAME PLUGIN_STATUS
14 clone ACTIVE
15 SET GLOBAL CLONE_MAX_CONCURRENCY = 8;
16 SHOW VARIABLES LIKE '%CLONE_MAX_CONCURRENCY%';
17 Variable_name Value
18 clone_max_concurrency 8
19 SET GLOBAL CLONE_MAX_CONCURRENCY = default;
20 # Clone failure by forcing network error and disabling restart
21 SET GLOBAL CLONE_DONOR_TIMEOUT_AFTER_NETWORK_FAILURE = 0;
22 SHOW VARIABLES LIKE 'CLONE_DONOR_TIMEOUT_AFTER_NETWORK_FAILURE';
23 Variable_name Value
24 clone_donor_timeout_after_network_failure 0
25 SET global debug="+d,clone_restart_apply";
26 SET GLOBAL clone_autotune_concurrency = OFF;
27 SET GLOBAL clone_max_concurrency = 8;
28 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
29 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
30 ERROR HY000: Clone Donor Error: 1815 : Internal error: Innodb Clone Restart could not find existing clone.
31 select ID, STATE, ERROR_NO from performance_schema.clone_status;
32 ID STATE ERROR_NO
33 1 Failed 3862
34 select ID, STAGE, STATE from performance_schema.clone_progress;
35 ID STAGE STATE
36 1 DROP DATA Failed
37 1 FILE COPY Not Started
38 1 PAGE COPY Not Started
39 1 REDO COPY Not Started
40 1 FILE SYNC Not Started
41 1 RESTART Not Started
42 1 RECOVERY Not Started
43 SET global debug="-d,clone_restart_apply";
44 # Clone by forcing network error and allowing restart
45 SET GLOBAL CLONE_DONOR_TIMEOUT_AFTER_NETWORK_FAILURE = 15;
46 SHOW VARIABLES LIKE 'CLONE_DONOR_TIMEOUT_AFTER_NETWORK_FAILURE';
47 Variable_name Value
48 clone_donor_timeout_after_network_failure 15
49 SET global debug="+d,clone_restart_apply";
50 SET GLOBAL clone_autotune_concurrency = OFF;
51 SET GLOBAL clone_max_concurrency = 8;
52 SET GLOBAL clone_valid_donor_list = 'HOST:PORT';
53 CLONE INSTANCE FROM USER@HOST:PORT IDENTIFIED BY '' DATA DIRECTORY = 'CLONE_DATADIR';
54 select ID, STATE, ERROR_NO from performance_schema.clone_status;
55 ID STATE ERROR_NO
56 1 Completed 0
57 select ID, STAGE, STATE from performance_schema.clone_progress;
58 ID STAGE STATE
59 1 DROP DATA Completed
60 1 FILE COPY Completed
61 1 PAGE COPY Completed
62 1 REDO COPY Completed
63 1 FILE SYNC Completed
64 1 RESTART Not Started
65 1 RECOVERY Not Started
66 SET global debug="-d,clone_restart_apply";
67 # restart: --datadir=CLONE_DATADIR
68 SELECT * from t1 ORDER BY col1;
69 col1 col2
70 10 clone row 1
71 20 clone row 2
72 30 clone row 3
73 INSERT INTO t1 VALUES(40, 'clone row 4');
74 SELECT * from t1 ORDER BY col1;
75 col1 col2
76 10 clone row 1
77 20 clone row 2
78 30 clone row 3
79 40 clone row 4
80 # restart:
81 SELECT * from t1 ORDER BY col1;
82 col1 col2
83 10 clone row 1
84 20 clone row 2
85 30 clone row 3
86 UNINSTALL PLUGIN clone;
87 DROP TABLE t1;