|
| 1 | +drop table if exists gh_ost_test; |
| 2 | +create table gh_ost_test ( |
| 3 | + id binary(16) NOT NULL, |
| 4 | + info varchar(255) COLLATE utf8_unicode_ci NOT NULL, |
| 5 | + data binary(8) NOT NULL, |
| 6 | + primary key (id), |
| 7 | + unique key info_uidx (info) |
| 8 | +) auto_increment=1; |
| 9 | + |
| 10 | +drop event if exists gh_ost_test; |
| 11 | +delimiter ;; |
| 12 | +create event gh_ost_test |
| 13 | + on schedule every 1 second |
| 14 | + starts current_timestamp |
| 15 | + ends current_timestamp + interval 60 second |
| 16 | + on completion not preserve |
| 17 | + enable |
| 18 | + do |
| 19 | +begin |
| 20 | + replace into gh_ost_test (id, info, data) values (X'12ffffffffffffffffffffffffffff00', 'item 1a', X'12ffffffffffffff'); |
| 21 | + replace into gh_ost_test (id, info, data) values (X'34ffffffffffffffffffffffffffffff', 'item 3a', X'34ffffffffffffff'); |
| 22 | + replace into gh_ost_test (id, info, data) values (X'90ffffffffffffffffffffffffffffff', 'item 9a', X'90ffffffffffff00'); |
| 23 | + |
| 24 | + DELETE FROM gh_ost_test WHERE id = X'11ffffffffffffffffffffffffffff00'; |
| 25 | + UPDATE gh_ost_test SET info = 'item 2++' WHERE id = X'22ffffffffffffffffffffffffffff00'; |
| 26 | + UPDATE gh_ost_test SET info = 'item 3++', data = X'33ffffffffffff00' WHERE id = X'33ffffffffffffffffffffffffffffff'; |
| 27 | + DELETE FROM gh_ost_test WHERE id = X'44ffffffffffffffffffffffffffffff'; |
| 28 | + UPDATE gh_ost_test SET info = 'item 5++', data = X'55ffffffffffffee' WHERE id = X'55ffffffffffffffffffffffffffffff'; |
| 29 | + INSERT INTO gh_ost_test (id, info, data) VALUES (X'66ffffffffffffffffffffffffffff00', 'item 6', X'66ffffffffffffff'); |
| 30 | + INSERT INTO gh_ost_test (id, info, data) VALUES (X'77ffffffffffffffffffffffffffffff', 'item 7', X'77ffffffffffff00'); |
| 31 | + INSERT INTO gh_ost_test (id, info, data) VALUES (X'88ffffffffffffffffffffffffffffff', 'item 8', X'88ffffffffffffff'); |
| 32 | +end ;; |
| 33 | + |
| 34 | +INSERT INTO gh_ost_test (id, info, data) VALUES |
| 35 | + (X'11ffffffffffffffffffffffffffff00', 'item 1', X'11ffffffffffffff'), -- id ends in 00 |
| 36 | + (X'22ffffffffffffffffffffffffffff00', 'item 2', X'22ffffffffffffff'), -- id ends in 00 |
| 37 | + (X'33ffffffffffffffffffffffffffffff', 'item 3', X'33ffffffffffffff'), |
| 38 | + (X'44ffffffffffffffffffffffffffffff', 'item 4', X'44ffffffffffffff'), |
| 39 | + (X'55ffffffffffffffffffffffffffffff', 'item 5', X'55ffffffffffffff'), |
| 40 | + (X'99ffffffffffffffffffffffffffffff', 'item 9', X'99ffffffffffff00'); -- data ends in 00 |
0 commit comments