~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/transaction_log/tests/t/rollback_statement.test

  • Committer: Lee Bieber
  • Date: 2010-12-09 19:40:05 UTC
  • mfrom: (1991.1.2 build)
  • Revision ID: kalebral@gmail.com-20101209194005-hpxailmc9afmvelh
Remove disabling of drizzleslap test
Merge Shrews - fix bug 683147: Large row affecting statements failing mid-transaction may not get undone properly by TransactionServices if part of multi-message Transaction

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Tests simple INSERT statements and the transaction log
 
3
#
 
4
 
 
5
# Ignore startup/shutdown events
 
6
--disable_query_log
 
7
--source ../plugin/transaction_log/tests/t/truncate_log.inc
 
8
 
 
9
--disable_warnings
 
10
DROP TABLE IF EXISTS t1;
 
11
 
 
12
--enable_warnings
 
13
 
 
14
CREATE TABLE src (
 
15
  pk int auto_increment primary key,
 
16
  d varchar(16000)
 
17
);
 
18
 
 
19
CREATE TABLE dst (
 
20
  pk int primary key,
 
21
  d varchar(16000) NOT NULL
 
22
);
 
23
 
 
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);
 
37
 
 
38
--source ../plugin/transaction_log/tests/t/truncate_log.inc
 
39
--enable_query_log
 
40
 
 
41
START TRANSACTION;
 
42
--error 1048
 
43
INSERT into dst SELECT * from src ORDER BY pk ASC;
 
44
COMMIT;
 
45
 
 
46
--echo
 
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
 
49
 
 
50
--echo
 
51
--exec ../plugin/transaction_log/utilities/transaction_reader var/master-data/local/transaction.log
 
52
 
 
53
--disable_query_log
 
54
DROP TABLE src;
 
55
DROP TABLE dst;
 
56
 
 
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);
 
59
 
 
60
--source ../plugin/transaction_log/tests/t/truncate_log.inc
 
61
 
 
62
--enable_query_log
 
63
 
 
64
--echo
 
65
START TRANSACTION;
 
66
INSERT INTO src (d) VALUES ('aaa'), ('bbb'), (NULL);
 
67
--error 1048
 
68
INSERT INTO dst (d) SELECT d FROM src ORDER BY pk;
 
69
INSERT INTO dst (d) VALUES ('xyz');
 
70
COMMIT;
 
71
 
 
72
--echo
 
73
SELECT * FROM src;
 
74
--echo
 
75
SELECT * FROM dst;
 
76
 
 
77
--echo
 
78
--source ../plugin/transaction_log/tests/t/check_transaction_log.inc
 
79
 
 
80
# Truncate the log file to reset for the next test
 
81
--disable_query_log
 
82
DROP TABLE src;
 
83
DROP TABLE dst;
 
84
--source ../plugin/transaction_log/tests/t/truncate_log.inc
 
85
--enable_query_log