1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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

@ -682,6 +682,19 @@ FROM
ON tt.b = jt.o
ON t1.a = tt.b;
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;
execute s;
DROP VIEW v2;
DROP TABLE t1, t2;