Skip to content
Browse files

Moving the "ha_field_option_struct *option_struct" member from

Column_definition to Create_field, as it's not needed neither
for make_field(), nor for SP variables, SP parameters, SP return values.
  • Loading branch information...
abarkov committed Dec 4, 2015
1 parent aee0680 commit 12b86beac8e395eb9aeada820f83a0737949f937
Showing with 8 additions and 6 deletions.
  1. +0 −1 sql/
  2. +8 −5 sql/field.h
@@ -10329,7 +10329,6 @@ Column_definition::Column_definition(THD *thd, Field *old_field,
decimals= old_field->decimals();
vcol_info= old_field->vcol_info;
option_list= old_field->option_list;
option_struct= old_field->option_struct;

switch (sql_type) {
@@ -3455,8 +3455,6 @@ class Column_definition: public Sql_alloc
uint32 srid;
Field::geometry_type geom_type;
engine_option_value *option_list;
/** structure with parsed options (for comparing fields in ALTER TABLE) */
ha_field_option_struct *option_struct;

uint pack_flag;

@@ -3472,7 +3470,7 @@ class Column_definition: public Sql_alloc
def(0), on_update(0), sql_type(MYSQL_TYPE_NULL),
flags(0), pack_length(0), key_length(0), interval(0),
srid(0), geom_type(Field::GEOM_GEOMETRY),
option_list(NULL), option_struct(NULL),
@@ -3537,18 +3535,23 @@ class Create_field :public Column_definition
Field *field; // For alter table
TYPELIB *save_interval; // Temporary copy for the above
// Used only for UCS2 intervals

/** structure with parsed options (for comparing fields in ALTER TABLE) */
ha_field_option_struct *option_struct;
uint offset;
uint8 interval_id; // For rea_create_table
bool create_if_not_exists; // Used in ALTER TABLE IF NOT EXISTS

Column_definition(), change(0), after(0),
field(0), create_if_not_exists(false)
field(0), option_struct(NULL),
{ }
Create_field(THD *thd, Field *old_field, Field *orig_field):
Column_definition(thd, old_field, orig_field),
change(old_field->field_name), after(0),
field(old_field), create_if_not_exists(false)
field(old_field), option_struct(old_field->option_struct),
{ }
/* Used to make a clone of this object for ALTER/CREATE TABLE */
Create_field *clone(MEM_ROOT *mem_root) const;

0 comments on commit 12b86be

Please sign in to comment.
You can’t perform that action at this time.