1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
# Initialize new data directory...
# Restart on the new data directory...
# restart: --datadir=tmp/test_data_dir --log-error=my_restart.err --log_error_verbosity=2
SET GLOBAL innodb_redo_log_capacity=52428800;
SET GLOBAL innodb_change_buffering=all;
SET GLOBAL innodb_change_buffer_max_size=50;
SET GLOBAL innodb_change_buffering_debug = 1;
SET GLOBAL innodb_disable_background_merge=ON;
SET GLOBAL DEBUG='+d,ib_redo_log_system_tablespace_expansion';
CREATE DATABASE db1;
# Create 2 tables
CALL db1.CreateNTables('db1', 't', 2);
# Create Connection objects
# Insert record in each table
INSERT INTO db1.t1
VALUES(0, 1000 , 1, REPEAT('a', 2048), REPEAT('b', 2048));
INSERT INTO db1.t2
VALUES(0, 1000 , 1, REPEAT('a', 2048), REPEAT('b', 2048));
# Wait for inserts to finish
# Insert total 2^8 records in each table
CALL db1.InsertIntoRecords('db1', 't1', 8);
CALL db1.InsertIntoRecords('db1', 't2', 8);
# Wait for insert into tables to finish
# Disable page cleaner to have redo logs for recovery later on
SET GLOBAL innodb_dict_stats_disabled_debug = 1;
SET GLOBAL innodb_master_thread_disabled_debug = 1;
SET GLOBAL debug = "+d,disable_se_persists_gtid";
FLUSH ENGINE LOGS;
SET GLOBAL debug = "+d,gtid_persist_flush_disable";
SET GLOBAL innodb_log_checkpoint_now = 1;
SET GLOBAL innodb_page_cleaner_disabled_debug = 1;
SET GLOBAL innodb_checkpoint_disabled = 1;
SET GLOBAL innodb_purge_stop_now = 1;
UPDATE db1.t1
SET k = id + k , nk = k + id, c = REPEAT('a2', 512),
pad = REPEAT('b2', 512)
WHERE id % 2 = 0;
UPDATE db1.t2
SET k = id + k , nk = k + id, c = REPEAT('a2', 512),
pad = REPEAT('b2', 512)
WHERE id % 2 = 0;
# Wait for Updates to finish
UPDATE db1.t1
SET k = id + k , nk = k + id, c = REPEAT('a3', 512),
pad = REPEAT('b3', 512)
WHERE id % 3 = 0;
UPDATE db1.t2
SET k = id + k , nk = k + id, c = REPEAT('a3', 512),
pad = REPEAT('b3', 512)
WHERE id % 3 = 0;
# Wait for Updates to finish
UPDATE db1.t1
SET k = id + k , nk = k + id, c = REPEAT('a5', 512),
pad = REPEAT('b5', 512)
WHERE id % 5 = 0;
UPDATE db1.t2
SET k = id + k , nk = k + id, c = REPEAT('a5', 512),
pad = REPEAT('b5', 512)
WHERE id % 5 = 0;
# Wait for Updates to finish
# Delete records
DELETE FROM db1.t1 WHERE id % 4 = 1 ORDER BY id;
DELETE FROM db1.t2 WHERE id % 4 = 1 ORDER BY id;
# Wait for Deletes to finish #1
Pattern "System tablespace expansion is redo logged" found
SET GLOBAL DEBUG='-d,ib_redo_log_system_tablespace_expansion';
# Verify no issues observed during crash recovery
# Kill and restart: --datadir=tmp/test_data_dir --log-error=my_restart.err --log_error_verbosity=2
SELECT id, k FROM db1.t1 ORDER BY id LIMIT 1;
id k
2 2002
# Cleanup
# Kill and restart:
|