diff options
author | unknown <kostja@bodhi.(none)> | 2007-10-30 20:08:16 +0300 |
---|---|---|
committer | unknown <kostja@bodhi.(none)> | 2007-10-30 20:08:16 +0300 |
commit | 2437001234eba37ad821be11052e57f04293d5bd (patch) | |
tree | 9ec3bc334876bc45e6590ad238ea740b8192f907 /sql/sp_head.cc | |
parent | f139033063f0af6b5df61c729b5a2a6406f28a64 (diff) | |
download | mariadb-git-2437001234eba37ad821be11052e57f04293d5bd.tar.gz |
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()
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index f7ab9bac3b1..6e8749aa745 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -370,7 +370,7 @@ sp_eval_expr(THD *thd, Field *result_field, Item **expr_item_ptr) thd->abort_on_warning= save_abort_on_warning; thd->transaction.stmt.modified_non_trans_table= save_stmt_modified_non_trans_table; - if (thd->net.report_error) + if (thd->is_error()) { /* Return error status if something went wrong. */ err_status= TRUE; @@ -1277,7 +1277,7 @@ sp_head::execute(THD *thd) done: DBUG_PRINT("info", ("err_status: %d killed: %d is_slave_error: %d report_error: %d", err_status, thd->killed, thd->is_slave_error, - thd->net.report_error)); + thd->is_error())); if (thd->killed) err_status= TRUE; @@ -2673,7 +2673,7 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp, cleanup_items() is called in sp_head::execute() */ - DBUG_RETURN(res || thd->net.report_error); + DBUG_RETURN(res || thd->is_error()); } |