Skip to content

Commit 4fe826d

Browse files
Merge pull request #175 from github/mhamza/backport-16255
sqlparser: Remove unneeded escaping (vitessio#16255)
2 parents aa56cad + 793357a commit 4fe826d

File tree

18 files changed

+255
-226
lines changed

18 files changed

+255
-226
lines changed

go/sqltypes/value.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,25 @@ var SQLEncodeMap [256]byte
861861
// SQLDecodeMap is the reverse of SQLEncodeMap
862862
var SQLDecodeMap [256]byte
863863

864+
// encodeRef is a map of characters we use for escaping.
865+
// This doesn't include double quotes since we don't need
866+
// to escape that, as we always generate single quoted strings.
864867
var encodeRef = map[byte]byte{
868+
'\x00': '0',
869+
'\'': '\'',
870+
'\b': 'b',
871+
'\n': 'n',
872+
'\r': 'r',
873+
'\t': 't',
874+
26: 'Z', // ctl-Z
875+
'\\': '\\',
876+
}
877+
878+
// decodeRef is a map of characters we use for unescaping.
879+
// We do need all characters here, since we do accept
880+
// escaped double quotes in single quote strings and
881+
// double quoted strings.
882+
var decodeRef = map[byte]byte{
865883
'\x00': '0',
866884
'\'': '\'',
867885
'"': '"',
@@ -931,6 +949,11 @@ func init() {
931949
for i := range SQLEncodeMap {
932950
if to, ok := encodeRef[byte(i)]; ok {
933951
SQLEncodeMap[byte(i)] = to
952+
}
953+
}
954+
955+
for i := range SQLDecodeMap {
956+
if to, ok := decodeRef[byte(i)]; ok {
934957
SQLDecodeMap[to] = byte(i)
935958
}
936959
}

go/sqltypes/value_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ func TestEncode(t *testing.T) {
380380
outASCII: "'Zm9v'",
381381
}, {
382382
in: TestValue(VarChar, "\x00'\"\b\n\r\t\x1A\\"),
383-
outSQL: "'\\0\\'\\\"\\b\\n\\r\\t\\Z\\\\'",
383+
outSQL: "'\\0\\'\"\\b\\n\\r\\t\\Z\\\\'",
384384
outASCII: "'ACciCAoNCRpc'",
385385
}, {
386386
in: TestValue(Bit, "a"),
@@ -442,7 +442,7 @@ func TestEncodeStringSQL(t *testing.T) {
442442
},
443443
{
444444
in: "\x00'\"\b\n\r\t\x1A\\",
445-
out: "'\\0\\'\\\"\\b\\n\\r\\t\\Z\\\\'",
445+
out: "'\\0\\'\"\\b\\n\\r\\t\\Z\\\\'",
446446
},
447447
}
448448
for _, tcase := range testcases {
@@ -632,7 +632,7 @@ func TestEncodeSQLStringBuilder(t *testing.T) {
632632
outSQL: "'foo'",
633633
}, {
634634
in: TestValue(VarChar, "\x00'\"\b\n\r\t\x1A\\"),
635-
outSQL: "'\\0\\'\\\"\\b\\n\\r\\t\\Z\\\\'",
635+
outSQL: "'\\0\\'\"\\b\\n\\r\\t\\Z\\\\'",
636636
}, {
637637
in: TestValue(Bit, "a"),
638638
outSQL: "b'01100001'",
@@ -663,7 +663,7 @@ func TestEncodeSQLBytes2(t *testing.T) {
663663
outSQL: "'foo'",
664664
}, {
665665
in: TestValue(VarChar, "\x00'\"\b\n\r\t\x1A\\"),
666-
outSQL: "'\\0\\'\\\"\\b\\n\\r\\t\\Z\\\\'",
666+
outSQL: "'\\0\\'\"\\b\\n\\r\\t\\Z\\\\'",
667667
}, {
668668
in: TestValue(Bit, "a"),
669669
outSQL: "b'01100001'",

go/vt/binlog/binlogplayer/binlog_player_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ func applyEvents(blp *BinlogPlayer) func() error {
382382
func TestCreateVReplicationKeyRange(t *testing.T) {
383383
want := "insert into _vt.vreplication " +
384384
"(workflow, source, pos, max_tps, max_replication_lag, time_updated, transaction_timestamp, state, db_name, workflow_type, workflow_sub_type, defer_secondary_keys, options) " +
385-
`values ('Resharding', 'keyspace:\"ks\" shard:\"0\" key_range:{end:\"\\x80\"}', 'MariaDB/0-1-1083', 9223372036854775807, 9223372036854775807, 481823, 0, 'Running', 'db', 0, 0, false, '{}')`
385+
`values ('Resharding', 'keyspace:"ks" shard:"0" key_range:{end:"\\x80"}', 'MariaDB/0-1-1083', 9223372036854775807, 9223372036854775807, 481823, 0, 'Running', 'db', 0, 0, false, '{}')`
386386

387387
bls := binlogdatapb.BinlogSource{
388388
Keyspace: "ks",
@@ -401,7 +401,7 @@ func TestCreateVReplicationKeyRange(t *testing.T) {
401401
func TestCreateVReplicationTables(t *testing.T) {
402402
want := "insert into _vt.vreplication " +
403403
"(workflow, source, pos, max_tps, max_replication_lag, time_updated, transaction_timestamp, state, db_name, workflow_type, workflow_sub_type, defer_secondary_keys, options) " +
404-
`values ('Resharding', 'keyspace:\"ks\" shard:\"0\" tables:\"a\" tables:\"b\"', 'MariaDB/0-1-1083', 9223372036854775807, 9223372036854775807, 481823, 0, 'Running', 'db', 0, 0, false, '{}')`
404+
`values ('Resharding', 'keyspace:"ks" shard:"0" tables:"a" tables:"b"', 'MariaDB/0-1-1083', 9223372036854775807, 9223372036854775807, 481823, 0, 'Running', 'db', 0, 0, false, '{}')`
405405

406406
bls := binlogdatapb.BinlogSource{
407407
Keyspace: "ks",

go/vt/sqlparser/ast_format.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,9 @@ func (idx *IndexDefinition) Format(buf *TrackedBuffer) {
839839
buf.astPrintf(idx, ")")
840840

841841
for _, opt := range idx.Options {
842-
buf.astPrintf(idx, " %s", opt.Name)
842+
if opt.Name != "" {
843+
buf.astPrintf(idx, " %s", opt.Name)
844+
}
843845
if opt.String != "" {
844846
buf.astPrintf(idx, " %#s", opt.String)
845847
} else if opt.Value != nil {

go/vt/sqlparser/parse_test.go

Lines changed: 88 additions & 82 deletions
Large diffs are not rendered by default.

go/vt/sqlparser/parsed_query_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func TestGenerateQuery(t *testing.T) {
8989
"v1": sqltypes.ValueBindVariable(sqltypes.MakeTrusted(querypb.Type_JSON, []byte(`{"key": "value"}`))),
9090
"v2": sqltypes.ValueBindVariable(sqltypes.MakeTrusted(querypb.Type_RAW, []byte(`json_object("k", "v")`))),
9191
},
92-
output: `insert into t values ('{\"key\": \"value\"}', json_object("k", "v"))`,
92+
output: `insert into t values ('{"key": "value"}', json_object("k", "v"))`,
9393
}, {
9494
desc: "list bind vars 0 arguments",
9595
query: "select * from a where id in ::vals",

go/vt/sqlparser/testdata/select_cases.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4286,7 +4286,7 @@ INPUT
42864286
select * from t1 where MATCH a,b AGAINST ('"xt indexes"' IN BOOLEAN MODE);
42874287
END
42884288
OUTPUT
4289-
select * from t1 where match(a, b) against ('\"xt indexes\"' in boolean mode)
4289+
select * from t1 where match(a, b) against ('"xt indexes"' in boolean mode)
42904290
END
42914291
INPUT
42924292
select max(value) from t1 AS m LEFT JOIN t2 AS c1 ON m.c1id = c1.id AND c1.active = 'Yes' LEFT JOIN t3 AS c2 ON m.c2id = c2.id AND c2.active = 'Yes' WHERE m.pid=1 AND (c1.id IS NOT NULL OR c2.id IS NOT NULL);
@@ -5660,7 +5660,7 @@ INPUT
56605660
select * from t1 where MATCH a,b AGAINST ('"text search" "now support"' IN BOOLEAN MODE);
56615661
END
56625662
OUTPUT
5663-
select * from t1 where match(a, b) against ('\"text search\" \"now support\"' in boolean mode)
5663+
select * from t1 where match(a, b) against ('"text search" "now support"' in boolean mode)
56645664
END
56655665
INPUT
56665666
select insert('hello', 1, -18446744073709551616, 'hi');
@@ -8048,7 +8048,7 @@ INPUT
80488048
select * from t1 where MATCH a,b AGAINST ('"text i"' IN BOOLEAN MODE);
80498049
END
80508050
OUTPUT
8051-
select * from t1 where match(a, b) against ('\"text i\"' in boolean mode)
8051+
select * from t1 where match(a, b) against ('"text i"' in boolean mode)
80528052
END
80538053
INPUT
80548054
select column_name,data_type,CHARACTER_OCTET_LENGTH, CHARACTER_MAXIMUM_LENGTH from information_schema.columns where table_name='t1' order by column_name;
@@ -8144,7 +8144,7 @@ INPUT
81448144
select * from t1 where MATCH a,b AGAINST ('"support now"' IN BOOLEAN MODE);
81458145
END
81468146
OUTPUT
8147-
select * from t1 where match(a, b) against ('\"support now\"' in boolean mode)
8147+
select * from t1 where match(a, b) against ('"support now"' in boolean mode)
81488148
END
81498149
INPUT
81508150
select hex(inet_aton('127.1.1'));
@@ -12212,7 +12212,7 @@ INPUT
1221212212
select * from t1 where MATCH a,b AGAINST ('"text search" +"now support"' IN BOOLEAN MODE);
1221312213
END
1221412214
OUTPUT
12215-
select * from t1 where match(a, b) against ('\"text search\" +\"now support\"' in boolean mode)
12215+
select * from t1 where match(a, b) against ('"text search" +"now support"' in boolean mode)
1221612216
END
1221712217
INPUT
1221812218
select trigger_name from information_schema.triggers where event_object_table='t1';
@@ -14750,7 +14750,7 @@ INPUT
1475014750
select * from t1 where MATCH a,b AGAINST('"space model' IN BOOLEAN MODE);
1475114751
END
1475214752
OUTPUT
14753-
select * from t1 where match(a, b) against ('\"space model' in boolean mode)
14753+
select * from t1 where match(a, b) against ('"space model' in boolean mode)
1475414754
END
1475514755
INPUT
1475614756
select @ujis4 = CONVERT(@utf84 USING ujis);
@@ -14906,7 +14906,7 @@ INPUT
1490614906
select * from t1 where MATCH a,b AGAINST ('"text search" -"now support"' IN BOOLEAN MODE);
1490714907
END
1490814908
OUTPUT
14909-
select * from t1 where match(a, b) against ('\"text search\" -\"now support\"' in boolean mode)
14909+
select * from t1 where match(a, b) against ('"text search" -"now support"' in boolean mode)
1491014910
END
1491114911
INPUT
1491214912
select _rowid,t1._rowid,skey,sval from t1;
@@ -17612,7 +17612,7 @@ INPUT
1761217612
select 'aaa','aa''a',"aa""a";
1761317613
END
1761417614
OUTPUT
17615-
select 'aaa', 'aa\'a', 'aa\"a' from dual
17615+
select 'aaa', 'aa\'a', 'aa"a' from dual
1761617616
END
1761717617
INPUT
1761817618
select cast('18446744073709551615' as signed);
@@ -18542,7 +18542,7 @@ INPUT
1854218542
select * from t1 where MATCH a,b AGAINST ('"now support"' IN BOOLEAN MODE);
1854318543
END
1854418544
OUTPUT
18545-
select * from t1 where match(a, b) against ('\"now support\"' in boolean mode)
18545+
select * from t1 where match(a, b) against ('"now support"' in boolean mode)
1854618546
END
1854718547
INPUT
1854818548
select date_add("1997-12-31 23:59:59",INTERVAL "10000:99:99" HOUR_SECOND);
@@ -22148,7 +22148,7 @@ INPUT
2214822148
select * from t1 where MATCH a,b AGAINST ('"Now sUPPort"' IN BOOLEAN MODE);
2214922149
END
2215022150
OUTPUT
22151-
select * from t1 where match(a, b) against ('\"Now sUPPort\"' in boolean mode)
22151+
select * from t1 where match(a, b) against ('"Now sUPPort"' in boolean mode)
2215222152
END
2215322153
INPUT
2215422154
select sum(all a),count(all a),avg(all a),std(all a),variance(all a),bit_or(all a),bit_and(all a),min(all a),max(all a),min(all c),max(all c) from t1;

go/vt/vtctl/workflow/resharder_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func TestReshardCreate(t *testing.T) {
158158
env.tmc.expectVRQuery(
159159
tabletUID,
160160
insertPrefix+
161-
`\('`+workflowName+`', 'keyspace:\\"`+targetKeyspaceName+`\\" shard:\\"0\\" filter:{rules:{match:\\"/.*\\" filter:\\"`+target+`\\"}}', '', [0-9]*, [0-9]*, '`+
161+
`\('`+workflowName+`', 'keyspace:"`+targetKeyspaceName+`" shard:"0" filter:{rules:{match:"/.*" filter:"`+target+`"}}', '', [0-9]*, [0-9]*, '`+
162162
env.cell+`', '`+tabletTypesStr+`', [0-9]*, 0, 'Stopped', 'vt_`+targetKeyspaceName+`', 4, 0, false, '{}'\)`+eol,
163163
&sqltypes.Result{},
164164
)

go/vt/vtgate/planbuilder/testdata/select_cases.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3163,8 +3163,8 @@
31633163
"Name": "main",
31643164
"Sharded": false
31653165
},
3166-
"FieldQuery": "select json_quote('null'), json_quote('\\\"null\\\"'), json_object(BIN(1), 2, 'abc', ASCII(4)), json_array(1, 'abc', null, true, curtime()) from dual where 1 != 1",
3167-
"Query": "select json_quote('null'), json_quote('\\\"null\\\"'), json_object(BIN(1), 2, 'abc', ASCII(4)), json_array(1, 'abc', null, true, curtime()) from dual",
3166+
"FieldQuery": "select json_quote('null'), json_quote('\"null\"'), json_object(BIN(1), 2, 'abc', ASCII(4)), json_array(1, 'abc', null, true, curtime()) from dual where 1 != 1",
3167+
"Query": "select json_quote('null'), json_quote('\"null\"'), json_object(BIN(1), 2, 'abc', ASCII(4)), json_array(1, 'abc', null, true, curtime()) from dual",
31683168
"Table": "dual"
31693169
},
31703170
"TablesUsed": [
@@ -3264,8 +3264,8 @@
32643264
"Name": "main",
32653265
"Sharded": false
32663266
},
3267-
"FieldQuery": "select json_schema_valid('{\\\"type\\\":\\\"string\\\",\\\"pattern\\\":\\\"(\\\"}', '\\\"abc\\\"'), json_schema_validation_report('{\\\"type\\\":\\\"string\\\",\\\"pattern\\\":\\\"(\\\"}', '\\\"abc\\\"') from dual where 1 != 1",
3268-
"Query": "select json_schema_valid('{\\\"type\\\":\\\"string\\\",\\\"pattern\\\":\\\"(\\\"}', '\\\"abc\\\"'), json_schema_validation_report('{\\\"type\\\":\\\"string\\\",\\\"pattern\\\":\\\"(\\\"}', '\\\"abc\\\"') from dual",
3267+
"FieldQuery": "select json_schema_valid('{\"type\":\"string\",\"pattern\":\"(\"}', '\"abc\"'), json_schema_validation_report('{\"type\":\"string\",\"pattern\":\"(\"}', '\"abc\"') from dual where 1 != 1",
3268+
"Query": "select json_schema_valid('{\"type\":\"string\",\"pattern\":\"(\"}', '\"abc\"'), json_schema_validation_report('{\"type\":\"string\",\"pattern\":\"(\"}', '\"abc\"') from dual",
32693269
"Table": "dual"
32703270
},
32713271
"TablesUsed": [
@@ -3286,8 +3286,8 @@
32863286
"Name": "main",
32873287
"Sharded": false
32883288
},
3289-
"FieldQuery": "select json_contains('{\\\"a\\\": 1, \\\"b\\\": 2, \\\"c\\\": {\\\"d\\\": 4}}', '1'), json_contains_path('{\\\"a\\\": 1, \\\"b\\\": 2, \\\"c\\\": {\\\"d\\\": 4}}', 'one', '$.a', '$.e'), json_extract('[10, 20, [30, 40]]', '$[1]'), json_unquote(json_extract('[\\\"a\\\",\\\"b\\\"]', '$[1]')), json_keys('{\\\"a\\\": 1, \\\"b\\\": {\\\"c\\\": 30}}'), json_overlaps('[1,3,5,7]', '[2,5,7]'), json_search('[\\\"abc\\\"]', 'one', 'abc'), json_value('{\\\"fname\\\": \\\"Joe\\\", \\\"lname\\\": \\\"Palmer\\\"}', '$.fname'), json_array(4, 5) member of ('[[3,4],[4,5]]') from dual where 1 != 1",
3290-
"Query": "select json_contains('{\\\"a\\\": 1, \\\"b\\\": 2, \\\"c\\\": {\\\"d\\\": 4}}', '1'), json_contains_path('{\\\"a\\\": 1, \\\"b\\\": 2, \\\"c\\\": {\\\"d\\\": 4}}', 'one', '$.a', '$.e'), json_extract('[10, 20, [30, 40]]', '$[1]'), json_unquote(json_extract('[\\\"a\\\",\\\"b\\\"]', '$[1]')), json_keys('{\\\"a\\\": 1, \\\"b\\\": {\\\"c\\\": 30}}'), json_overlaps('[1,3,5,7]', '[2,5,7]'), json_search('[\\\"abc\\\"]', 'one', 'abc'), json_value('{\\\"fname\\\": \\\"Joe\\\", \\\"lname\\\": \\\"Palmer\\\"}', '$.fname'), json_array(4, 5) member of ('[[3,4],[4,5]]') from dual",
3289+
"FieldQuery": "select json_contains('{\"a\": 1, \"b\": 2, \"c\": {\"d\": 4}}', '1'), json_contains_path('{\"a\": 1, \"b\": 2, \"c\": {\"d\": 4}}', 'one', '$.a', '$.e'), json_extract('[10, 20, [30, 40]]', '$[1]'), json_unquote(json_extract('[\"a\",\"b\"]', '$[1]')), json_keys('{\"a\": 1, \"b\": {\"c\": 30}}'), json_overlaps('[1,3,5,7]', '[2,5,7]'), json_search('[\"abc\"]', 'one', 'abc'), json_value('{\"fname\": \"Joe\", \"lname\": \"Palmer\"}', '$.fname'), json_array(4, 5) member of ('[[3,4],[4,5]]') from dual where 1 != 1",
3290+
"Query": "select json_contains('{\"a\": 1, \"b\": 2, \"c\": {\"d\": 4}}', '1'), json_contains_path('{\"a\": 1, \"b\": 2, \"c\": {\"d\": 4}}', 'one', '$.a', '$.e'), json_extract('[10, 20, [30, 40]]', '$[1]'), json_unquote(json_extract('[\"a\",\"b\"]', '$[1]')), json_keys('{\"a\": 1, \"b\": {\"c\": 30}}'), json_overlaps('[1,3,5,7]', '[2,5,7]'), json_search('[\"abc\"]', 'one', 'abc'), json_value('{\"fname\": \"Joe\", \"lname\": \"Palmer\"}', '$.fname'), json_array(4, 5) member of ('[[3,4],[4,5]]') from dual",
32913291
"Table": "dual"
32923292
},
32933293
"TablesUsed": [
@@ -3352,8 +3352,8 @@
33523352
"Name": "main",
33533353
"Sharded": false
33543354
},
3355-
"FieldQuery": "select json_depth('{}'), json_length('{\\\"a\\\": 1, \\\"b\\\": {\\\"c\\\": 30}}', '$.b'), json_type(json_extract('{\\\"a\\\": [10, true]}', '$.a')), json_valid('{\\\"a\\\": 1}') from dual where 1 != 1",
3356-
"Query": "select json_depth('{}'), json_length('{\\\"a\\\": 1, \\\"b\\\": {\\\"c\\\": 30}}', '$.b'), json_type(json_extract('{\\\"a\\\": [10, true]}', '$.a')), json_valid('{\\\"a\\\": 1}') from dual",
3355+
"FieldQuery": "select json_depth('{}'), json_length('{\"a\": 1, \"b\": {\"c\": 30}}', '$.b'), json_type(json_extract('{\"a\": [10, true]}', '$.a')), json_valid('{\"a\": 1}') from dual where 1 != 1",
3356+
"Query": "select json_depth('{}'), json_length('{\"a\": 1, \"b\": {\"c\": 30}}', '$.b'), json_type(json_extract('{\"a\": [10, true]}', '$.a')), json_valid('{\"a\": 1}') from dual",
33573357
"Table": "dual"
33583358
},
33593359
"TablesUsed": [
@@ -3374,8 +3374,8 @@
33743374
"Name": "main",
33753375
"Sharded": false
33763376
},
3377-
"FieldQuery": "select json_array_append('{\\\"a\\\": 1}', '$', 'z'), json_array_insert('[\\\"a\\\", {\\\"b\\\": [1, 2]}, [3, 4]]', '$[0]', 'x', '$[2][1]', 'y'), json_insert('{ \\\"a\\\": 1, \\\"b\\\": [2, 3]}', '$.a', 10, '$.c', cast('[true, false]' as JSON)) from dual where 1 != 1",
3378-
"Query": "select json_array_append('{\\\"a\\\": 1}', '$', 'z'), json_array_insert('[\\\"a\\\", {\\\"b\\\": [1, 2]}, [3, 4]]', '$[0]', 'x', '$[2][1]', 'y'), json_insert('{ \\\"a\\\": 1, \\\"b\\\": [2, 3]}', '$.a', 10, '$.c', cast('[true, false]' as JSON)) from dual",
3377+
"FieldQuery": "select json_array_append('{\"a\": 1}', '$', 'z'), json_array_insert('[\"a\", {\"b\": [1, 2]}, [3, 4]]', '$[0]', 'x', '$[2][1]', 'y'), json_insert('{ \"a\": 1, \"b\": [2, 3]}', '$.a', 10, '$.c', cast('[true, false]' as JSON)) from dual where 1 != 1",
3378+
"Query": "select json_array_append('{\"a\": 1}', '$', 'z'), json_array_insert('[\"a\", {\"b\": [1, 2]}, [3, 4]]', '$[0]', 'x', '$[2][1]', 'y'), json_insert('{ \"a\": 1, \"b\": [2, 3]}', '$.a', 10, '$.c', cast('[true, false]' as JSON)) from dual",
33793379
"Table": "dual"
33803380
},
33813381
"TablesUsed": [
@@ -3396,8 +3396,8 @@
33963396
"Name": "main",
33973397
"Sharded": false
33983398
},
3399-
"FieldQuery": "select json_merge('[1, 2]', '[true, false]'), json_merge_patch('{\\\"name\\\": \\\"x\\\"}', '{\\\"id\\\": 47}'), json_merge_preserve('[1, 2]', '{\\\"id\\\": 47}') from dual where 1 != 1",
3400-
"Query": "select json_merge('[1, 2]', '[true, false]'), json_merge_patch('{\\\"name\\\": \\\"x\\\"}', '{\\\"id\\\": 47}'), json_merge_preserve('[1, 2]', '{\\\"id\\\": 47}') from dual",
3399+
"FieldQuery": "select json_merge('[1, 2]', '[true, false]'), json_merge_patch('{\"name\": \"x\"}', '{\"id\": 47}'), json_merge_preserve('[1, 2]', '{\"id\": 47}') from dual where 1 != 1",
3400+
"Query": "select json_merge('[1, 2]', '[true, false]'), json_merge_patch('{\"name\": \"x\"}', '{\"id\": 47}'), json_merge_preserve('[1, 2]', '{\"id\": 47}') from dual",
34013401
"Table": "dual"
34023402
},
34033403
"TablesUsed": [
@@ -3418,8 +3418,8 @@
34183418
"Name": "main",
34193419
"Sharded": false
34203420
},
3421-
"FieldQuery": "select json_remove('[1, [2, 3], 4]', '$[1]'), json_replace('{ \\\"a\\\": 1, \\\"b\\\": [2, 3]}', '$.a', 10, '$.c', '[true, false]'), json_set('{ \\\"a\\\": 1, \\\"b\\\": [2, 3]}', '$.a', 10, '$.c', '[true, false]'), json_unquote('\\\"abc\\\"') from dual where 1 != 1",
3422-
"Query": "select json_remove('[1, [2, 3], 4]', '$[1]'), json_replace('{ \\\"a\\\": 1, \\\"b\\\": [2, 3]}', '$.a', 10, '$.c', '[true, false]'), json_set('{ \\\"a\\\": 1, \\\"b\\\": [2, 3]}', '$.a', 10, '$.c', '[true, false]'), json_unquote('\\\"abc\\\"') from dual",
3421+
"FieldQuery": "select json_remove('[1, [2, 3], 4]', '$[1]'), json_replace('{ \"a\": 1, \"b\": [2, 3]}', '$.a', 10, '$.c', '[true, false]'), json_set('{ \"a\": 1, \"b\": [2, 3]}', '$.a', 10, '$.c', '[true, false]'), json_unquote('\"abc\"') from dual where 1 != 1",
3422+
"Query": "select json_remove('[1, [2, 3], 4]', '$[1]'), json_replace('{ \"a\": 1, \"b\": [2, 3]}', '$.a', 10, '$.c', '[true, false]'), json_set('{ \"a\": 1, \"b\": [2, 3]}', '$.a', 10, '$.c', '[true, false]'), json_unquote('\"abc\"') from dual",
34233423
"Table": "dual"
34243424
},
34253425
"TablesUsed": [

0 commit comments

Comments
 (0)