2021-07-02 19:13:26 +02:00
|
|
|
source include/have_profiling.inc;
|
|
|
|
source include/not_embedded.inc;
|
2022-10-06 12:33:40 +03:00
|
|
|
source include/no_valgrind_without_big.inc;
|
2023-11-10 16:01:15 +05:30
|
|
|
source include/have_debug.inc;
|
2021-07-02 19:13:26 +02:00
|
|
|
|
|
|
|
set global max_allowed_packet=1073741824;
|
|
|
|
connect u,localhost,root;
|
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # MDEV-24909 JSON functions don't respect KILL QUERY / max_statement_time limit
|
|
|
|
--echo #
|
|
|
|
set group_concat_max_len= 4294967295;
|
|
|
|
|
2022-02-28 10:16:26 +11:00
|
|
|
set @obj=concat_ws('','{', repeat('"a":"b",', 1250000/2), '"c":"d"}');
|
|
|
|
set @arr=concat_ws('','[', repeat('1234567,', 1250000/2), '2345678]');
|
2021-07-02 19:13:26 +02:00
|
|
|
select length(@obj), length(@arr);
|
|
|
|
|
|
|
|
set max_statement_time=0.0001;
|
|
|
|
disable_abort_on_error;
|
2023-11-10 16:01:15 +05:30
|
|
|
SET @old_debug= @@debug_dbug;
|
|
|
|
SET debug_dbug='+d,debug_max_statement_time exceeded';
|
2021-07-02 19:13:26 +02:00
|
|
|
select json_array_append(@arr, '$[0]', 1);
|
|
|
|
select json_array_insert(@arr, '$[0]', 1);
|
|
|
|
select json_insert(@obj, '$.meta', 1);
|
|
|
|
select json_compact(@arr);
|
|
|
|
select json_detailed(@arr);
|
|
|
|
select json_loose(@arr);
|
|
|
|
select json_merge(@obj, @arr);
|
|
|
|
select json_merge_patch(@obj, @obj);
|
|
|
|
select json_merge_preserve(@obj, @arr);
|
|
|
|
select json_remove(@obj,'$.foo');
|
|
|
|
select json_replace(@obj,'$.foo',1);
|
|
|
|
select json_set(@arr,'$[1000]',1);
|
|
|
|
enable_abort_on_error;
|
2023-11-10 16:01:15 +05:30
|
|
|
SET debug_dbug= @old_debug;
|
2021-07-02 19:13:26 +02:00
|
|
|
disconnect u;
|
|
|
|
connection default;
|
|
|
|
set global max_allowed_packet=default;
|
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # End of 10.6 tests
|
|
|
|
--echo #
|