Commit 12b86bea authored by Alexander Barkov's avatar Alexander Barkov

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.
parent aee06808
...@@ -10329,7 +10329,6 @@ Column_definition::Column_definition(THD *thd, Field *old_field, ...@@ -10329,7 +10329,6 @@ Column_definition::Column_definition(THD *thd, Field *old_field,
decimals= old_field->decimals(); decimals= old_field->decimals();
vcol_info= old_field->vcol_info; vcol_info= old_field->vcol_info;
option_list= old_field->option_list; option_list= old_field->option_list;
option_struct= old_field->option_struct;
switch (sql_type) { switch (sql_type) {
case MYSQL_TYPE_BLOB: case MYSQL_TYPE_BLOB:
......
...@@ -3455,8 +3455,6 @@ class Column_definition: public Sql_alloc ...@@ -3455,8 +3455,6 @@ class Column_definition: public Sql_alloc
uint32 srid; uint32 srid;
Field::geometry_type geom_type; Field::geometry_type geom_type;
engine_option_value *option_list; engine_option_value *option_list;
/** structure with parsed options (for comparing fields in ALTER TABLE) */
ha_field_option_struct *option_struct;
uint pack_flag; uint pack_flag;
...@@ -3472,7 +3470,7 @@ class Column_definition: public Sql_alloc ...@@ -3472,7 +3470,7 @@ class Column_definition: public Sql_alloc
def(0), on_update(0), sql_type(MYSQL_TYPE_NULL), def(0), on_update(0), sql_type(MYSQL_TYPE_NULL),
flags(0), pack_length(0), key_length(0), interval(0), flags(0), pack_length(0), key_length(0), interval(0),
srid(0), geom_type(Field::GEOM_GEOMETRY), srid(0), geom_type(Field::GEOM_GEOMETRY),
option_list(NULL), option_struct(NULL), option_list(NULL),
vcol_info(0) vcol_info(0)
{ {
interval_list.empty(); interval_list.empty();
...@@ -3537,18 +3535,23 @@ class Create_field :public Column_definition ...@@ -3537,18 +3535,23 @@ class Create_field :public Column_definition
Field *field; // For alter table Field *field; // For alter table
TYPELIB *save_interval; // Temporary copy for the above TYPELIB *save_interval; // Temporary copy for the above
// Used only for UCS2 intervals // Used only for UCS2 intervals
/** structure with parsed options (for comparing fields in ALTER TABLE) */
ha_field_option_struct *option_struct;
uint offset; uint offset;
uint8 interval_id; // For rea_create_table uint8 interval_id; // For rea_create_table
bool create_if_not_exists; // Used in ALTER TABLE IF NOT EXISTS bool create_if_not_exists; // Used in ALTER TABLE IF NOT EXISTS
Create_field(): Create_field():
Column_definition(), change(0), after(0), Column_definition(), change(0), after(0),
field(0), create_if_not_exists(false) field(0), option_struct(NULL),
create_if_not_exists(false)
{ } { }
Create_field(THD *thd, Field *old_field, Field *orig_field): Create_field(THD *thd, Field *old_field, Field *orig_field):
Column_definition(thd, old_field, orig_field), Column_definition(thd, old_field, orig_field),
change(old_field->field_name), after(0), change(old_field->field_name), after(0),
field(old_field), create_if_not_exists(false) field(old_field), option_struct(old_field->option_struct),
create_if_not_exists(false)
{ } { }
/* Used to make a clone of this object for ALTER/CREATE TABLE */ /* Used to make a clone of this object for ALTER/CREATE TABLE */
Create_field *clone(MEM_ROOT *mem_root) const; Create_field *clone(MEM_ROOT *mem_root) const;
......
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