1143.2.22
by Jay Pipes
Adds functionality to handle REPLACE statements correctly in the replication |
1 |
DROP TABLE IF EXISTS t1, t2;
|
2 |
CREATE TABLE t1 (
|
|
1143.2.27
by Jay Pipes
Corrects problems where REPLACE and INSERT ... ON DUPLICATE KEY UPDATE |
3 |
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
|
1143.2.22
by Jay Pipes
Adds functionality to handle REPLACE statements correctly in the replication |
4 |
, padding VARCHAR(200) NOT NULL
|
1143.2.27
by Jay Pipes
Corrects problems where REPLACE and INSERT ... ON DUPLICATE KEY UPDATE |
5 |
) ENGINE=InnoDB;
|
1143.2.22
by Jay Pipes
Adds functionality to handle REPLACE statements correctly in the replication |
6 |
INSERT INTO t1 VALUES (1, "I love testing.");
|
7 |
INSERT INTO t1 VALUES (2, "I hate testing.");
|
|
8 |
REPLACE INTO t1 VALUE (2, "I love testing.");
|
|
9 |
DROP TABLE t1;
|
|
1143.2.27
by Jay Pipes
Corrects problems where REPLACE and INSERT ... ON DUPLICATE KEY UPDATE |
10 |
CREATE TABLE t1 (
|
11 |
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
|
|
12 |
, padding VARCHAR(200) NOT NULL
|
|
13 |
) ENGINE=InnoDB;
|
|
14 |
CREATE TABLE t2 (
|
|
15 |
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
|
|
16 |
, fk_id INT NOT NULL
|
|
17 |
, CONSTRAINT fk_t1 FOREIGN KEY (fk_id) REFERENCES t1 (id) ON DELETE CASCADE
|
|
18 |
) ENGINE=InnoDB;
|
|
19 |
INSERT INTO t1 VALUES (1, "I love testing.");
|
|
20 |
INSERT INTO t1 VALUES (2, "I hate testing.");
|
|
21 |
REPLACE INTO t1 VALUE (2, "I love testing.");
|
|
22 |
DROP TABLE t2, t1;
|
|
1730.5.1
by David Shrewsbury
Use the update record, not insert record, when record DELETE operations during REPLACE. |
23 |
create table t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b char(1), c INT, d INT, unique key(b), unique key(c));
|
24 |
insert into t1 values (1,"a",1,1),(2,"b",2,2),(3,"c",3,3);
|
|
25 |
replace into t1 values (1,"b",3,4);
|
|
26 |
select * from t1 order by a;
|
|
27 |
a b c d
|
|
28 |
1 b 3 4
|
|
29 |
drop table t1;
|
|
30 |
create table t1 (a CHAR(5) NOT NULL PRIMARY KEY, b char(1), c INT, d INT, unique key(b), unique key(c));
|
|
31 |
insert into t1 values ("a","a",1,1),("bb","b",2,2),("ccc","c",3,3);
|
|
32 |
replace into t1 values ("a","b",3,4);
|
|
33 |
select * from t1 order by a;
|
|
34 |
a b c d
|
|
35 |
a b 3 4
|
|
36 |
drop table t1;
|
|
37 |
create table t1 (a DATE NOT NULL PRIMARY KEY, b char(1), c INT, d INT, unique key(b), unique key(c));
|
|
38 |
insert into t1 values ("2010-01-01","a",1,1),("2010-02-02","b",2,2),("2010-03-03","c",3,3);
|
|
39 |
replace into t1 values ("2010-01-01","b",3,4);
|
|
40 |
select * from t1 order by a;
|
|
41 |
a b c d
|
|
42 |
2010-01-01 b 3 4
|
|
43 |
drop table t1;
|
|
44 |
create table t1 (a DOUBLE NOT NULL PRIMARY KEY, b char(1), c INT, d INT, unique key(b), unique key(c));
|
|
45 |
insert into t1 values (1.1,"a",1,1),(22.22,"b",2,2),(333.333,"c",3,3);
|
|
46 |
replace into t1 values (1.1,"b",3,4);
|
|
47 |
select * from t1 order by a;
|
|
48 |
a b c d
|
|
49 |
1.1 b 3 4
|
|
50 |
drop table t1;
|
|
51 |
create table t1 (a FLOAT NOT NULL PRIMARY KEY, b char(1), c INT, d INT, unique key(b), unique key(c));
|
|
52 |
insert into t1 values (1.1,"a",1,1),(22.22,"b",2,2),(333.333,"c",3,3);
|
|
53 |
replace into t1 values (1.1,"b",3,4);
|
|
54 |
select * from t1 order by a;
|
|
55 |
a b c d
|
|
56 |
1.1 b 3 4
|
|
57 |
drop table t1;
|
|
58 |
create table t1 (a ENUM("a","bb","ccc") NOT NULL PRIMARY KEY, b char(1), c INT, d INT, unique key(b), unique key(c));
|
|
59 |
insert into t1 values ("a","a",1,1),("bb","b",2,2),("ccc","c",3,3);
|
|
60 |
replace into t1 values ("a","b",3,4);
|
|
61 |
select * from t1 order by a;
|
|
62 |
a b c d
|
|
63 |
a b 3 4
|
|
64 |
drop table t1;
|
|
1143.4.25
by Jay Pipes
Correctly puts START TRANSACTION; COMMIT; containers around group-related SQL statements in the transaction_reader and ensures that when a different type of Statement message is started in an existing Transaction message, that the active Statement message is finalized. |
65 |
START TRANSACTION;
|
1743.5.2
by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output |
66 |
CREATE TABLE `test`.`t1` ( `id` INT NOT NULL AUTO_INCREMENT, `padding` VARCHAR(200) COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci;
|
1143.4.25
by Jay Pipes
Correctly puts START TRANSACTION; COMMIT; containers around group-related SQL statements in the transaction_reader and ensures that when a different type of Statement message is started in an existing Transaction message, that the active Statement message is finalized. |
67 |
COMMIT;
|
68 |
START TRANSACTION;
|
|
1143.2.27
by Jay Pipes
Corrects problems where REPLACE and INSERT ... ON DUPLICATE KEY UPDATE |
69 |
INSERT INTO `test`.`t1` (`id`,`padding`) VALUES (1,'I love testing.');
|
1143.4.25
by Jay Pipes
Correctly puts START TRANSACTION; COMMIT; containers around group-related SQL statements in the transaction_reader and ensures that when a different type of Statement message is started in an existing Transaction message, that the active Statement message is finalized. |
70 |
COMMIT;
|
71 |
START TRANSACTION;
|
|
1143.2.27
by Jay Pipes
Corrects problems where REPLACE and INSERT ... ON DUPLICATE KEY UPDATE |
72 |
INSERT INTO `test`.`t1` (`id`,`padding`) VALUES (2,'I hate testing.');
|
1143.4.25
by Jay Pipes
Correctly puts START TRANSACTION; COMMIT; containers around group-related SQL statements in the transaction_reader and ensures that when a different type of Statement message is started in an existing Transaction message, that the active Statement message is finalized. |
73 |
COMMIT;
|
74 |
START TRANSACTION;
|
|
1143.2.27
by Jay Pipes
Corrects problems where REPLACE and INSERT ... ON DUPLICATE KEY UPDATE |
75 |
UPDATE `test`.`t1` SET `padding`='I love testing.' WHERE `id`=2;
|
1143.4.25
by Jay Pipes
Correctly puts START TRANSACTION; COMMIT; containers around group-related SQL statements in the transaction_reader and ensures that when a different type of Statement message is started in an existing Transaction message, that the active Statement message is finalized. |
76 |
COMMIT;
|
77 |
START TRANSACTION;
|
|
1308.2.4
by Jay Pipes
Adds DROP TABLE to the list of non RAW_SQL statements in replication stream |
78 |
DROP TABLE `test`.`t1`;
|
1143.4.25
by Jay Pipes
Correctly puts START TRANSACTION; COMMIT; containers around group-related SQL statements in the transaction_reader and ensures that when a different type of Statement message is started in an existing Transaction message, that the active Statement message is finalized. |
79 |
COMMIT;
|
80 |
START TRANSACTION;
|
|
1743.5.2
by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output |
81 |
CREATE TABLE `test`.`t1` ( `id` INT NOT NULL AUTO_INCREMENT, `padding` VARCHAR(200) COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci;
|
1143.4.25
by Jay Pipes
Correctly puts START TRANSACTION; COMMIT; containers around group-related SQL statements in the transaction_reader and ensures that when a different type of Statement message is started in an existing Transaction message, that the active Statement message is finalized. |
82 |
COMMIT;
|
83 |
START TRANSACTION;
|
|
1743.5.2
by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output |
84 |
CREATE TABLE `test`.`t2` ( `id` INT NOT NULL AUTO_INCREMENT, `fk_id` INT NOT NULL, PRIMARY KEY (`id`), KEY `fk_t1` (`fk_id`), CONSTRAINT `fk_t1` FOREIGN KEY (`fk_id`) REFERENCES `t1` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB COLLATE = utf8_general_ci;
|
1143.4.25
by Jay Pipes
Correctly puts START TRANSACTION; COMMIT; containers around group-related SQL statements in the transaction_reader and ensures that when a different type of Statement message is started in an existing Transaction message, that the active Statement message is finalized. |
85 |
COMMIT;
|
86 |
START TRANSACTION;
|
|
1143.2.22
by Jay Pipes
Adds functionality to handle REPLACE statements correctly in the replication |
87 |
INSERT INTO `test`.`t1` (`id`,`padding`) VALUES (1,'I love testing.');
|
1143.4.25
by Jay Pipes
Correctly puts START TRANSACTION; COMMIT; containers around group-related SQL statements in the transaction_reader and ensures that when a different type of Statement message is started in an existing Transaction message, that the active Statement message is finalized. |
88 |
COMMIT;
|
89 |
START TRANSACTION;
|
|
1143.2.22
by Jay Pipes
Adds functionality to handle REPLACE statements correctly in the replication |
90 |
INSERT INTO `test`.`t1` (`id`,`padding`) VALUES (2,'I hate testing.');
|
1143.4.25
by Jay Pipes
Correctly puts START TRANSACTION; COMMIT; containers around group-related SQL statements in the transaction_reader and ensures that when a different type of Statement message is started in an existing Transaction message, that the active Statement message is finalized. |
91 |
COMMIT;
|
92 |
START TRANSACTION;
|
|
1143.2.22
by Jay Pipes
Adds functionality to handle REPLACE statements correctly in the replication |
93 |
DELETE FROM `test`.`t1` WHERE `id`=2;
|
94 |
INSERT INTO `test`.`t1` (`id`,`padding`) VALUES (2,'I love testing.');
|
|
1143.4.25
by Jay Pipes
Correctly puts START TRANSACTION; COMMIT; containers around group-related SQL statements in the transaction_reader and ensures that when a different type of Statement message is started in an existing Transaction message, that the active Statement message is finalized. |
95 |
COMMIT;
|
96 |
START TRANSACTION;
|
|
1308.2.4
by Jay Pipes
Adds DROP TABLE to the list of non RAW_SQL statements in replication stream |
97 |
DROP TABLE `test`.`t2`;
|
1143.4.25
by Jay Pipes
Correctly puts START TRANSACTION; COMMIT; containers around group-related SQL statements in the transaction_reader and ensures that when a different type of Statement message is started in an existing Transaction message, that the active Statement message is finalized. |
98 |
COMMIT;
|
99 |
START TRANSACTION;
|
|
1308.2.4
by Jay Pipes
Adds DROP TABLE to the list of non RAW_SQL statements in replication stream |
100 |
DROP TABLE `test`.`t1`;
|
1143.4.25
by Jay Pipes
Correctly puts START TRANSACTION; COMMIT; containers around group-related SQL statements in the transaction_reader and ensures that when a different type of Statement message is started in an existing Transaction message, that the active Statement message is finalized. |
101 |
COMMIT;
|
1730.5.1
by David Shrewsbury
Use the update record, not insert record, when record DELETE operations during REPLACE. |
102 |
START TRANSACTION;
|
1743.5.2
by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output |
103 |
CREATE TABLE `test`.`t1` ( `a` INT NOT NULL AUTO_INCREMENT, `b` VARCHAR(1) COLLATE utf8_general_ci DEFAULT NULL, `c` INT DEFAULT NULL, `d` INT DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `b` (`b`), UNIQUE KEY `c` (`c`) ) ENGINE=InnoDB COLLATE = utf8_general_ci;
|
1730.5.1
by David Shrewsbury
Use the update record, not insert record, when record DELETE operations during REPLACE. |
104 |
COMMIT;
|
105 |
START TRANSACTION;
|
|
106 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (1,'a',1,1);
|
|
107 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (2,'b',2,2);
|
|
108 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (3,'c',3,3);
|
|
109 |
COMMIT;
|
|
110 |
START TRANSACTION;
|
|
111 |
DELETE FROM `test`.`t1` WHERE `a`=1;
|
|
112 |
DELETE FROM `test`.`t1` WHERE `a`=2;
|
|
113 |
UPDATE `test`.`t1` SET `a`=1,`b`='b',`d`=4 WHERE `a`=3;
|
|
114 |
COMMIT;
|
|
115 |
START TRANSACTION;
|
|
116 |
DROP TABLE `test`.`t1`;
|
|
117 |
COMMIT;
|
|
118 |
START TRANSACTION;
|
|
1743.5.2
by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output |
119 |
CREATE TABLE `test`.`t1` ( `a` VARCHAR(5) COLLATE utf8_general_ci NOT NULL, `b` VARCHAR(1) COLLATE utf8_general_ci DEFAULT NULL, `c` INT DEFAULT NULL, `d` INT DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `b` (`b`), UNIQUE KEY `c` (`c`) ) ENGINE=InnoDB COLLATE = utf8_general_ci;
|
1730.5.1
by David Shrewsbury
Use the update record, not insert record, when record DELETE operations during REPLACE. |
120 |
COMMIT;
|
121 |
START TRANSACTION;
|
|
122 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('a','a',1,1);
|
|
123 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('bb','b',2,2);
|
|
124 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('ccc','c',3,3);
|
|
125 |
COMMIT;
|
|
126 |
START TRANSACTION;
|
|
127 |
DELETE FROM `test`.`t1` WHERE `a`='a';
|
|
128 |
DELETE FROM `test`.`t1` WHERE `a`='bb';
|
|
129 |
UPDATE `test`.`t1` SET `a`='a',`b`='b',`d`=4 WHERE `a`='ccc';
|
|
130 |
COMMIT;
|
|
131 |
START TRANSACTION;
|
|
132 |
DROP TABLE `test`.`t1`;
|
|
133 |
COMMIT;
|
|
134 |
START TRANSACTION;
|
|
1743.5.2
by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output |
135 |
CREATE TABLE `test`.`t1` ( `a` DATE NOT NULL, `b` VARCHAR(1) COLLATE utf8_general_ci DEFAULT NULL, `c` INT DEFAULT NULL, `d` INT DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `b` (`b`), UNIQUE KEY `c` (`c`) ) ENGINE=InnoDB COLLATE = utf8_general_ci;
|
1730.5.1
by David Shrewsbury
Use the update record, not insert record, when record DELETE operations during REPLACE. |
136 |
COMMIT;
|
137 |
START TRANSACTION;
|
|
138 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('2010-01-01','a',1,1);
|
|
139 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('2010-02-02','b',2,2);
|
|
140 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('2010-03-03','c',3,3);
|
|
141 |
COMMIT;
|
|
142 |
START TRANSACTION;
|
|
143 |
DELETE FROM `test`.`t1` WHERE `a`='2010-01-01';
|
|
144 |
DELETE FROM `test`.`t1` WHERE `a`='2010-02-02';
|
|
145 |
UPDATE `test`.`t1` SET `a`='2010-01-01',`b`='b',`d`=4 WHERE `a`='2010-03-03';
|
|
146 |
COMMIT;
|
|
147 |
START TRANSACTION;
|
|
148 |
DROP TABLE `test`.`t1`;
|
|
149 |
COMMIT;
|
|
150 |
START TRANSACTION;
|
|
1743.5.2
by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output |
151 |
CREATE TABLE `test`.`t1` ( `a` DOUBLE NOT NULL, `b` VARCHAR(1) COLLATE utf8_general_ci DEFAULT NULL, `c` INT DEFAULT NULL, `d` INT DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `b` (`b`), UNIQUE KEY `c` (`c`) ) ENGINE=InnoDB COLLATE = utf8_general_ci;
|
152 |
COMMIT;
|
|
153 |
START TRANSACTION;
|
|
154 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (1.1,'a',1,1);
|
|
155 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (22.22,'b',2,2);
|
|
156 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (333.333,'c',3,3);
|
|
157 |
COMMIT;
|
|
158 |
START TRANSACTION;
|
|
159 |
DELETE FROM `test`.`t1` WHERE `a`=1.1;
|
|
160 |
DELETE FROM `test`.`t1` WHERE `a`=22.22;
|
|
161 |
UPDATE `test`.`t1` SET `a`=1.1,`b`='b',`d`=4 WHERE `a`=333.333;
|
|
162 |
COMMIT;
|
|
163 |
START TRANSACTION;
|
|
164 |
DROP TABLE `test`.`t1`;
|
|
165 |
COMMIT;
|
|
166 |
START TRANSACTION;
|
|
167 |
CREATE TABLE `test`.`t1` ( `a` DOUBLE NOT NULL, `b` VARCHAR(1) COLLATE utf8_general_ci DEFAULT NULL, `c` INT DEFAULT NULL, `d` INT DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `b` (`b`), UNIQUE KEY `c` (`c`) ) ENGINE=InnoDB COLLATE = utf8_general_ci;
|
|
168 |
COMMIT;
|
|
169 |
START TRANSACTION;
|
|
170 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (1.1,'a',1,1);
|
|
171 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (22.22,'b',2,2);
|
|
172 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (333.333,'c',3,3);
|
|
173 |
COMMIT;
|
|
174 |
START TRANSACTION;
|
|
175 |
DELETE FROM `test`.`t1` WHERE `a`=1.1;
|
|
176 |
DELETE FROM `test`.`t1` WHERE `a`=22.22;
|
|
177 |
UPDATE `test`.`t1` SET `a`=1.1,`b`='b',`d`=4 WHERE `a`=333.333;
|
|
178 |
COMMIT;
|
|
179 |
START TRANSACTION;
|
|
180 |
DROP TABLE `test`.`t1`;
|
|
181 |
COMMIT;
|
|
182 |
START TRANSACTION;
|
|
183 |
CREATE TABLE `test`.`t1` ( `a` ENUM('a','bb','ccc') NOT NULL, `b` VARCHAR(1) COLLATE utf8_general_ci DEFAULT NULL, `c` INT DEFAULT NULL, `d` INT DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `b` (`b`), UNIQUE KEY `c` (`c`) ) ENGINE=InnoDB COLLATE = utf8_general_ci;
|
|
1730.5.1
by David Shrewsbury
Use the update record, not insert record, when record DELETE operations during REPLACE. |
184 |
COMMIT;
|
185 |
START TRANSACTION;
|
|
1776.3.1
by David Shrewsbury
Quote ENUM field values when create SQL from protobuf messages |
186 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('a','a',1,1);
|
187 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('bb','b',2,2);
|
|
188 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('ccc','c',3,3);
|
|
1730.5.1
by David Shrewsbury
Use the update record, not insert record, when record DELETE operations during REPLACE. |
189 |
COMMIT;
|
190 |
START TRANSACTION;
|
|
1776.3.1
by David Shrewsbury
Quote ENUM field values when create SQL from protobuf messages |
191 |
DELETE FROM `test`.`t1` WHERE `a`='a';
|
192 |
DELETE FROM `test`.`t1` WHERE `a`='bb';
|
|
193 |
UPDATE `test`.`t1` SET `a`='a',`b`='b',`d`=4 WHERE `a`='ccc';
|
|
1730.5.1
by David Shrewsbury
Use the update record, not insert record, when record DELETE operations during REPLACE. |
194 |
COMMIT;
|
195 |
START TRANSACTION;
|
|
196 |
DROP TABLE `test`.`t1`;
|
|
197 |
COMMIT;
|
|
1802.17.17
by Joseph Daly
port additional tests |
198 |
|
199 |
Generating statements for innodb replication log |
|
200 |
START TRANSACTION; |
|
201 |
CREATE TABLE `test`.`t1` ( `id` INT NOT NULL AUTO_INCREMENT, `padding` VARCHAR(200) COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci; |
|
202 |
COMMIT; |
|
203 |
START TRANSACTION; |
|
204 |
INSERT INTO `test`.`t1` (`id`,`padding`) VALUES (1,'I love testing.'); |
|
205 |
COMMIT; |
|
206 |
START TRANSACTION; |
|
207 |
INSERT INTO `test`.`t1` (`id`,`padding`) VALUES (2,'I hate testing.'); |
|
208 |
COMMIT; |
|
209 |
START TRANSACTION; |
|
210 |
UPDATE `test`.`t1` SET `padding`='I love testing.' WHERE `id`=2; |
|
211 |
COMMIT; |
|
212 |
START TRANSACTION; |
|
213 |
DROP TABLE `test`.`t1`; |
|
214 |
COMMIT; |
|
215 |
START TRANSACTION; |
|
216 |
CREATE TABLE `test`.`t1` ( `id` INT NOT NULL AUTO_INCREMENT, `padding` VARCHAR(200) COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci; |
|
217 |
COMMIT; |
|
218 |
START TRANSACTION; |
|
219 |
CREATE TABLE `test`.`t2` ( `id` INT NOT NULL AUTO_INCREMENT, `fk_id` INT NOT NULL, PRIMARY KEY (`id`), KEY `fk_t1` (`fk_id`), CONSTRAINT `fk_t1` FOREIGN KEY (`fk_id`) REFERENCES `t1` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB COLLATE = utf8_general_ci; |
|
220 |
COMMIT; |
|
221 |
START TRANSACTION; |
|
222 |
INSERT INTO `test`.`t1` (`id`,`padding`) VALUES (1,'I love testing.'); |
|
223 |
COMMIT; |
|
224 |
START TRANSACTION; |
|
225 |
INSERT INTO `test`.`t1` (`id`,`padding`) VALUES (2,'I hate testing.'); |
|
226 |
COMMIT; |
|
227 |
START TRANSACTION; |
|
228 |
DELETE FROM `test`.`t1` WHERE `id`=2; |
|
229 |
INSERT INTO `test`.`t1` (`id`,`padding`) VALUES (2,'I love testing.'); |
|
230 |
COMMIT; |
|
231 |
START TRANSACTION; |
|
232 |
DROP TABLE `test`.`t2`; |
|
233 |
COMMIT; |
|
234 |
START TRANSACTION; |
|
235 |
DROP TABLE `test`.`t1`; |
|
236 |
COMMIT; |
|
237 |
START TRANSACTION; |
|
238 |
CREATE TABLE `test`.`t1` ( `a` INT NOT NULL AUTO_INCREMENT, `b` VARCHAR(1) COLLATE utf8_general_ci DEFAULT NULL, `c` INT DEFAULT NULL, `d` INT DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `b` (`b`), UNIQUE KEY `c` (`c`) ) ENGINE=InnoDB COLLATE = utf8_general_ci; |
|
239 |
COMMIT; |
|
240 |
START TRANSACTION; |
|
241 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (1,'a',1,1); |
|
242 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (2,'b',2,2); |
|
243 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (3,'c',3,3); |
|
244 |
COMMIT; |
|
245 |
START TRANSACTION; |
|
246 |
DELETE FROM `test`.`t1` WHERE `a`=1; |
|
247 |
DELETE FROM `test`.`t1` WHERE `a`=2; |
|
248 |
UPDATE `test`.`t1` SET `a`=1,`b`='b',`d`=4 WHERE `a`=3; |
|
249 |
COMMIT; |
|
250 |
START TRANSACTION; |
|
251 |
DROP TABLE `test`.`t1`; |
|
252 |
COMMIT; |
|
253 |
START TRANSACTION; |
|
254 |
CREATE TABLE `test`.`t1` ( `a` VARCHAR(5) COLLATE utf8_general_ci NOT NULL, `b` VARCHAR(1) COLLATE utf8_general_ci DEFAULT NULL, `c` INT DEFAULT NULL, `d` INT DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `b` (`b`), UNIQUE KEY `c` (`c`) ) ENGINE=InnoDB COLLATE = utf8_general_ci; |
|
255 |
COMMIT; |
|
256 |
START TRANSACTION; |
|
257 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('a','a',1,1); |
|
258 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('bb','b',2,2); |
|
259 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('ccc','c',3,3); |
|
260 |
COMMIT; |
|
261 |
START TRANSACTION; |
|
262 |
DELETE FROM `test`.`t1` WHERE `a`='a'; |
|
263 |
DELETE FROM `test`.`t1` WHERE `a`='bb'; |
|
264 |
UPDATE `test`.`t1` SET `a`='a',`b`='b',`d`=4 WHERE `a`='ccc'; |
|
265 |
COMMIT; |
|
266 |
START TRANSACTION; |
|
267 |
DROP TABLE `test`.`t1`; |
|
268 |
COMMIT; |
|
269 |
START TRANSACTION; |
|
270 |
CREATE TABLE `test`.`t1` ( `a` DATE NOT NULL, `b` VARCHAR(1) COLLATE utf8_general_ci DEFAULT NULL, `c` INT DEFAULT NULL, `d` INT DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `b` (`b`), UNIQUE KEY `c` (`c`) ) ENGINE=InnoDB COLLATE = utf8_general_ci; |
|
271 |
COMMIT; |
|
272 |
START TRANSACTION; |
|
273 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('2010-01-01','a',1,1); |
|
274 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('2010-02-02','b',2,2); |
|
275 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('2010-03-03','c',3,3); |
|
276 |
COMMIT; |
|
277 |
START TRANSACTION; |
|
278 |
DELETE FROM `test`.`t1` WHERE `a`='2010-01-01'; |
|
279 |
DELETE FROM `test`.`t1` WHERE `a`='2010-02-02'; |
|
280 |
UPDATE `test`.`t1` SET `a`='2010-01-01',`b`='b',`d`=4 WHERE `a`='2010-03-03'; |
|
281 |
COMMIT; |
|
282 |
START TRANSACTION; |
|
283 |
DROP TABLE `test`.`t1`; |
|
284 |
COMMIT; |
|
285 |
START TRANSACTION; |
|
286 |
CREATE TABLE `test`.`t1` ( `a` DOUBLE NOT NULL, `b` VARCHAR(1) COLLATE utf8_general_ci DEFAULT NULL, `c` INT DEFAULT NULL, `d` INT DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `b` (`b`), UNIQUE KEY `c` (`c`) ) ENGINE=InnoDB COLLATE = utf8_general_ci; |
|
287 |
COMMIT; |
|
288 |
START TRANSACTION; |
|
289 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (1.1,'a',1,1); |
|
290 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (22.22,'b',2,2); |
|
291 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (333.333,'c',3,3); |
|
292 |
COMMIT; |
|
293 |
START TRANSACTION; |
|
294 |
DELETE FROM `test`.`t1` WHERE `a`=1.1; |
|
295 |
DELETE FROM `test`.`t1` WHERE `a`=22.22; |
|
296 |
UPDATE `test`.`t1` SET `a`=1.1,`b`='b',`d`=4 WHERE `a`=333.333; |
|
297 |
COMMIT; |
|
298 |
START TRANSACTION; |
|
299 |
DROP TABLE `test`.`t1`; |
|
300 |
COMMIT; |
|
301 |
START TRANSACTION; |
|
302 |
CREATE TABLE `test`.`t1` ( `a` DOUBLE NOT NULL, `b` VARCHAR(1) COLLATE utf8_general_ci DEFAULT NULL, `c` INT DEFAULT NULL, `d` INT DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `b` (`b`), UNIQUE KEY `c` (`c`) ) ENGINE=InnoDB COLLATE = utf8_general_ci; |
|
303 |
COMMIT; |
|
304 |
START TRANSACTION; |
|
305 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (1.1,'a',1,1); |
|
306 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (22.22,'b',2,2); |
|
307 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES (333.333,'c',3,3); |
|
308 |
COMMIT; |
|
309 |
START TRANSACTION; |
|
310 |
DELETE FROM `test`.`t1` WHERE `a`=1.1; |
|
311 |
DELETE FROM `test`.`t1` WHERE `a`=22.22; |
|
312 |
UPDATE `test`.`t1` SET `a`=1.1,`b`='b',`d`=4 WHERE `a`=333.333; |
|
313 |
COMMIT; |
|
314 |
START TRANSACTION; |
|
315 |
DROP TABLE `test`.`t1`; |
|
316 |
COMMIT; |
|
317 |
START TRANSACTION; |
|
318 |
CREATE TABLE `test`.`t1` ( `a` ENUM('a','bb','ccc') NOT NULL, `b` VARCHAR(1) COLLATE utf8_general_ci DEFAULT NULL, `c` INT DEFAULT NULL, `d` INT DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `b` (`b`), UNIQUE KEY `c` (`c`) ) ENGINE=InnoDB COLLATE = utf8_general_ci; |
|
319 |
COMMIT; |
|
320 |
START TRANSACTION; |
|
321 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('a','a',1,1); |
|
322 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('bb','b',2,2); |
|
323 |
INSERT INTO `test`.`t1` (`a`,`b`,`c`,`d`) VALUES ('ccc','c',3,3); |
|
324 |
COMMIT; |
|
325 |
START TRANSACTION; |
|
326 |
DELETE FROM `test`.`t1` WHERE `a`='a'; |
|
327 |
DELETE FROM `test`.`t1` WHERE `a`='bb'; |
|
328 |
UPDATE `test`.`t1` SET `a`='a',`b`='b',`d`=4 WHERE `a`='ccc'; |
|
329 |
COMMIT; |
|
330 |
START TRANSACTION; |
|
331 |
DROP TABLE `test`.`t1`; |
|
332 |
COMMIT; |
|
1143.2.22
by Jay Pipes
Adds functionality to handle REPLACE statements correctly in the replication |
333 |
SET GLOBAL transaction_log_truncate_debug= true; |