mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Push history-limiting code until after the code that adds new
history entries. Lazy deletion isn't smart or useful here.
This commit is contained in:
@@ -338,9 +338,6 @@ void PROFILING::store()
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
while (history.elements > thd->variables.profiling_history_size)
|
||||
delete history.pop();
|
||||
|
||||
if (likely(((thd)->options & OPTION_PROFILING) == 0))
|
||||
DBUG_VOID_RETURN;
|
||||
|
||||
@@ -370,6 +367,9 @@ void PROFILING::store()
|
||||
if (enabled)
|
||||
current= new QUERY_PROFILE(this, thd->query, thd->query_length);
|
||||
|
||||
while (history.elements > thd->variables.profiling_history_size)
|
||||
delete history.pop();
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user