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