1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-31121: ANALYZE statement produces 0 for all timings in embedded server

Timers require my_timer_init() call.
It was made only in mysqld_main(). Call it also from init_embedded_server().
This commit is contained in:
Sergei Petrunia
2023-04-24 17:57:45 +03:00
parent 29fb041007
commit a72b2c3ffb
3 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#
# MDEV-31121: ANALYZE statement produces 0 for all timings in embedded serve
#
create table t1 (a int);
insert into t1 values (0),(0);
set @js='$out';
set @out=(select json_extract(@js,'$**.query_block.r_total_time_ms'));
select cast(json_extract(@out,'$[0]') as DOUBLE) > 0;
cast(json_extract(@out,'$[0]') as DOUBLE) > 0
1
drop table t1;