Debian Codegraph @

mysql-test/suite/innodb/include/innodb_rollback_segments_action.inc

raw
1 #
2 # test loading of table with different action that
3 # cause commit/rollback/purge (mainly involving undo-logs)
4 #
5 delimiter |;
6 create procedure populate_t1()
7 begin
8 declare i int default 1;
9 while (i <= 2000) DO
10 insert into t1 values (i, 'a', 'b');
11 set i = i + 1;
12 end while;
13 end|
14 delimiter ;|
15 begin;
16 call populate_t1();
17 commit;
18 select count(*) from t1;
19 begin;
20 call populate_t1();
21 rollback;
22 select count(*) from t1;
23 truncate table t1;
24 select count(*) from t1;
25 begin;
26 call populate_t1();
27 commit;
28 select count(*) from t1;
29 # purge should kick-in after delete.
30 delete from t1 where a < 500;
31 select count(*) from t1;
32 update t1 set b = 'innodb' where b = 'a';
33 update t1 set c = 'mysql' where c = 'b' and a < 1000;
34 begin;
35 update t1 set c = 'sqldb' where c = 'mysql' and a < 1000;
36 select count(*) from t1 where c = 'sqldb';
37 rollback;
38 #
39 drop procedure populate_t1;
40