29 lines
876 B
Plaintext
29 lines
876 B
Plaintext
# Stop DB server which was created by MTR default
|
|
# create bootstrap file
|
|
# Run the bootstrap command with 2 undo tablespaces
|
|
# Start the DB server with 2 undo tablespaces
|
|
# restart: --datadir=MYSQLD_DATADIR1 --innodb_undo_tablespaces=2
|
|
CREATE TABLE t1
|
|
(keyc INT, c1 CHAR(100), c2 CHAR(100),
|
|
PRIMARY KEY(keyc))ENGINE=INNODB;
|
|
CREATE PROCEDURE populate_t1()
|
|
BEGIN
|
|
DECLARE i INT DEFAULT 1;
|
|
while (i <= 40000) DO
|
|
insert into t1 values (i, 'a', 'b');
|
|
SET i = i + 1;
|
|
END WHILE;
|
|
END |
|
|
BEGIN;
|
|
CALL populate_t1();
|
|
DELETE FROM t1 WHERE keyc < 20000;
|
|
UPDATE t1 SET c1 = 'mysql' WHERE keyc > 20000;
|
|
UPDATE t1 SET c1 = 'oracle' WHERE keyc > 20000;
|
|
COMMIT;
|
|
DROP TABLE t1;
|
|
DROP PROCEDURE populate_t1;
|
|
# Read the file size of undo tablespace before truncation
|
|
SET GLOBAL innodb_fast_shutdown=0;
|
|
# restart: --innodb-page-size=page_size
|
|
# Read the file size of undo tablespace after truncation
|