| 1 |
use test; |
| 2 |
create table t1 |
| 3 |
(keyc int, c1 char(100), c2 char(100), |
| 4 |
primary key(keyc)) engine = innodb; |
| 5 |
create table t2 |
| 6 |
(keyc int, c1 char(100), c2 char(100), |
| 7 |
primary key(keyc)) engine = innodb; |
| 8 |
CREATE PROCEDURE populate_t1() |
| 9 |
BEGIN |
| 10 |
DECLARE i INT DEFAULT 1; |
| 11 |
while (i <= 50000) DO |
| 12 |
insert into t1 values (i, 'a', 'b'); |
| 13 |
SET i = i + 1; |
| 14 |
END WHILE; |
| 15 |
END | |
| 16 |
CREATE PROCEDURE populate_t2() |
| 17 |
BEGIN |
| 18 |
DECLARE i INT DEFAULT 1; |
| 19 |
while (i <= 50000) DO |
| 20 |
insert into t2 values (i, 'a', 'b'); |
| 21 |
SET i = i + 1; |
| 22 |
END WHILE; |
| 23 |
END | |
| 24 |
begin; |
| 25 |
call populate_t1(); |
| 26 |
delete from t1 where keyc < 20000; |
| 27 |
update t1 set c1 = 'mysql' where keyc > 20000; |
| 28 |
update t1 set c2 = 'oracle' where keyc > 20000; |
| 29 |
begin; |
| 30 |
call populate_t2(); |
| 31 |
delete from t2 where keyc < 20000; |
| 32 |
update t2 set c1 = 'mysql' where keyc > 20000; |
| 33 |
update t2 set c2 = 'oracle' where keyc > 20000; |
| 34 |
commit; |
| 35 |
commit; |
| 36 |
drop table t1, t2; |
| 37 |
drop PROCEDURE populate_t1; |
| 38 |
drop PROCEDURE populate_t2; |
| 39 |
SET GLOBAL innodb_fast_shutdown=0; |
| 40 |
# restart |
| 41 |
Pattern "Truncating UNDO tablespace" found |