Skip to content
/ server Public

Commit 9b393c7

Browse files
committed
MDEV-38057 main.func_json test fails in sandbox interface with lo device only
don't use `from mysql.user`
1 parent 12e93b9 commit 9b393c7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

mysql-test/main/func_json.result

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5356,9 +5356,10 @@ SET CHARACTER SET default;
53565356
SELECT json_array_intersect(@a,@b);
53575357
json_array_intersect(@a,@b)
53585358
NULL
5359+
#
53595360
# MDEV-36809: json_array_intersect crashs when unused table ref provided
53605361
#
5361-
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from mysql.user;
5362+
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from (values (1),(2),(3),(4),(5)) x;
53625363
result
53635364
[["2", "6"], ["3", "8"], ["4", "5"], ["1", "7"]]
53645365
[["2", "6"], ["3", "8"], ["4", "5"], ["1", "7"]]
@@ -5371,7 +5372,7 @@ result
53715372
#
53725373
# MDEV-37864: mysql-test/mtr --cursor main.func_json fails
53735374
#
5374-
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from mysql.user;
5375+
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from (values (1),(2),(3),(4),(5)) x;
53755376
result
53765377
[["2", "6"], ["3", "8"], ["4", "5"], ["1", "7"]]
53775378
[["2", "6"], ["3", "8"], ["4", "5"], ["1", "7"]]

mysql-test/main/func_json.test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4263,15 +4263,16 @@ SET CHARACTER SET default;
42634263

42644264
SELECT json_array_intersect(@a,@b);
42654265

4266+
--echo #
42664267
--echo # MDEV-36809: json_array_intersect crashs when unused table ref provided
42674268
--echo #
4268-
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from mysql.user;
4269+
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from (values (1),(2),(3),(4),(5)) x;
42694270
SELECT ( WITH x AS ( WITH x ( x ) AS ( SELECT ( 1.000000 ) ) SELECT x FROM x ) SELECT * FROM x WHERE ( SELECT AVG ( x ) OVER ( ORDER BY JSON_ARRAY_INTERSECT ( '[["1", "7"], ["2", "6"], ["3", "8"]]' , '[["2","6"],["3","8"],["4","5"],["1","7"]]' ) ) FROM x ) ) as result;
42704271

42714272
--echo #
42724273
--echo # MDEV-37864: mysql-test/mtr --cursor main.func_json fails
42734274
--echo #
42744275

4275-
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from mysql.user;
4276+
select json_array_intersect('[["1", "7"], ["2", "6"], ["4", "5"], ["3", "8"]]', '[["2","6"],["3","8"],["4","5"],["1","7"]]') as result from (values (1),(2),(3),(4),(5)) x;
42764277

42774278
--echo # End of 11.4 Test

0 commit comments

Comments
 (0)