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

MDEV-29284 ANALYZE doesn't work with pushed derived tables

There was no actual execution of the SQL of a pushed derived table,
which caused "r_rows" to be always displayed as 0 and "r_total_time_ms"
to show inaccurate numbers.
This commit makes a derived table SQL to be executed by the storage
engine, so the server is able to calculate the number of rows returned
and measure the execution time more accurately
This commit is contained in:
Oleg Smirnov
2023-07-05 19:28:27 +07:00
parent 1bfd3cc457
commit 94a8921e9d
3 changed files with 2 additions and 11 deletions

View File

@ -40,7 +40,6 @@
Pushdown_derived::Pushdown_derived(TABLE_LIST *tbl, derived_handler *h)
: derived(tbl), handler(h)
{
is_analyze= handler->thd->lex->analyze_stmt;
}
@ -57,12 +56,6 @@ int Pushdown_derived::execute()
if ((err= handler->init_scan()))
goto error;
if (is_analyze)
{
handler->end_scan();
DBUG_RETURN(0);
}
while (!(err= handler->next_row()))
{
if (unlikely(thd->check_killed()))