| 1 |
CREATE TABLE t(j1 JSON); |
| 2 |
SET DEBUG_SYNC = 'innodb_inplace_alter_table_enter SIGNAL start_dml WAIT_FOR alter_continue'; |
| 3 |
ALTER TABLE t row_format = compact;; |
| 4 |
SET DEBUG_SYNC = 'now WAIT_FOR start_dml'; |
| 5 |
start transaction; |
| 6 |
# Sven |
| 7 |
select json_extract(j1, '$[0]') from t; |
| 8 |
json_extract(j1, '$[0]') |
| 9 |
"Sven" |
| 10 |
UPDATE t SET j1 = JSON_SET(j1, '$[0]', 'Knut'); |
| 11 |
# Knut |
| 12 |
select json_extract(j1, '$[0]') from t; |
| 13 |
json_extract(j1, '$[0]') |
| 14 |
"Knut" |
| 15 |
UPDATE t SET j1 = JSON_SET(j1, '$[0]', 'Anna'); |
| 16 |
# Anna |
| 17 |
select json_extract(j1, '$[0]') from t; |
| 18 |
json_extract(j1, '$[0]') |
| 19 |
"Anna" |
| 20 |
rollback; |
| 21 |
SET DEBUG_SYNC = 'now SIGNAL alter_continue'; |
| 22 |
select json_extract(j1, '$[0]') from t; |
| 23 |
json_extract(j1, '$[0]') |
| 24 |
"Sven" |
| 25 |
drop table t; |
| 26 |
SET DEBUG_SYNC = reset; |