1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-25202: JSON_TABLE: Early table reference leads to unexpected result set

Address review input: switch Name_resolution_context::ignored_tables from
table_map to a list of TABLE_LIST objects. The rationale is that table
bits may be changed due to query rewrites, etc, which may potentially
require updating ignored_tables.
This commit is contained in:
Sergei Petrunia
2021-04-16 19:50:08 +03:00
committed by Alexey Botchkov
parent 0984b8ed08
commit b0817ff8de
8 changed files with 150 additions and 64 deletions

View File

@@ -790,6 +790,23 @@ ON t1.a = tt.b;
a b c o
1 1 {} 1
2 2 [] NULL
prepare s from
"SELECT *
FROM
t1 RIGHT JOIN
v2 AS tt
LEFT JOIN
JSON_TABLE(CONCAT(tt.c,''), '$' COLUMNS(o FOR ORDINALITY)) AS jt
ON tt.b = jt.o
ON t1.a = tt.b";
execute s;
a b c o
1 1 {} 1
2 2 [] NULL
execute s;
a b c o
1 1 {} 1
2 2 [] NULL
DROP VIEW v2;
DROP TABLE t1, t2;
#