Skip to content

Commit 12b86be

Browse files
author
Alexander Barkov
committed
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.
1 parent aee0680 commit 12b86be

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

sql/field.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10329,7 +10329,6 @@ Column_definition::Column_definition(THD *thd, Field *old_field,
1032910329
decimals= old_field->decimals();
1033010330
vcol_info= old_field->vcol_info;
1033110331
option_list= old_field->option_list;
10332-
option_struct= old_field->option_struct;
1033310332

1033410333
switch (sql_type) {
1033510334
case MYSQL_TYPE_BLOB:

sql/field.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3455,8 +3455,6 @@ class Column_definition: public Sql_alloc
34553455
uint32 srid;
34563456
Field::geometry_type geom_type;
34573457
engine_option_value *option_list;
3458-
/** structure with parsed options (for comparing fields in ALTER TABLE) */
3459-
ha_field_option_struct *option_struct;
34603458

34613459
uint pack_flag;
34623460

@@ -3472,7 +3470,7 @@ class Column_definition: public Sql_alloc
34723470
def(0), on_update(0), sql_type(MYSQL_TYPE_NULL),
34733471
flags(0), pack_length(0), key_length(0), interval(0),
34743472
srid(0), geom_type(Field::GEOM_GEOMETRY),
3475-
option_list(NULL), option_struct(NULL),
3473+
option_list(NULL),
34763474
vcol_info(0)
34773475
{
34783476
interval_list.empty();
@@ -3537,18 +3535,23 @@ class Create_field :public Column_definition
35373535
Field *field; // For alter table
35383536
TYPELIB *save_interval; // Temporary copy for the above
35393537
// Used only for UCS2 intervals
3538+
3539+
/** structure with parsed options (for comparing fields in ALTER TABLE) */
3540+
ha_field_option_struct *option_struct;
35403541
uint offset;
35413542
uint8 interval_id; // For rea_create_table
35423543
bool create_if_not_exists; // Used in ALTER TABLE IF NOT EXISTS
35433544

35443545
Create_field():
35453546
Column_definition(), change(0), after(0),
3546-
field(0), create_if_not_exists(false)
3547+
field(0), option_struct(NULL),
3548+
create_if_not_exists(false)
35473549
{ }
35483550
Create_field(THD *thd, Field *old_field, Field *orig_field):
35493551
Column_definition(thd, old_field, orig_field),
35503552
change(old_field->field_name), after(0),
3551-
field(old_field), create_if_not_exists(false)
3553+
field(old_field), option_struct(old_field->option_struct),
3554+
create_if_not_exists(false)
35523555
{ }
35533556
/* Used to make a clone of this object for ALTER/CREATE TABLE */
35543557
Create_field *clone(MEM_ROOT *mem_root) const;

0 commit comments

Comments
 (0)