| 1 |
--source include/have_debug.inc |
| 2 |
--source include/count_sessions.inc |
| 3 |
--source include/have_innodb_max_16k.inc |
| 4 |
|
| 5 |
SET @orig_log_error_verbosity= @@GLOBAL.log_error_verbosity; |
| 6 |
SET GLOBAL log_error_verbosity=3; |
| 7 |
set global innodb_compression_level = 0; |
| 8 |
CREATE TABLE tab82 (col28 JSON) row_format=compressed; |
| 9 |
|
| 10 |
set @json_doc_1 = concat('["OpenSource", "', repeat('Linux+Ubuntu+', 16000), '"]'); |
| 11 |
set @json_doc_2 = concat('["OpenSource", "', repeat('MySQL+Oracle+', 16000), '"]'); |
| 12 |
set @data_1 = repeat('Linux+Ubuntu+', 16000); |
| 13 |
set @data_2 = repeat('MySQL+Oracle+', 16000); |
| 14 |
|
| 15 |
INSERT INTO tab82 VALUES (@json_doc_1); |
| 16 |
|
| 17 |
--echo # Connection default: |
| 18 |
--echo # Linux+Ubuntu |
| 19 |
start transaction with consistent snapshot; |
| 20 |
select strcmp(col28, @json_doc_1) = 0 from tab82; |
| 21 |
select cast(col28 as char) = @json_doc_1 from tab82; |
| 22 |
select length(col28) from tab82; |
| 23 |
select json_extract(col28, '$[1]') = @data_1 from tab82; |
| 24 |
|
| 25 |
--echo # Connection con1: |
| 26 |
connect (con1,localhost,root,,); |
| 27 |
connection con1; |
| 28 |
set @json_doc_1 = concat('["OpenSource", "', repeat('Linux+Ubuntu+', 16000), '"]'); |
| 29 |
set @json_doc_2 = concat('["OpenSource", "', repeat('MySQL+Oracle+', 16000), '"]'); |
| 30 |
set @data_1 = repeat('Linux+Ubuntu+', 16000); |
| 31 |
set @data_2 = repeat('MySQL+Oracle+', 16000); |
| 32 |
set debug = '+d,zlob_print_partial_update_hit'; |
| 33 |
start transaction; |
| 34 |
UPDATE tab82 SET col28 = JSON_SET(col28, '$[1]', @data_2); |
| 35 |
|
| 36 |
--echo # MySQL+Oracle |
| 37 |
select strcmp(col28, @json_doc_2) = 0 from tab82; |
| 38 |
select cast(col28 as char) = @json_doc_2 from tab82; |
| 39 |
select length(col28) from tab82; |
| 40 |
select json_extract(col28, '$[1]') = @data_2 from tab82; |
| 41 |
|
| 42 |
--echo # Connection default: |
| 43 |
connection default; |
| 44 |
|
| 45 |
--echo # Linux+Ubuntu |
| 46 |
select strcmp(col28, @json_doc_1) = 0 from tab82; |
| 47 |
select cast(col28 as char) = @json_doc_1 from tab82; |
| 48 |
select length(col28) from tab82; |
| 49 |
select json_extract(col28, '$[1]') = @data_1 from tab82; |
| 50 |
|
| 51 |
--echo # Connection con1: |
| 52 |
connection con1; |
| 53 |
--echo # MySQL+Oracle |
| 54 |
select strcmp(col28, @json_doc_2) = 0 from tab82; |
| 55 |
select cast(col28 as char) = @json_doc_2 from tab82; |
| 56 |
select length(col28) from tab82; |
| 57 |
select json_extract(col28, '$[1]') = @data_2 from tab82; |
| 58 |
commit; |
| 59 |
|
| 60 |
--echo # Connection default: |
| 61 |
connection default; |
| 62 |
|
| 63 |
disconnect con1; |
| 64 |
|
| 65 |
--echo # Linux+Ubuntu |
| 66 |
select strcmp(col28, @json_doc_1) = 0 from tab82; |
| 67 |
select cast(col28 as char) = @json_doc_1 from tab82; |
| 68 |
select length(col28) from tab82; |
| 69 |
select json_extract(col28, '$[1]') = @data_1 from tab82; |
| 70 |
|
| 71 |
commit; |
| 72 |
|
| 73 |
--echo # MySQL+Oracle |
| 74 |
select strcmp(col28, @json_doc_2) = 0 from tab82; |
| 75 |
select cast(col28 as char) = @json_doc_2 from tab82; |
| 76 |
select length(col28) from tab82; |
| 77 |
select json_extract(col28, '$[1]') = @data_2 from tab82; |
| 78 |
|
| 79 |
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 80 |
let SEARCH_PATTERN= ZLOB partial update of field=\\(col28\\) on index=\\(\\`GEN_CLUST_INDEX\\`\\) in table=\\(test/tab82\\); |
| 81 |
--source include/search_pattern.inc |
| 82 |
|
| 83 |
drop table tab82; |
| 84 |
set debug = '-d,zlob_print_partial_update_hit'; |
| 85 |
set global innodb_compression_level = default; |
| 86 |
SET GLOBAL log_error_verbosity= @orig_log_error_verbosity; |