summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
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
commit2437001234eba37ad821be11052e57f04293d5bd (patch)
tree9ec3bc334876bc45e6590ad238ea740b8192f907 /sql/item_func.cc
parentf139033063f0af6b5df61c729b5a2a6406f28a64 (diff)
downloadmariadb-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/item_func.cc')
-rw-r--r--sql/item_func.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 64574a9ad74..2d4d61de61b 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -187,7 +187,7 @@ Item_func::fix_fields(THD *thd, Item **ref)
}
}
fix_length_and_dec();
- if (thd->net.report_error) // An error inside fix_length_and_dec occured
+ if (thd->is_error()) // An error inside fix_length_and_dec occured
return TRUE;
fixed= 1;
return FALSE;
@@ -4073,7 +4073,7 @@ my_decimal *user_var_entry::val_decimal(my_bool *null_value, my_decimal *val)
NOTES
For now it always return OK. All problem with value evaluating
- will be caught by thd->net.report_error check in sql_set_variables().
+ will be caught by thd->is_error() check in sql_set_variables().
RETURN
FALSE OK.