1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

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()
This commit is contained in:
unknown
2007-10-30 20:08:16 +03:00
parent f139033063
commit 2437001234
20 changed files with 82 additions and 68 deletions

View File

@@ -1468,7 +1468,7 @@ public:
bool in_lock_tables;
/**
True if a slave error. Causes the slave to stop. Not the same
as the statement execution error (net.report_error), since
as the statement execution error (is_error()), since
a statement may be expected to return an error, e.g. because
it returned an error on master, and this is OK on the slave.
*/
@@ -1716,6 +1716,20 @@ public:
net.report_error= 1;
DBUG_PRINT("error",("Fatal error set"));
}
/**
TRUE if there is an error in the error stack.
Please use this method instead of direct access to
net.report_error.
If TRUE, the current (sub)-statement should be aborted.
The main difference between this member and is_fatal_error
is that a fatal error can not be handled by a stored
procedure continue handler, whereas a normal error can.
To raise this flag, use my_error().
*/
inline bool is_error() const { return net.report_error; }
inline CHARSET_INFO *charset() { return variables.character_set_client; }
void update_charset();