Skip to content

Commit

Permalink
Moving members' initialization from LEX::init_last_field
Browse files Browse the repository at this point in the history
to constructor Create_field::Create_field().
  • Loading branch information
Alexander Barkov committed Apr 25, 2015
1 parent ecb009b commit 4681699
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
11 changes: 8 additions & 3 deletions sql/field.h
Expand Up @@ -2900,6 +2900,7 @@ class Field_bit_as_char: public Field_bit {
};


extern const LEX_STRING null_lex_str;
/*
Create field class for CREATE TABLE
*/
Expand Down Expand Up @@ -2954,9 +2955,13 @@ class Create_field :public Sql_alloc
*/
bool stored_in_db;

Create_field() :after(0), pack_length(0), key_length(0), interval(0),
srid(0), field(0), option_list(NULL), option_struct(NULL),
create_if_not_exists(false), stored_in_db(true)
Create_field() :change(0), after(0), comment(null_lex_str),
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),
field(0), option_list(NULL), option_struct(NULL),
create_if_not_exists(false), vcol_info(0),
stored_in_db(true)
{
interval_list.empty();
}
Expand Down
9 changes: 0 additions & 9 deletions sql/sql_yacc.yy
Expand Up @@ -864,15 +864,6 @@ void LEX::init_last_field(Create_field *field, const char *name, CHARSET_INFO *c
last_field= field;

field->field_name= name;
field->flags= 0;
field->def= 0;
field->on_update= 0;
field->sql_type= MYSQL_TYPE_NULL;
field->change= 0;
field->geom_type= Field::GEOM_GEOMETRY;
field->comment= null_lex_str;
field->vcol_info= 0;
field->interval_list.empty();

/* reset LEX fields that are used in Create_field::set_and_check() */
length= 0;
Expand Down

0 comments on commit 4681699

Please sign in to comment.