1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-27021 Add explicit indication of SHOW EXPLAIN/ANALYZE.

1. Add explicit indication that the output is produced by
SHOW EXPLAIN/ANALYZE FORMAT=JSON command.
2. Remove useless "r_total_time_ms" field from SHOW ANALYZE FORMAT=JSON
output when there is no timed statistics gathered.
3. Add "r_query_time_in_progress_ms" to the output of SHOW ANALYZE FORMAT=JSON.
This commit is contained in:
Oleg Smirnov
2022-02-16 13:03:46 +07:00
committed by Sergei Petrunia
parent d1a1ad4c28
commit a0475cb9ca
65 changed files with 207 additions and 187 deletions

View File

@ -125,7 +125,7 @@ SET debug_dbug=@old_debug;
--echo # UNION, select, first branch
set @show_explain_probe_select_id=1;
SET debug_dbug='+d,show_explain_probe_join_exec_end';
send select max(a) from t0 A where a<=5 union select max(a+1) from t0 B where a>=9;
send select max(a) from t0 a where a<=5 union select max(a+1) from t0 b where a>=9;
connection default;
--source include/wait_condition.inc
--source include/analyze-format.inc
@ -137,7 +137,7 @@ reap;
--echo # UNION, select, second branch
set @show_explain_probe_select_id=2; # <--- Second branch
SET debug_dbug='+d,show_explain_probe_join_exec_end';
send select max(a) from t0 A where a<=5 union select max(a+1) from t0 B where a>=9;
send select max(a) from t0 a where a<=5 union select max(a+1) from t0 b where a>=9;
connection default;
--source include/wait_condition.inc
--source include/analyze-format.inc
@ -149,7 +149,7 @@ reap;
--echo # UNION, analyze, first branch
set @show_explain_probe_select_id=1;
SET debug_dbug='+d,show_explain_probe_join_exec_end';
send analyze select a from t0 A where a<=5 union select a+1 from t0 B where a>=9;
send analyze select a from t0 a where a<=5 union select a+1 from t0 b where a>=9;
connection default;
--source include/wait_condition.inc
--source include/analyze-format.inc
@ -160,7 +160,7 @@ reap;
--echo # UNION, analyze, second branch
set @show_explain_probe_select_id=2;
send analyze select a from t0 A where a<=5 union select a+1 from t0 B where a>=9;
send analyze select a from t0 a where a<=5 union select a+1 from t0 b where a>=9;
connection default;
--source include/wait_condition.inc
--source include/analyze-format.inc
@ -173,7 +173,7 @@ SET debug_dbug=@old_debug;
--echo # Uncorrelated subquery, select
set @show_explain_probe_select_id=1;
SET debug_dbug='+d,show_explain_probe_join_exec_end';
send select a, (select max(a) from t0 B where a>6) from t0 A where a<2;
send select a, (select max(a) from t0 b where a>6) from t0 a where a<2;
connection default;
--source include/wait_condition.inc
--source include/analyze-format.inc
@ -186,7 +186,7 @@ SET debug_dbug=@old_debug;
--echo # Uncorrelated subquery, analyze
set @show_explain_probe_select_id=1;
SET debug_dbug='+d,show_explain_probe_join_exec_end';
send analyze select a, (select max(a) from t0 B where a>6) from t0 A where a<2;
send analyze select a, (select max(a) from t0 b where a>6) from t0 a where a<2;
connection default;
--source include/wait_condition.inc
--source include/analyze-format.inc
@ -365,4 +365,4 @@ drop table t0,t1;
--echo # End
connection default;
disconnect con1;
set debug_sync='RESET';
set debug_sync='RESET';