Debian Codegraph @

mysql-test/suite/innodb/r/virtual_uncommitted.result

raw
1 #
2 # Bug #26625652: SIG=11 ROW_SEL_SEC_REC_IS_FOR_CLUST_REC ROW_SEARCH_MVCC
3 #
4 # Connection default:
5 SET @page_size = @@innodb_page_size;
6 SET @page_count = 4;
7 SET @initial_isolation = @@SESSION.transaction_isolation;
8 SET DEBUG_SYNC='reset';
9 # Connection con1:
10 SET SESSION transaction_isolation = 'READ-UNCOMMITTED';
11 SELECT @@SESSION.transaction_isolation;
12 @@SESSION.transaction_isolation
13 READ-UNCOMMITTED
14 # Connection default:
15 SET SESSION transaction_isolation = 'READ-UNCOMMITTED';
16 SELECT @@SESSION.transaction_isolation;
17 @@SESSION.transaction_isolation
18 READ-UNCOMMITTED
19 CREATE TABLE t (
20 a INT,
21 c VARCHAR(100),
22 j JSON,
23 vj varchar(100) as (json_unquote(j->'$.hash')) virtual,
24 INDEX idx_a(a),
25 INDEX idx_c(c),
26 INDEX idx_vj(vj)
27 ) ROW_FORMAT=COMPACT;
28 set @json_data_a = repeat('a', @page_size * @page_count);
29 set @json_data_b = repeat('b', @page_size * @page_count);
30 set @json_data_c = repeat('c', @page_size * @page_count);
31 INSERT INTO t VALUES
32 (1, 'aaaa123xx', CONCAT('{ "hash": "the_hash_a", "data": "', @json_data_a, '" }'), DEFAULT),
33 (2, 'aaaa1234x', CONCAT('{ "hash": "the_hash_b", "data": "', @json_data_b, '" }'), DEFAULT),
34 (3, 'aaaa12345', CONCAT('{ "hash": "the_hash_c", "data": "', @json_data_c, '" }'), DEFAULT);
35 # Connection con1:
36 SET DEBUG_SYNC='blob_write_middle_after_check SIGNAL s1 WAIT_FOR s2 EXECUTE 2';
37 BEGIN;
38 # Sending:
39 UPDATE t SET j=json_set(j,'$.hash','"the_hash_x"') WHERE a=2;
40 # Connection default:
41 SET DEBUG_SYNC='now WAIT_FOR s1';
42 SET DEBUG_SYNC='now SIGNAL s2 WAIT_FOR s1';
43 SELECT json_extract(j, "$.data") = @json_data_a FROM t WHERE vj LIKE 'the_hash_a';
44 json_extract(j, "$.data") = @json_data_a
45 1
46 SELECT json_extract(j, "$.data") = @json_data_b FROM t WHERE vj LIKE 'the_hash_b';
47 json_extract(j, "$.data") = @json_data_b
48 SELECT json_extract(j, "$.data") = @json_data_c FROM t WHERE vj LIKE 'the_hash_c';
49 json_extract(j, "$.data") = @json_data_c
50 1
51 SET DEBUG_SYNC='now SIGNAL s2';
52 # Connection con1:
53 ROLLBACK;
54 # Connection con1:
55 SET DEBUG_SYNC='blob_write_middle_after_check SIGNAL s1 WAIT_FOR s2 EXECUTE 2';
56 BEGIN;
57 # Sending:
58 UPDATE t SET j=json_set(j,'$.hash','"the_hash_x"') WHERE a=2;
59 # Connection default:
60 SET DEBUG_SYNC='now WAIT_FOR s1';
61 SET DEBUG_SYNC='now SIGNAL s2 WAIT_FOR s1';
62 SELECT vj FROM t WHERE c LIKE 'aaaa1234%';
63 vj
64 NULL
65 the_hash_c
66 SET DEBUG_SYNC='now SIGNAL s2';
67 # Connection con1:
68 ROLLBACK;
69 # Connection default:
70 DROP TABLE t;
71 SET DEBUG_SYNC='reset';
72 SET SESSION transaction_isolation = @initial_isolation;