| 1 |
# |
| 2 |
# Bug #16963396 INNODB: USE OF LARGE EXTERNALLY-STORED FIELDS MAKES |
| 3 |
# CRASH RECOVERY LOSE DATA |
| 4 |
# |
| 5 |
# |
| 6 |
# Uncompressed Table - UPDATE Operation - Crash Test |
| 7 |
# Update that moves non-updated column to blob |
| 8 |
# |
| 9 |
create table t2 (f1 bigint primary key, f2 longblob, f3 longblob, |
| 10 |
index(f2(10), f3(10))) engine=innodb; |
| 11 |
insert into t2 values (1, repeat('%', 1000), repeat('+', 30)); |
| 12 |
select f1, length(f2), length(f3) from t2; |
| 13 |
f1 length(f2) length(f3) |
| 14 |
1 1000 30 |
| 15 |
# Connection con1: |
| 16 |
set debug_sync='ib_mv_nonupdated_column_offpage SIGNAL s1 WAIT_FOR go_update'; |
| 17 |
begin; |
| 18 |
update t2 set f3 = repeat('[', 1000); |
| 19 |
# Connection default: |
| 20 |
set debug_sync='now WAIT_FOR s1'; |
| 21 |
set debug_sync='now SIGNAL go_update'; |
| 22 |
# Connection con1: |
| 23 |
# reap: update t2 set f3 = repeat('[', 3000); |
| 24 |
# Connection default: |
| 25 |
# Kill and restart |
| 26 |
select f1, length(f2), length(f3) from t2; |
| 27 |
f1 length(f2) length(f3) |
| 28 |
1 1000 30 |
| 29 |
select f1, right(f2, 40), right(f3, 40) from t2; |
| 30 |
f1 right(f2, 40) right(f3, 40) |
| 31 |
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ++++++++++++++++++++++++++++++ |
| 32 |
check table t2; |
| 33 |
Table Op Msg_type Msg_text |
| 34 |
test.t2 check status OK |
| 35 |
# |
| 36 |
# Compressed Table - Update Operation |
| 37 |
# update that moves a non-updated column to BLOB |
| 38 |
# |
| 39 |
set global innodb_compression_level = 0; |
| 40 |
create table t3 (f1 bigint primary key, f2 longblob, f3 longblob, |
| 41 |
index(f2(10), f3(10))) engine=innodb row_format=compressed; |
| 42 |
insert into t3 values (1, repeat('%', 1000), repeat('+', 30)); |
| 43 |
select f1, length(f2), length(f3) from t3; |
| 44 |
f1 length(f2) length(f3) |
| 45 |
1 1000 30 |
| 46 |
# Connection con2: |
| 47 |
set debug_sync='ib_mv_nonupdated_column_offpage SIGNAL s1 WAIT_FOR go_upd'; |
| 48 |
begin; |
| 49 |
update t3 set f3 = repeat(']', 1000) where f1 = 1; |
| 50 |
# Connection default: |
| 51 |
set debug_sync='now WAIT_FOR s1'; |
| 52 |
set debug_sync='now SIGNAL go_upd'; |
| 53 |
# Connection con2: |
| 54 |
# reap: update t3 set f3 = repeat(']', 1000) where f1 = 1; |
| 55 |
# Connection default: |
| 56 |
# Kill and restart |
| 57 |
select f1, length(f2), length(f3) from t3; |
| 58 |
f1 length(f2) length(f3) |
| 59 |
1 1000 30 |
| 60 |
select f1, right(f2, 30), right(f3, 20) from t3; |
| 61 |
f1 right(f2, 30) right(f3, 20) |
| 62 |
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ++++++++++++++++++++ |
| 63 |
check table t3; |
| 64 |
Table Op Msg_type Msg_text |
| 65 |
test.t3 check status OK |
| 66 |
DROP TABLE t2, t3; |