Debian Codegraph @

mysql-test/suite/innodb_undo/include/undo_trunc_multi_client.inc

raw
1 #
2 # WL#6965: Truncate UNDO logs.
3 #
4
5 --source include/not_valgrind.inc
6 --source include/big_test.inc
7
8 #-----------------------------------------------------------------------------
9 #
10 # Perform DML action using multiple clients and multiple undo tablespace.
11 #
12 #
13 use test;
14 create table t1
15 (keyc int, c1 char(100), c2 char(100),
16 primary key(keyc)) engine = innodb;
17 create table t2
18 (keyc int, c1 char(100), c2 char(100),
19 primary key(keyc)) engine = innodb;
20 #
21 delimiter |;
22 CREATE PROCEDURE populate_t1()
23 BEGIN
24 DECLARE i INT DEFAULT 1;
25 while (i <= 50000) DO
26 insert into t1 values (i, 'a', 'b');
27 SET i = i + 1;
28 END WHILE;
29 END |
30 delimiter ;|
31 #
32 delimiter |;
33 CREATE PROCEDURE populate_t2()
34 BEGIN
35 DECLARE i INT DEFAULT 1;
36 while (i <= 50000) DO
37 insert into t2 values (i, 'a', 'b');
38 SET i = i + 1;
39 END WHILE;
40 END |
41 delimiter ;|
42 #
43 #
44 connect (con1,localhost,root,,);
45 connect (con2,localhost,root,,);
46 #
47 #
48 connection con1;
49 begin;
50 call populate_t1();
51 delete from t1 where keyc < 20000;
52 update t1 set c1 = 'mysql' where keyc > 20000;
53 update t1 set c2 = 'oracle' where keyc > 20000;
54 #
55 connection con2;
56 begin;
57 call populate_t2();
58 delete from t2 where keyc < 20000;
59 update t2 set c1 = 'mysql' where keyc > 20000;
60 update t2 set c2 = 'oracle' where keyc > 20000;
61 #
62 connection con1;
63 commit;
64 connection con2;
65 commit;
66 #
67 connection default;
68 drop table t1, t2;
69 drop PROCEDURE populate_t1;
70 drop PROCEDURE populate_t2;
71 #
72 SET GLOBAL innodb_fast_shutdown=0;
73 --let $shutdown_server_timeout=180
74 --source include/restart_mysqld.inc
75
76 let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
77 let SEARCH_PATTERN = Truncating UNDO tablespace;
78 --source include/search_pattern.inc