Debian Codegraph @

mysql-test/suite/innodb/t/zlob_long_partial_update.test

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