mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#12713 "Error in a stored function called from a SELECT doesn't
cause ROLLBACK of statement", part 1. Review fixes. Do not send OK/EOF packets to the client until we reached the end of the current statement. This is a consolidation, to keep the functionality that is shared by all SQL statements in one place in the server. Currently this functionality includes: - close_thread_tables() - log_slow_statement(). After this patch and the subsequent patch for Bug#12713, it shall also include: - ha_autocommit_or_rollback() - net_end_statement() - query_cache_end_of_result(). In future it may also include: - mysql_reset_thd_for_next_command().
This commit is contained in:
@ -40,13 +40,6 @@ void mysql_client_binlog_statement(THD* thd)
|
||||
if (check_global_access(thd, SUPER_ACL))
|
||||
DBUG_VOID_RETURN;
|
||||
|
||||
/*
|
||||
Temporarily turn off send_ok, since different events handle this
|
||||
differently
|
||||
*/
|
||||
my_bool nsok= thd->net.no_send_ok;
|
||||
thd->net.no_send_ok= TRUE;
|
||||
|
||||
size_t coded_len= thd->lex->comment.length + 1;
|
||||
size_t decoded_len= base64_needed_decoded_length(coded_len);
|
||||
DBUG_ASSERT(coded_len > 0);
|
||||
@ -193,20 +186,11 @@ void mysql_client_binlog_statement(THD* thd)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Restore setting of no_send_ok
|
||||
*/
|
||||
thd->net.no_send_ok= nsok;
|
||||
|
||||
DBUG_PRINT("info",("binlog base64 execution finished successfully"));
|
||||
send_ok(thd);
|
||||
|
||||
end:
|
||||
/*
|
||||
Restore setting of no_send_ok
|
||||
*/
|
||||
thd->net.no_send_ok= nsok;
|
||||
|
||||
delete desc;
|
||||
my_free(buf, MYF(MY_ALLOW_ZERO_PTR));
|
||||
DBUG_VOID_RETURN;
|
||||
|
Reference in New Issue
Block a user