File: virtual_uncommitted.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (72 lines) | stat: -rw-r--r-- 2,459 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#
# Bug #26625652: SIG=11 ROW_SEL_SEC_REC_IS_FOR_CLUST_REC ROW_SEARCH_MVCC
#
# Connection default:
SET @page_size = @@innodb_page_size;
SET @page_count = 4;
SET @initial_isolation = @@SESSION.transaction_isolation;
SET DEBUG_SYNC='reset';
# Connection con1:
SET SESSION transaction_isolation = 'READ-UNCOMMITTED';
SELECT @@SESSION.transaction_isolation;
@@SESSION.transaction_isolation
READ-UNCOMMITTED
# Connection default:
SET SESSION transaction_isolation = 'READ-UNCOMMITTED';
SELECT @@SESSION.transaction_isolation;
@@SESSION.transaction_isolation
READ-UNCOMMITTED
CREATE TABLE t (
a INT,
c VARCHAR(100),
j JSON,
vj varchar(100) as (json_unquote(j->'$.hash')) virtual,
INDEX idx_a(a),
INDEX idx_c(c),
INDEX idx_vj(vj)
) ROW_FORMAT=COMPACT;
set @json_data_a = repeat('a', @page_size * @page_count);
set @json_data_b = repeat('b', @page_size * @page_count);
set @json_data_c = repeat('c', @page_size * @page_count);
INSERT INTO t VALUES
(1, 'aaaa123xx', CONCAT('{ "hash": "the_hash_a", "data": "', @json_data_a, '" }'), DEFAULT),
(2, 'aaaa1234x', CONCAT('{ "hash": "the_hash_b", "data": "', @json_data_b, '" }'), DEFAULT),
(3, 'aaaa12345', CONCAT('{ "hash": "the_hash_c", "data": "', @json_data_c, '" }'), DEFAULT);
# Connection con1:
SET DEBUG_SYNC='blob_write_middle_after_check SIGNAL s1 WAIT_FOR s2 EXECUTE 2';
BEGIN;
# Sending:
UPDATE t SET j=json_set(j,'$.hash','"the_hash_x"') WHERE a=2;
# Connection default:
SET DEBUG_SYNC='now WAIT_FOR s1';
SET DEBUG_SYNC='now SIGNAL s2 WAIT_FOR s1';
SELECT json_extract(j, "$.data")  = @json_data_a FROM t WHERE vj LIKE 'the_hash_a';
json_extract(j, "$.data")  = @json_data_a
1
SELECT json_extract(j, "$.data")  = @json_data_b FROM t WHERE vj LIKE 'the_hash_b';
json_extract(j, "$.data")  = @json_data_b
SELECT json_extract(j, "$.data")  = @json_data_c FROM t WHERE vj LIKE 'the_hash_c';
json_extract(j, "$.data")  = @json_data_c
1
SET DEBUG_SYNC='now SIGNAL s2';
# Connection con1:
ROLLBACK;
# Connection con1:
SET DEBUG_SYNC='blob_write_middle_after_check SIGNAL s1 WAIT_FOR s2 EXECUTE 2';
BEGIN;
# Sending:
UPDATE t SET j=json_set(j,'$.hash','"the_hash_x"') WHERE a=2;
# Connection default:
SET DEBUG_SYNC='now WAIT_FOR s1';
SET DEBUG_SYNC='now SIGNAL s2 WAIT_FOR s1';
SELECT vj FROM t WHERE c LIKE 'aaaa1234%';
vj
NULL
the_hash_c
SET DEBUG_SYNC='now SIGNAL s2';
# Connection con1:
ROLLBACK;
# Connection default:
DROP TABLE t;
SET DEBUG_SYNC='reset';
SET SESSION transaction_isolation = @initial_isolation;