| 1 |
SET @orig_log_error_verbosity= @@GLOBAL.log_error_verbosity; |
| 2 |
SET GLOBAL log_error_verbosity=3; |
| 3 |
set global innodb_compression_level = 0; |
| 4 |
set debug = '+d,zlob_print_partial_update_hit'; |
| 5 |
CREATE TABLE z2 (q123 JSON) engine=innodb row_format=compressed; |
| 6 |
set @json_doc_1 = concat('["OpenSource", "', repeat('Linux+Ubuntu+', 16000), '"]'); |
| 7 |
set @json_doc_2 = concat('["OpenSource", "', repeat('MySQL+Oracle+', 16000), '"]'); |
| 8 |
set @data_1 = repeat('Linux+Ubuntu+', 16000); |
| 9 |
set @data_2 = repeat('MySQL+Oracle+', 16000); |
| 10 |
# Inserting... |
| 11 |
INSERT INTO z2 VALUES ( @json_doc_1 ); |
| 12 |
# Linux+Ubuntu |
| 13 |
select strcmp(q123, @json_doc_1) = 0 as f1 from z2; |
| 14 |
f1 |
| 15 |
1 |
| 16 |
select cast(q123 as char) = @json_doc_1 as f1 from z2; |
| 17 |
f1 |
| 18 |
1 |
| 19 |
select length(q123) from z2; |
| 20 |
length(q123) |
| 21 |
208018 |
| 22 |
select json_extract(q123, '$[1]') = @data_1 from z2; |
| 23 |
json_extract(q123, '$[1]') = @data_1 |
| 24 |
1 |
| 25 |
# Updating... |
| 26 |
UPDATE z2 SET q123 = JSON_SET(q123, '$[1]', repeat('MySQL+Oracle+', 16000)); |
| 27 |
# MySQL+Oracle |
| 28 |
select strcmp(q123, @json_doc_2) = 0 as f1 from z2; |
| 29 |
f1 |
| 30 |
1 |
| 31 |
select cast(q123 as char) = @json_doc_2 from z2; |
| 32 |
cast(q123 as char) = @json_doc_2 |
| 33 |
1 |
| 34 |
select length(q123) from z2; |
| 35 |
length(q123) |
| 36 |
208018 |
| 37 |
select json_extract(q123, '$[1]') = @data_2 from z2; |
| 38 |
json_extract(q123, '$[1]') = @data_2 |
| 39 |
1 |
| 40 |
Pattern "ZLOB partial update of field=\(q123\) on index=\(\`GEN_CLUST_INDEX\`\) in table=\(test/z2\)" found |
| 41 |
drop table z2; |
| 42 |
set debug = '-d,lob_print_partial_update_hit'; |
| 43 |
set global innodb_compression_level = default; |
| 44 |
SET GLOBAL log_error_verbosity= @orig_log_error_verbosity; |