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

MDEV-25183 JSON_TABLE: CREATE VIEW involving NESTED PATH ends up with invalid frm.

Wrong comma was added after the single column.
This commit is contained in:
Alexey Botchkov
2021-03-19 11:05:14 +04:00
parent 51ac57fbbe
commit 6f56458a76
3 changed files with 27 additions and 9 deletions

View File

@@ -505,5 +505,16 @@ hex(a) b
626172 2
SET @@character_set_connection= @old_character_set_connection;
#
# MDEV-25183 JSON_TABLE: CREATE VIEW involving NESTED PATH ends up with invalid frm
#
CREATE VIEW v AS SELECT * FROM JSON_TABLE('{}', '$' COLUMNS(NESTED PATH '$**.*' COLUMNS(a FOR ORDINALITY), b VARCHAR(8) PATH '$')) AS jt;
SHOW CREATE VIEW v;
View Create View character_set_client collation_connection
v CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select `jt`.`a` AS `a`,`jt`.`b` AS `b` from JSON_TABLE('{}', '$' COLUMNS (NESTED PATH '$**.*' COLUMNS (`a` FOR ORDINALITY), `b` varchar(8) PATH '$')) `jt` latin1 latin1_swedish_ci
SELECT * FROM v;
a b
NULL NULL
DROP VIEW v;
#
# End of 10.6 tests
#