Commit 499426dd authored by Nikita Malyavin's avatar Nikita Malyavin

time measures

parent 5f94533b
......@@ -5009,7 +5009,7 @@ add_internal_tables(THD *thd, Query_tables_list *prelocking_ctx,
} while ((tables= tables->next_global));
DBUG_RETURN(FALSE);
}
extern ulonglong global_time_spent;
/**
Extend the table_list to include foreign tables for prelocking.
......@@ -5046,6 +5046,7 @@ prepare_fk_prelocking_list(THD *thd, Query_tables_list *prelocking_ctx,
}
*need_prelocking= TRUE;
clock_t start= clock();
while ((fk= fk_list_it++))
{
......@@ -5072,6 +5073,8 @@ prepare_fk_prelocking_list(THD *thd, Query_tables_list *prelocking_ctx,
&prelocking_ctx->query_tables_last,
table_list->for_insert_data);
}
clock_t measured_time= clock() - start;
global_time_spent+= measured_time;
if (arena)
thd->restore_active_arena(arena, &backup);
DBUG_RETURN(FALSE);
......
......@@ -7327,3 +7327,9 @@ static Sys_var_enum Sys_block_encryption_mode(
"AES_ENCRYPT() and AES_DECRYPT() functions",
SESSION_VAR(block_encryption_mode), CMD_LINE(REQUIRED_ARG),
block_encryption_mode_values, DEFAULT(0));
ulonglong global_time_spent= 0;
static Sys_var_ulonglong Sys_time_spent(
"time_spent", "",
GLOBAL_VAR(global_time_spent), CMD_LINE(NO_ARG),
VALID_RANGE(0, ULONGLONG_MAX), DEFAULT(0), BLOCK_SIZE(1));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment