mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +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:
@@ -203,14 +203,10 @@ typedef struct st_net {
|
||||
unsigned int *return_status;
|
||||
unsigned char reading_or_writing;
|
||||
char save_char;
|
||||
my_bool no_send_ok; /* For SPs and other things that do multiple stmts */
|
||||
my_bool unused0; /* Please remove with the next incompatible ABI change. */
|
||||
my_bool unused; /* Please remove with the next incompatible ABI change */
|
||||
my_bool compress;
|
||||
/*
|
||||
Set if OK packet is already sent, and we do not need to send error
|
||||
messages
|
||||
*/
|
||||
my_bool no_send_error;
|
||||
my_bool unused1; /* Please remove with the next incompatible ABI change. */
|
||||
/*
|
||||
Pointer to query object in query cache, do not equal NULL (0) for
|
||||
queries in cache that have not stored its results yet
|
||||
@@ -221,11 +217,14 @@ typedef struct st_net {
|
||||
functions and methods to maintain proper locking.
|
||||
*/
|
||||
unsigned char *query_cache_query;
|
||||
unsigned int last_errno;
|
||||
unsigned char error;
|
||||
my_bool report_error; /* We should report error (we have unreported error) */
|
||||
unsigned int client_last_errno;
|
||||
unsigned char error;
|
||||
my_bool unused2; /* Please remove with the next incompatible ABI change. */
|
||||
my_bool return_errno;
|
||||
char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1];
|
||||
/** Client library error message buffer. Actually belongs to struct MYSQL. */
|
||||
char client_last_error[MYSQL_ERRMSG_SIZE];
|
||||
/** Client library sqlstate buffer. Set along with the error message. */
|
||||
char sqlstate[SQLSTATE_LENGTH+1];
|
||||
void *extension;
|
||||
} NET;
|
||||
|
||||
|
Reference in New Issue
Block a user