mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug#24795: Add SHOW PROFILE
Patch contributed by Jeremy Cole. CLA received Oct 2006 by Kaj Arnö Add rudimentary query profiling support.
This commit is contained in:
@ -55,7 +55,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
||||
table->file->print_error(error, MYF(0));
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
thd->proc_info="init";
|
||||
THD_PROC_INFO(thd, "init");
|
||||
table->map=1;
|
||||
|
||||
if (mysql_prepare_delete(thd, table_list, &conds))
|
||||
@ -206,7 +206,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
||||
|
||||
deleted=0L;
|
||||
init_ftfuncs(thd, select_lex, 1);
|
||||
thd->proc_info="updating";
|
||||
THD_PROC_INFO(thd, "updating");
|
||||
|
||||
if (table->triggers)
|
||||
table->triggers->mark_fields_used(thd, TRG_EVENT_DELETE);
|
||||
@ -262,7 +262,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
||||
}
|
||||
if (thd->killed && !error)
|
||||
error= 1; // Aborted
|
||||
thd->proc_info="end";
|
||||
THD_PROC_INFO(thd, "end");
|
||||
end_read_record(&info);
|
||||
free_io_cache(table); // Will not do any harm
|
||||
if (options & OPTION_QUICK)
|
||||
@ -486,7 +486,7 @@ multi_delete::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
DBUG_ENTER("multi_delete::prepare");
|
||||
unit= u;
|
||||
do_delete= 1;
|
||||
thd->proc_info="deleting from main table";
|
||||
THD_PROC_INFO(thd, "deleting from main table");
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
@ -750,7 +750,7 @@ int multi_delete::do_deletes()
|
||||
|
||||
bool multi_delete::send_eof()
|
||||
{
|
||||
thd->proc_info="deleting from reference tables";
|
||||
THD_PROC_INFO(thd, "deleting from reference tables");
|
||||
|
||||
/* Does deletes for the last n - 1 tables, returns 0 if ok */
|
||||
int local_error= do_deletes(); // returns 0 if success
|
||||
@ -759,7 +759,7 @@ bool multi_delete::send_eof()
|
||||
local_error= local_error || error;
|
||||
|
||||
/* reset used flags */
|
||||
thd->proc_info="end";
|
||||
THD_PROC_INFO(thd, "end");
|
||||
|
||||
/*
|
||||
We must invalidate the query cache before binlog writing and
|
||||
|
Reference in New Issue
Block a user