| 1 |
create table t1 (f1 longblob) engine=innodb; |
| 2 |
show create table t1; |
| 3 |
Table Create Table |
| 4 |
t1 CREATE TABLE `t1` ( |
| 5 |
`f1` longblob |
| 6 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 7 |
insert into t1 values (repeat('x', 1024*16*4)); |
| 8 |
select count(*) from t1; |
| 9 |
count(*) |
| 10 |
1 |
| 11 |
select left(f1, 40) from t1; |
| 12 |
left(f1, 40) |
| 13 |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 14 |
select right(f1, 40) from t1; |
| 15 |
right(f1, 40) |
| 16 |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 17 |
select length(f1) from t1; |
| 18 |
length(f1) |
| 19 |
65536 |
| 20 |
# Connection con1: |
| 21 |
start transaction; |
| 22 |
set debug_sync = 'blob_write_middle SIGNAL go_flush WAIT_FOR go_insert'; |
| 23 |
insert into t1 values (repeat('y', 1024*16*4));; |
| 24 |
# Connection default: |
| 25 |
set debug_sync = 'now WAIT_FOR go_flush'; |
| 26 |
SET GLOBAL innodb_log_checkpoint_now = ON; |
| 27 |
SET GLOBAL innodb_page_cleaner_disabled_debug = 1; |
| 28 |
SET GLOBAL innodb_dict_stats_disabled_debug = 1; |
| 29 |
SET GLOBAL innodb_master_thread_disabled_debug = 1; |
| 30 |
SET GLOBAL innodb_checkpoint_disabled = 1; |
| 31 |
set debug_sync = 'now SIGNAL go_insert'; |
| 32 |
# Connection con1: |
| 33 |
commit; |
| 34 |
# Connection default: |
| 35 |
# Kill and restart |
| 36 |
select count(*) from t1; |
| 37 |
count(*) |
| 38 |
2 |
| 39 |
select left(f1, 40) from t1; |
| 40 |
left(f1, 40) |
| 41 |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 42 |
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy |
| 43 |
select right(f1, 40) from t1; |
| 44 |
right(f1, 40) |
| 45 |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 46 |
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy |
| 47 |
select length(f1) from t1; |
| 48 |
length(f1) |
| 49 |
65536 |
| 50 |
65536 |
| 51 |
drop table t1; |