Commit 94a6892e authored by unknown's avatar unknown

SCRUM

additions about DEFAULT in UPDATE and SELECT


sql/item.cc:
  Item_default_value::print added
sql/item.h:
  Some functions added with Sanja's suggestions
parent c50e1046
...@@ -1150,6 +1150,12 @@ bool Item_default_value::fix_fields(THD *thd, struct st_table_list *table_list, ...@@ -1150,6 +1150,12 @@ bool Item_default_value::fix_fields(THD *thd, struct st_table_list *table_list,
return 0; return 0;
} }
void Item_default_value::print(String *str)
{
str->append("default(");
arg->print(str);
str->append(')');
}
/* /*
If item is a const function, calculate it and return a const item If item is a const function, calculate it and return a const item
......
...@@ -674,6 +674,12 @@ public: ...@@ -674,6 +674,12 @@ public:
enum Type type() const { return DEFAULT_VALUE_ITEM; } enum Type type() const { return DEFAULT_VALUE_ITEM; }
bool eq(const Item *item, bool binary_cmp) const; bool eq(const Item *item, bool binary_cmp) const;
bool fix_fields(THD *, struct st_table_list *, Item **); bool fix_fields(THD *, struct st_table_list *, Item **);
bool check_loop(uint id)
{
return Item_field::check_loop(id) || arg->check_loop(id);
}
void set_outer_resolving() { arg->set_outer_resolving(); }
void print(String *str);
}; };
class Item_cache: public Item class Item_cache: public Item
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment