diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field.h | 1 | ||||
-rw-r--r-- | sql/item.cc | 4 | ||||
-rw-r--r-- | sql/item.h | 1 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sql/field.h b/sql/field.h index 4efabcead18..002a7228164 100644 --- a/sql/field.h +++ b/sql/field.h @@ -92,6 +92,7 @@ public: utype unireg_check_arg, const char *field_name_arg, struct st_table *table_arg); virtual ~Field() {} + /* Store functions returns 1 on overflow and -1 on fatal error */ virtual int store(const char *to,uint length,CHARSET_INFO *cs)=0; virtual int store(double nr)=0; virtual int store(longlong nr)=0; diff --git a/sql/item.cc b/sql/item.cc index 65e1e67c7c6..2ad0931180a 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -678,9 +678,7 @@ void Item_param::set_longdata(const char *str, ulong length) int Item_param::save_in_field(Field *field, bool no_conversions) { - THD *thd= current_thd; - - DBUG_ASSERT(thd->command == COM_EXECUTE); + DBUG_ASSERT(current_thd->command == COM_EXECUTE); if (null_value) return (int) set_field_to_null(field); diff --git a/sql/item.h b/sql/item.h index 902f42dd07c..0f2927b0d99 100644 --- a/sql/item.h +++ b/sql/item.h @@ -146,6 +146,7 @@ public: complete fix_fields() procedure. */ inline void quick_fix_field() { fixed= 1; } + /* Function returns 1 on overflow and -1 on fatal errors */ virtual int save_in_field(Field *field, bool no_conversions); virtual void save_org_in_field(Field *field) { (void) save_in_field(field, 1); } |