2
# Tests simple INSERT statements and the transaction log
5
# Ignore startup/shutdown events
7
--source ../plugin/transaction_log/tests/t/truncate_log.inc
10
DROP TABLE IF EXISTS t1;
15
pk int auto_increment primary key,
21
d varchar(16000) NOT NULL
24
insert into src (d) values (repeat("B",16000));
25
insert into src (d) values (repeat("B",16000));
26
insert into src (d) values (repeat("B",16000));
27
insert into src (d) values (repeat("B",16000));
28
insert into src (d) values (repeat("B",16000));
29
insert into src (d) values (repeat("B",16000));
30
insert into src (d) values (repeat("B",16000));
31
insert into src (d) values (repeat("B",16000));
32
insert into src (d) values (repeat("B",16000));
33
insert into src (d) values (repeat("B",16000));
34
insert into src (d) values (repeat("B",16000));
35
insert into src (d) values (repeat("B",16000));
36
insert into src (d) values (NULL);
38
--source ../plugin/transaction_log/tests/t/truncate_log.inc
43
INSERT into dst SELECT * from src ORDER BY pk ASC;
47
--replace_regex /start_timestamp: [0-9]+/START_TIMESTAMP/g /end_timestamp: [0-9]+/END_TIMESTAMP/g /creation_timestamp: [0-9]+/CREATE_TIMESTAMP/ /update_timestamp: [0-9]+/UPDATE_TIMESTAMP/ /transaction_id: [0-9]+/TRANSACTION_ID/
48
--exec ../plugin/transaction_log/utilities/transaction_reader --raw var/master-data/local/transaction.log
51
--exec ../plugin/transaction_log/utilities/transaction_reader var/master-data/local/transaction.log
57
CREATE TABLE src (pk int auto_increment primary key, d varchar(5));
58
CREATE TABLE dst (pk int auto_increment primary key, d varchar(5) not null);
60
--source ../plugin/transaction_log/tests/t/truncate_log.inc
66
INSERT INTO src (d) VALUES ('aaa'), ('bbb'), (NULL);
68
INSERT INTO dst (d) SELECT d FROM src ORDER BY pk;
69
INSERT INTO dst (d) VALUES ('xyz');
78
--source ../plugin/transaction_log/tests/t/check_transaction_log.inc
80
# Truncate the log file to reset for the next test
84
--source ../plugin/transaction_log/tests/t/truncate_log.inc