bug#22725

merge with 5.0
parent 15374840
...@@ -3048,9 +3048,9 @@ void THD::binlog_delete_pending_rows_event() ...@@ -3048,9 +3048,9 @@ void THD::binlog_delete_pending_rows_event()
RETURN VALUE RETURN VALUE
Error code, or 0 if no error. Error code, or 0 if no error.
*/ */
int THD::binlog_query(THD::enum_binlog_query_type qtype, int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query,
char const *query, ulong query_len, ulong query_len, bool is_trans, bool suppress_use,
bool is_trans, bool suppress_use) THD::killed_state killed_status_arg)
{ {
DBUG_ENTER("THD::binlog_query"); DBUG_ENTER("THD::binlog_query");
DBUG_PRINT("enter", ("qtype=%d, query='%s'", qtype, query)); DBUG_PRINT("enter", ("qtype=%d, query='%s'", qtype, query));
...@@ -3089,7 +3089,8 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, ...@@ -3089,7 +3089,8 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype,
flush the pending rows event if necessary. flush the pending rows event if necessary.
*/ */
{ {
Query_log_event qinfo(this, query, query_len, is_trans, suppress_use); Query_log_event qinfo(this, query, query_len, is_trans, suppress_use,
killed_status_arg);
qinfo.flags|= LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F; qinfo.flags|= LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F;
/* /*
Binlog table maps will be irrelevant after a Query_log_event Binlog table maps will be irrelevant after a Query_log_event
......
...@@ -1079,32 +1079,6 @@ public: ...@@ -1079,32 +1079,6 @@ public:
} }
#endif /* MYSQL_CLIENT */ #endif /* MYSQL_CLIENT */
#ifndef MYSQL_CLIENT
public:
enum enum_binlog_query_type {
/*
The query can be logged row-based or statement-based
*/
ROW_QUERY_TYPE,
/*
The query has to be logged statement-based
*/
STMT_QUERY_TYPE,
/*
The query represents a change to a table in the "mysql"
database and is currently mapped to ROW_QUERY_TYPE.
*/
MYSQL_QUERY_TYPE,
QUERY_TYPE_COUNT
};
int binlog_query(enum_binlog_query_type qtype,
char const *query, ulong query_len,
bool is_trans, bool suppress_use);
#endif
public: public:
struct st_transactions { struct st_transactions {
...@@ -1491,6 +1465,33 @@ public: ...@@ -1491,6 +1465,33 @@ public:
void close_active_vio(); void close_active_vio();
#endif #endif
void awake(THD::killed_state state_to_set); void awake(THD::killed_state state_to_set);
#ifndef MYSQL_CLIENT
enum enum_binlog_query_type {
/*
The query can be logged row-based or statement-based
*/
ROW_QUERY_TYPE,
/*
The query has to be logged statement-based
*/
STMT_QUERY_TYPE,
/*
The query represents a change to a table in the "mysql"
database and is currently mapped to ROW_QUERY_TYPE.
*/
MYSQL_QUERY_TYPE,
QUERY_TYPE_COUNT
};
int binlog_query(enum_binlog_query_type qtype,
char const *query, ulong query_len,
bool is_trans, bool suppress_use,
THD::killed_state killed_err_arg= THD::KILLED_NO_VALUE);
#endif
/* /*
For enter_cond() / exit_cond() to work the mutex must be got before For enter_cond() / exit_cond() to work the mutex must be got before
enter_cond(); this mutex is then released by exit_cond(). enter_cond(); this mutex is then released by exit_cond().
......
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