diff options
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/sql/field.h b/sql/field.h index 5ae8838c303..bc413865e7e 100644 --- a/sql/field.h +++ b/sql/field.h @@ -645,6 +645,8 @@ protected: val_str(&result); return to->store(result.ptr(), result.length(), charset()); } + void error_generated_column_function_is_not_allowed(THD *thd, bool error) + const; static void do_field_int(Copy_field *copy); static void do_field_real(Copy_field *copy); static void do_field_string(Copy_field *copy); @@ -1037,7 +1039,6 @@ public: { bitmap_clear_bit(&table->has_value_set, field_index); } - bool set_explicit_default(Item *value); virtual my_time_t get_timestamp(const uchar *pos, ulong *sec_part) const { DBUG_ASSERT(0); return 0; } @@ -1046,14 +1047,6 @@ public: return get_timestamp(ptr, sec_part); } - /** - Evaluates the @c UPDATE default function, if one exists, and stores the - result in the record buffer. If no such function exists for the column, - or the function is not valid for the column's data type, invoking this - function has no effect. - */ - virtual int evaluate_update_default_function() { return 0; } - virtual bool binary() const { return 1; } virtual bool zero_pack() const { return 1; } virtual enum ha_base_keytype key_type() const { return HA_KEYTYPE_BINARY; } @@ -1266,6 +1259,16 @@ public: } bool stored_in_db() const { return !vcol_info || vcol_info->stored_in_db; } + bool check_vcol_sql_mode_dependency(THD *, vcol_init_mode mode) const; + + virtual sql_mode_t value_depends_on_sql_mode() const + { + return 0; + } + virtual sql_mode_t can_handle_sql_mode_dependency_on_store() const + { + return 0; + } inline THD *get_thd() const { return likely(table) ? table->in_use : current_thd; } @@ -1832,6 +1835,7 @@ public: { return DTCollation_numeric::singleton(); } + sql_mode_t can_handle_sql_mode_dependency_on_store() const; Item *get_equal_const_item(THD *thd, const Context &ctx, Item *const_item) { return (flags & ZEROFILL_FLAG) ? @@ -2805,6 +2809,7 @@ public: { return store(str, length, &my_charset_bin); } + sql_mode_t can_handle_sql_mode_dependency_on_store() const; Copy_func *get_copy_func(const Field *from) const; int save_in_field(Field *to) { @@ -2933,13 +2938,6 @@ public: void sql_type(String &str) const; bool zero_pack() const { return 0; } int set_time(); - int evaluate_update_default_function() - { - int res= 0; - if (has_update_default_function()) - res= set_time(); - return res; - } /* Get TIMESTAMP field value as seconds since begging of Unix Epoch */ my_time_t get_timestamp(const uchar *pos, ulong *sec_part) const; my_time_t get_timestamp(ulong *sec_part) const @@ -3462,13 +3460,6 @@ public: bool get_date(MYSQL_TIME *ltime, date_mode_t fuzzydate) { return Field_datetime::get_TIME(ltime, ptr, fuzzydate); } int set_time(); - int evaluate_update_default_function() - { - int res= 0; - if (has_update_default_function()) - res= set_time(); - return res; - } uchar *pack(uchar* to, const uchar *from, uint max_length __attribute__((unused))) { @@ -3732,6 +3723,8 @@ public: { return charset() == &my_charset_bin ? FALSE : TRUE; } Field *make_new_field(MEM_ROOT *root, TABLE *new_table, bool keep_type); virtual uint get_key_image(uchar *buff,uint length, imagetype type); + sql_mode_t value_depends_on_sql_mode() const; + sql_mode_t can_handle_sql_mode_dependency_on_store() const; void print_key_value(String *out, uint32 length); private: int save_field_metadata(uchar *first_byte); @@ -4285,6 +4278,7 @@ public: Field *make_new_field(MEM_ROOT *root, TABLE *new_table, bool keep_type); const Type_handler *type_handler() const { return &type_handler_enum; } enum ha_base_keytype key_type() const; + sql_mode_t can_handle_sql_mode_dependency_on_store() const; enum_conv_type rpl_conv_type_from(const Conv_source &source, const Relay_log_info *rli, const Conv_param ¶m) const; |