mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-25379 JSON_TABLE: ERROR ON clauses are ignored if a column is not on select list.
If a field is not in the read set - read it in the local buffer anyway to check for errors.
This commit is contained in:
@@ -813,6 +813,14 @@ SUM(o)
|
||||
NULL
|
||||
set sql_mode=@save_sql_mode;
|
||||
drop table t1;
|
||||
# MDEV-25379 JSON_TABLE: ERROR ON clauses are ignored if a column is not on select list.
|
||||
#
|
||||
SELECT * FROM JSON_TABLE ('{}', '$' COLUMNS(a INT PATH '$.*' ERROR ON EMPTY, o FOR ORDINALITY)) AS jt;
|
||||
ERROR HY000: Field 'a' can't be set for JSON_TABLE 'jt'.
|
||||
SELECT o FROM JSON_TABLE ('{}', '$' COLUMNS(a INT PATH '$.*' ERROR ON EMPTY, o FOR ORDINALITY)) AS jt;
|
||||
ERROR HY000: Field 'a' can't be set for JSON_TABLE 'jt'.
|
||||
SELECT COUNT(*) FROM JSON_TABLE ('{}', '$' COLUMNS(a INT PATH '$.*' ERROR ON EMPTY, o FOR ORDINALITY)) AS jt;
|
||||
ERROR HY000: Field 'a' can't be set for JSON_TABLE 'jt'.
|
||||
#
|
||||
# End of 10.6 tests
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user