summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.(none)>2007-10-30 20:08:16 +0300
committerunknown <kostja@bodhi.(none)>2007-10-30 20:08:16 +0300
commit6a8fcca87eaf83a99846fdc3939b856ae1bc5c43 (patch)
tree9ec3bc334876bc45e6590ad238ea740b8192f907 /sql/sql_class.h
parent52ddd7a02e8f131d4e7f45e6fb6079ce61592629 (diff)
downloadmariadb-git-6a8fcca87eaf83a99846fdc3939b856ae1bc5c43.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/sql_class.h')
-rw-r--r--sql/sql_class.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index a7f196cd825..a3e71e183f3 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -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();