From cc958a18dd9554870edd3b1c6119edf72b661879 Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Sat, 20 Dec 2008 11:01:41 +0100 Subject: Backport of DTrace patches from 6.0 --- sql/sql_cursor.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sql/sql_cursor.cc') diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc index 7c530cb9013..1f6c9fdee53 100644 --- a/sql/sql_cursor.cc +++ b/sql/sql_cursor.cc @@ -19,6 +19,7 @@ #include "mysql_priv.h" #include "sql_cursor.h" #include "sql_select.h" +#include "probes_mysql.h" /**************************************************************************** Declarations. @@ -167,8 +168,14 @@ int mysql_open_cursor(THD *thd, uint flags, select_result *result, thd->lock_id= sensitive_cursor->get_lock_id(); thd->cursor= sensitive_cursor; } - + MYSQL_QUERY_EXEC_START(thd->query, + thd->thread_id, + (char *) (thd->db ? thd->db : ""), + thd->security_ctx->priv_user, + (char *) thd->security_ctx->host_or_ip, + 2); rc= mysql_execute_command(thd); + MYSQL_QUERY_EXEC_DONE(rc); lex->result= save_result; thd->lock_id= &thd->main_lock_id; -- cgit v1.2.1