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

Merge branch '11.4' into 11.5

This commit is contained in:
Oleksandr Byelkin
2024-08-05 17:50:18 +02:00
508 changed files with 12703 additions and 5123 deletions

View File

@@ -873,6 +873,28 @@ SELECT * FROM json_table('[{"name":"Jeans"}]', '$[*]'
--error ER_OPERAND_COLUMNS
SELECT 1 FROM JSON_TABLE (row(1,2), '$' COLUMNS (o FOR ORDINALITY)) AS j;
--echo #
--echo # MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated
--echo # update_correlated_cache() fails to take JSON_TABLE functions in
--echo # subqueries into account.
--echo #
create table t1(c json);
insert into t1 values ('[{"x":"1"},{"x":"2"}]'),
('[{"x":"10"},{"x":"20"}]'),
('[{"x":"100"},{"x":"200"}]');
select c,
(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x"))
AS jt) as SUBQ
from t1;
explain select c,
(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x"))
AS jt) as SUBQ
from t1;
drop table t1;
--echo #
--echo # End of 10.6 tests
--echo #