1SET @orig_log_error_verbosity= @@GLOBAL.log_error_verbosity;
2SET GLOBAL log_error_verbosity=3;
3CREATE TABLE t(f1 int, j1 JSON);
4# Sven
5select f1, json_extract(j1, '$[0]') from t;
6f1	json_extract(j1, '$[0]')
71	"Sven"
8start transaction;
9UPDATE t SET f1 = 2, j1 = JSON_SET(j1, '$[0]', 'Knut');
10# Knut
11select f1, json_extract(j1, '$[0]') from t;
12f1	json_extract(j1, '$[0]')
132	"Knut"
14rollback;
15# Sven
16select f1, json_extract(j1, '$[0]') from t;
17f1	json_extract(j1, '$[0]')
181	"Sven"
19drop table t;
20CREATE TABLE t(f1 int, j1 JSON) row_format=compact;
21# Sven
22select f1, json_extract(j1, '$[0]') from t;
23f1	json_extract(j1, '$[0]')
241	"Sven"
25start transaction;
26UPDATE t SET f1 = 2, j1 = JSON_SET(j1, '$[0]', 'Knut');
27# Knut
28select f1, json_extract(j1, '$[0]') from t;
29f1	json_extract(j1, '$[0]')
302	"Knut"
31rollback;
32# Sven
33select f1, json_extract(j1, '$[0]') from t;
34f1	json_extract(j1, '$[0]')
351	"Sven"
36drop table t;
37CREATE TABLE t(f1 int, j1 JSON) row_format=redundant;
38# Sven
39select f1, json_extract(j1, '$[0]') from t;
40f1	json_extract(j1, '$[0]')
411	"Sven"
42start transaction;
43UPDATE t SET f1 = 2, j1 = JSON_SET(j1, '$[0]', 'Knut');
44# Knut
45select f1, json_extract(j1, '$[0]') from t;
46f1	json_extract(j1, '$[0]')
472	"Knut"
48rollback;
49# Sven
50select f1, json_extract(j1, '$[0]') from t;
51f1	json_extract(j1, '$[0]')
521	"Sven"
53drop table t;
54SET GLOBAL log_error_verbosity= @orig_log_error_verbosity;
55