1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-25397: JSON_TABLE: Unexpected ER_MIX_OF_GROUP_FUNC_AND_FIELDS

When doing name resolution, do the same what WHERE/ON clauses do:
they don't count in select_lex->non_agg_field_used().
This commit is contained in:
Sergei Petrunia
2021-04-13 12:34:14 +03:00
committed by Alexey Botchkov
parent f82947e48d
commit a96408092c
3 changed files with 28 additions and 0 deletions

View File

@ -698,6 +698,17 @@ SELECT * FROM v;
DROP VIEW v;
--echo #
--echo # MDEV-25397: JSON_TABLE: Unexpected ER_MIX_OF_GROUP_FUNC_AND_FIELDS upon query with JOIN
--echo #
set @save_sql_mode= @@sql_mode;
SET sql_mode='ONLY_FULL_GROUP_BY';
CREATE TABLE t1 (a TEXT);
SELECT SUM(o) FROM t1 JOIN JSON_TABLE(t1.a, '$' COLUMNS(o FOR ORDINALITY)) jt;
set sql_mode=@save_sql_mode;
drop table t1;
--echo #
--echo # End of 10.6 tests
--echo #