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

MDEV-32726: Fix failing test fir freebsd for json

Json test about max statement time fails with freebsd because on some
architectures the test might execute faster and the statement may not fail.

To simulate failure regardless of architecture, introduce a wait of seconds
longer than the max_statement_time.
This commit is contained in:
Rucha Deodhar
2023-11-10 16:01:15 +05:30
parent 188c5da72a
commit fcd345de48
5 changed files with 81 additions and 26 deletions

View File

@ -10,6 +10,8 @@ select length(@obj), length(@arr);
length(@obj) length(@arr)
5000009 5000009
set max_statement_time=0.0001;
SET @old_debug= @@debug_dbug;
SET debug_dbug='+d,debug_max_statement_time exceeded';
select json_array_append(@arr, '$[0]', 1);
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
select json_array_insert(@arr, '$[0]', 1);
@ -34,6 +36,7 @@ select json_replace(@obj,'$.foo',1);
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
select json_set(@arr,'$[1000]',1);
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
SET debug_dbug= @old_debug;
disconnect u;
connection default;
set global max_allowed_packet=default;