| 1 |
set global innodb_compression_level = 0; |
| 2 |
CREATE TABLE t(j1 JSON) row_format = compressed; |
| 3 |
start transaction; |
| 4 |
# Sven |
| 5 |
select json_extract(j1, '$[0]') from t; |
| 6 |
json_extract(j1, '$[0]') |
| 7 |
"Sven" |
| 8 |
UPDATE t SET j1 = JSON_SET(j1, '$[0]', 'Knut'); |
| 9 |
# Knut |
| 10 |
select json_extract(j1, '$[0]') from t; |
| 11 |
json_extract(j1, '$[0]') |
| 12 |
"Knut" |
| 13 |
UPDATE t SET j1 = JSON_SET(j1, '$[0]', 'Anna'); |
| 14 |
# Anna |
| 15 |
select json_extract(j1, '$[0]') from t; |
| 16 |
json_extract(j1, '$[0]') |
| 17 |
"Anna" |
| 18 |
rollback; |
| 19 |
select json_extract(j1, '$[0]') from t; |
| 20 |
json_extract(j1, '$[0]') |
| 21 |
"Sven" |
| 22 |
drop table t; |
| 23 |
set global innodb_compression_level = default; |