Debian Codegraph @

mysql-test/suite/innodb/r/zlob_ibd_size.result

raw
1 # Ensure that there is not already lot of data to be purged.
2 # If timeout happens here, then check the chain of previously
3 # executed test cases.
4 SET GLOBAL innodb_compression_level = 0;
5 CREATE TABLE `t`
6 (`id` INT NOT NULL AUTO_INCREMENT,
7 `b` LONGBLOB,
8 PRIMARY KEY(`id`)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
9 CREATE PROCEDURE p(p_num INT)
10 BEGIN
11 DECLARE v_i INT DEFAULT 0;
12 REPEAT
13 UPDATE t SET b:=REPEAT('a',1024*1024*4);
14 UPDATE t SET b:=REPEAT('b',1024*1024*4);
15 SET v_i:=v_i+1;
16 UNTIL v_i>p_num END REPEAT;
17 END $
18 SET @b:=repeat('b',4*1024*1024);
19 INSERT INTO t(id,b) VALUES(1,@b);
20 START TRANSACTION;
21 CALL p(20);
22 COMMIT;
23 FLUSH TABLES `t` FOR EXPORT;
24 UNLOCK TABLES;
25 SET @fs1 = (SELECT file_size FROM information_schema.innodb_tablespaces
26 WHERE name = 'test/t');
27 START TRANSACTION;
28 CALL p(20);
29 COMMIT;
30 FLUSH TABLES `t` FOR EXPORT;
31 UNLOCK TABLES;
32 SET @fs2 = (SELECT file_size FROM information_schema.innodb_tablespaces
33 WHERE name = 'test/t');
34 SET @growing = (SELECT (@fs2 - @fs1));
35 SELECT @growing;
36 @growing
37 0
38 START TRANSACTION;
39 CALL p(20);
40 ROLLBACK;
41 FLUSH TABLES `t` FOR EXPORT;
42 UNLOCK TABLES;
43 SET @fs3 = (SELECT file_size FROM information_schema.innodb_tablespaces
44 WHERE name = 'test/t');
45 SET @growing = (SELECT (@fs3 - @fs2));
46 SELECT @growing;
47 @growing
48 0
49 DROP PROCEDURE p;
50 DROP TABLE t;
51 SET GLOBAL innodb_compression_level = DEFAULT;