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

MDEV-26054 Server crashes in Item_func_json_arrayagg::get_str_from_field

Revert "fix JSON_ARRAYAGG not to over-quote json in joins"
This removes 8711adb786 but keeps the test case.
A different fix is coming up.

Because args can be Item_field's that are later
replaced by Item_direct_view_ref to the actual field.
While Item_field preserved in orig_args will stay unfixed
with item->field==NULL and no metadata
This commit is contained in:
Sergei Golubchik
2021-06-30 21:17:57 +02:00
parent 83684fc9a4
commit b62672af72
3 changed files with 24 additions and 2 deletions

View File

@@ -873,6 +873,17 @@ SELECT t1.id, JSON_ARRAYAGG(JSON_OBJECT('id',t2.id) ORDER BY t2.id) as materials
DROP TABLE t1;
DROP TABLE t2;
--echo #
--echo # MDEV-26054 Server crashes in Item_func_json_arrayagg::get_str_from_field
--echo #
CREATE TABLE t (a VARCHAR(8));
CREATE VIEW v AS SELECT * FROM t;
INSERT INTO t VALUES ('foo'),('bar');
SELECT JSON_ARRAYAGG(a) AS f FROM v;
DROP VIEW v;
DROP TABLE t;
--echo #
--echo # End of 10.5 tests
--echo #