summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/sql/item.h b/sql/item.h
index 6a9d401b101..5eab1d049f0 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -624,6 +624,13 @@ class st_select_lex_unit;
class Item_func_not;
class Item_splocal;
+/* Item::common_flags */
+/* Indicates that name of this Item autogenerated or set by user */
+#define IS_AUTO_GENERATED_NAME 1
+/* Indicates that this item is in CYCLE clause of WITH */
+#define IS_IN_WITH_CYCLE 2
+
+
/**
String_copier that sends Item specific warnings.
*/
@@ -931,8 +938,9 @@ public:
True if any item except Item_sum contains a field. Set during parsing.
*/
bool with_field;
- bool is_autogenerated_name; /* indicate was name of this Item
- autogenerated or set by user */
+ uint8 common_flags;
+ bool is_autogenerated_name()
+ { return (common_flags & IS_AUTO_GENERATED_NAME); }
// alloc & destruct is done as start of select on THD::mem_root
Item(THD *thd);
/*
@@ -1815,6 +1823,15 @@ public:
virtual bool need_parentheses_in_default() { return false; }
virtual void save_in_result_field(bool no_conversions) {}
/*
+ Data type format implied by the CHECK CONSTRAINT,
+ to be sent to the client in the result set metadata.
+ */
+ virtual bool set_format_by_check_constraint(Send_field_extended_metadata *)
+ const
+ {
+ return false;
+ }
+ /*
set value of aggregate function in case of no rows for grouping were found
*/
virtual void no_rows_in_result() {}
@@ -7028,6 +7045,7 @@ public:
name= item->name;
Type_std_attributes::set(*attr);
maybe_null= maybe_null_arg;
+ common_flags= item->common_flags;
}
const Type_handler *type_handler() const