diff options
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/sql/item.h b/sql/item.h index c4fe4762f88..5af6dc3bf49 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1981,6 +1981,12 @@ public: return 0; } + virtual bool set_extraction_flag_processor(void *arg) + { + set_extraction_flag(*(int*)arg); + return 0; + } + /** Check db/table_name if they defined in item and match arg values @@ -6453,7 +6459,6 @@ class Item_default_value : public Item_field void calculate(); public: Item *arg= nullptr; - Field *cached_field= nullptr; Item_default_value(THD *thd, Name_resolution_context *context_arg, Item *a, bool vcol_assignment_arg) : Item_field(thd, context_arg), @@ -6470,6 +6475,10 @@ public: bool get_date(THD *thd, MYSQL_TIME *ltime,date_mode_t fuzzydate) override; bool val_native(THD *thd, Native *to) override; bool val_native_result(THD *thd, Native *to) override; + longlong val_datetime_packed(THD *thd) + { return Item::val_datetime_packed(thd); } + longlong val_time_packed(THD *thd) + { return Item::val_time_packed(thd); } /* Result variants */ double val_result() override; @@ -6483,6 +6492,7 @@ public: bool send(Protocol *protocol, st_value *buffer) override; int save_in_field(Field *field_arg, bool no_conversions) override; + void save_in_result_field(bool no_conversions) override; bool save_in_param(THD *, Item_param *param) override { // It should not be possible to have "EXECUTE .. USING DEFAULT(a)" @@ -6498,11 +6508,12 @@ public: } bool vcol_assignment_allowed_value() const override { return vcol_assignment_ok; } - Field *get_tmp_table_field() override { return nullptr; } Item *get_tmp_table_item(THD *) override { return this; } Item_field *field_for_view_update() override { return nullptr; } bool update_vcol_processor(void *) override { return false; } + bool check_field_expression_processor(void *arg) override; bool check_func_default_processor(void *) override { return true; } + bool register_field_in_read_map(void *arg) override; bool walk(Item_processor processor, bool walk_subquery, void *args) override { @@ -6777,7 +6788,7 @@ public: for any value. */ -class Item_cache: public Item, +class Item_cache: public Item_fixed_hybrid, public Type_handler_hybrid_field_type { protected: @@ -6808,7 +6819,7 @@ public: bool null_value_inside; Item_cache(THD *thd): - Item(thd), + Item_fixed_hybrid(thd), Type_handler_hybrid_field_type(&type_handler_string), example(0), cached_field(0), value_cached(0), @@ -6817,10 +6828,11 @@ public: maybe_null= 1; null_value= 1; null_value_inside= true; + fixed= 1; } protected: Item_cache(THD *thd, const Type_handler *handler): - Item(thd), + Item_fixed_hybrid(thd), Type_handler_hybrid_field_type(handler), example(0), cached_field(0), value_cached(0), @@ -6829,6 +6841,7 @@ protected: maybe_null= 1; null_value= 1; null_value_inside= true; + fixed= 1; } public: @@ -6880,10 +6893,17 @@ public: } return mark_unsupported_function("cache", arg, VCOL_IMPOSSIBLE); } + bool fix_fields(THD *thd, Item **ref) override + { + fixed= 1; + if (example && !example->is_fixed()) + return example->fix_fields(thd, ref); + return 0; + } void cleanup() override { clear(); - Item::cleanup(); + Item_fixed_hybrid::cleanup(); } /** Check if saved item has a non-NULL value. |