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
42
--error ER_BAD_NULL_ERROR
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/ /$DRIZZLETEST_VARDIR/VARDIR/
48
--exec ../plugin/transaction_log/utilities/transaction_reader --raw $DRIZZLETEST_VARDIR/master-data/local/transaction.log
51
--replace_result $DRIZZLETEST_VARDIR VARDIR
52
--exec ../plugin/transaction_log/utilities/transaction_reader $DRIZZLETEST_VARDIR/master-data/local/transaction.log
58
CREATE TABLE src (pk int auto_increment primary key, d varchar(5));
59
CREATE TABLE dst (pk int auto_increment primary key, d varchar(5) not null);
61
--source ../plugin/transaction_log/tests/t/truncate_log.inc
67
INSERT INTO src (d) VALUES ('aaa'), ('bbb'), (NULL);
68
--error ER_BAD_NULL_ERROR
69
INSERT INTO dst (d) SELECT d FROM src ORDER BY pk;
70
INSERT INTO dst (d) VALUES ('xyz');
79
--source ../plugin/transaction_log/tests/t/check_transaction_log.inc
81
# Truncate the log file to reset for the next test
85
--source ../plugin/transaction_log/tests/t/truncate_log.inc