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:
@ -685,7 +685,7 @@ int connect_to_master(THD *thd, MYSQL* mysql, Master_info* mi)
|
||||
|
||||
if (!mi->host || !*mi->host) /* empty host */
|
||||
{
|
||||
strmov(mysql->net.last_error, "Master is not configured");
|
||||
strmov(mysql->net.client_last_error, "Master is not configured");
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (char *) &slave_net_timeout);
|
||||
@ -880,6 +880,8 @@ bool load_master_data(THD* thd)
|
||||
cleanup_mysql_results(db_res, cur_table_res - 1, table_res);
|
||||
goto err;
|
||||
}
|
||||
/* Clear the result of mysql_create_db(). */
|
||||
thd->main_da.reset_diagnostics_area();
|
||||
|
||||
if (mysql_select_db(&mysql, db) ||
|
||||
mysql_real_query(&mysql, STRING_WITH_LEN("SHOW TABLES")) ||
|
||||
|
Reference in New Issue
Block a user