From 2437001234eba37ad821be11052e57f04293d5bd Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 30 Oct 2007 20:08:16 +0300 Subject: Use an inline getter method (thd->is_error()) to query if there is an error in THD. In future the error may be stored elsewhere (not in net.report_error) and it's important to start using an opaque getter to simplify merges. sql/filesort.cc: net.report_error -> is_error() sql/ha_ndbcluster_binlog.cc: net.report_error -> is_error() sql/item_func.cc: net.report_error -> is_error() sql/item_subselect.cc: net.report_error -> is_error() sql/set_var.cc: net.report_error -> is_error() sql/sp.cc: net.report_error -> is_error() sql/sp_head.cc: net.report_error -> is_error() sql/sql_base.cc: net.report_error -> is_error() sql/sql_class.cc: net.report_error -> is_error() sql/sql_class.h: net.report_error -> is_error() sql/sql_connect.cc: net.report_error -> is_error() sql/sql_delete.cc: net.report_error -> is_error() sql/sql_insert.cc: net.report_error -> is_error() sql/sql_parse.cc: net.report_error -> is_error() sql/sql_prepare.cc: net.report_error -> is_error() sql/sql_select.cc: net.report_error -> is_error() sql/sql_union.cc: net.report_error -> is_error() sql/sql_update.cc: net.report_error -> is_error() sql/sql_view.cc: net.report_error -> is_error() sql/sql_yacc.yy: net.report_error -> is_error() --- sql/sql_connect.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sql/sql_connect.cc') diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index afd97c27a55..006cca4ee90 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -975,12 +975,12 @@ void end_connection(THD *thd) decrease_user_connections(thd->user_connect); if (thd->killed || - net->error && net->vio != 0 && net->report_error) + net->error && net->vio != 0 && thd->is_error()) { statistic_increment(aborted_threads,&LOCK_status); } - if (net->error && net->vio != 0 && net->report_error) + if (net->error && net->vio != 0 && thd->is_error()) { if (!thd->killed && thd->variables.log_warnings > 1) { @@ -1030,7 +1030,7 @@ static void prepare_new_connection_state(THD* thd) if (sys_init_connect.value_length && !(sctx->master_access & SUPER_ACL)) { execute_init_command(thd, &sys_init_connect, &LOCK_sys_init_connect); - if (thd->net.report_error) + if (thd->is_error()) { thd->killed= THD::KILL_CONNECTION; sql_print_warning(ER(ER_NEW_ABORTING_CONNECTION), -- cgit v1.2.1