diff options
Diffstat (limited to 'sql/log_event.h')
-rw-r--r-- | sql/log_event.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/log_event.h b/sql/log_event.h index b31d444ad21..3d307000b13 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -118,16 +118,18 @@ public: ulong thread_id; #if !defined(MYSQL_CLIENT) THD* thd; - Query_log_event(THD* thd_arg, const char* query_arg): - Log_event(thd_arg->start_time,0,0,thd_arg->server_id), data_buf(0), + bool cache_stmt; + Query_log_event(THD* thd_arg, const char* query_arg, bool using_trans=0): + Log_event(thd_arg->start_time,0,1,thd_arg->server_id), data_buf(0), query(query_arg), db(thd_arg->db), q_len(thd_arg->query_length), error_code(thd_arg->net.last_errno), - thread_id(thd_arg->thread_id), thd(thd_arg) + thread_id(thd_arg->thread_id), thd(thd_arg), + cache_stmt(using_trans && + (thd_arg->options & (OPTION_NOT_AUTO_COMMIT | OPTION_BEGIN))) { time_t end_time; time(&end_time); exec_time = (ulong) (end_time - thd->start_time); - valid_exec_time = 1; db_len = (db) ? (uint32) strlen(db) : 0; } #endif |