Commit 13989b36 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: remove useless internal fied flag

parent 4434c5ce
...@@ -3452,7 +3452,6 @@ static char *fieldflags2str(uint f) { ...@@ -3452,7 +3452,6 @@ static char *fieldflags2str(uint f) {
ff2s_check_flag(NUM); ff2s_check_flag(NUM);
ff2s_check_flag(PART_KEY); ff2s_check_flag(PART_KEY);
ff2s_check_flag(GROUP); ff2s_check_flag(GROUP);
ff2s_check_flag(UNIQUE);
ff2s_check_flag(BINCMP); ff2s_check_flag(BINCMP);
ff2s_check_flag(ON_UPDATE_NOW); ff2s_check_flag(ON_UPDATE_NOW);
#undef ff2s_check_flag #undef ff2s_check_flag
......
...@@ -139,7 +139,6 @@ enum enum_server_command ...@@ -139,7 +139,6 @@ enum enum_server_command
#define NUM_FLAG 32768 /* Field is num (for clients) */ #define NUM_FLAG 32768 /* Field is num (for clients) */
#define PART_KEY_FLAG 16384 /* Intern; Part of some key */ #define PART_KEY_FLAG 16384 /* Intern; Part of some key */
#define GROUP_FLAG 32768 /* Intern: Group field */ #define GROUP_FLAG 32768 /* Intern: Group field */
#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */
#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */ #define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */
#define GET_FIXED_FIELDS_FLAG (1 << 18) /* Used to get fields in item tree */ #define GET_FIXED_FIELDS_FLAG (1 << 18) /* Used to get fields in item tree */
#define FIELD_IN_PART_FUNC_FLAG (1 << 19)/* Field part of partition func */ #define FIELD_IN_PART_FUNC_FLAG (1 << 19)/* Field part of partition func */
......
...@@ -6148,7 +6148,7 @@ field_spec: ...@@ -6148,7 +6148,7 @@ field_spec:
if (f->flags & PRI_KEY_FLAG) if (f->flags & PRI_KEY_FLAG)
add_key_to_list(lex, &$1, Key::PRIMARY, Lex->check_exists); add_key_to_list(lex, &$1, Key::PRIMARY, Lex->check_exists);
else if (f->flags & (UNIQUE_FLAG | UNIQUE_KEY_FLAG)) else if (f->flags & UNIQUE_KEY_FLAG)
add_key_to_list(lex, &$1, Key::UNIQUE, Lex->check_exists); add_key_to_list(lex, &$1, Key::UNIQUE, Lex->check_exists);
} }
; ;
...@@ -6194,13 +6194,13 @@ vcol_attribute: ...@@ -6194,13 +6194,13 @@ vcol_attribute:
UNIQUE_SYM UNIQUE_SYM
{ {
LEX *lex=Lex; LEX *lex=Lex;
lex->last_field->flags|= UNIQUE_FLAG; lex->last_field->flags|= UNIQUE_KEY_FLAG;
lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
} }
| UNIQUE_SYM KEY_SYM | UNIQUE_SYM KEY_SYM
{ {
LEX *lex=Lex; LEX *lex=Lex;
lex->last_field->flags|= UNIQUE_FLAG; lex->last_field->flags|= UNIQUE_KEY_FLAG;
lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
} }
| COMMENT_SYM TEXT_STRING_sys { Lex->last_field->comment= $2; } | COMMENT_SYM TEXT_STRING_sys { Lex->last_field->comment= $2; }
...@@ -6407,7 +6407,7 @@ field_type: ...@@ -6407,7 +6407,7 @@ field_type:
{ {
$$.set(MYSQL_TYPE_LONGLONG); $$.set(MYSQL_TYPE_LONGLONG);
Lex->last_field->flags|= (AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNSIGNED_FLAG | Lex->last_field->flags|= (AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNSIGNED_FLAG |
UNIQUE_FLAG); UNIQUE_KEY_FLAG);
} }
; ;
...@@ -6544,7 +6544,7 @@ attribute: ...@@ -6544,7 +6544,7 @@ attribute:
| SERIAL_SYM DEFAULT VALUE_SYM | SERIAL_SYM DEFAULT VALUE_SYM
{ {
LEX *lex=Lex; LEX *lex=Lex;
lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_FLAG; lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_KEY_FLAG;
lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
} }
| opt_primary KEY_SYM | opt_primary KEY_SYM
...@@ -6556,7 +6556,7 @@ attribute: ...@@ -6556,7 +6556,7 @@ attribute:
| UNIQUE_SYM | UNIQUE_SYM
{ {
LEX *lex=Lex; LEX *lex=Lex;
lex->last_field->flags|= UNIQUE_FLAG; lex->last_field->flags|= UNIQUE_KEY_FLAG;
lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
} }
| UNIQUE_SYM KEY_SYM | UNIQUE_SYM KEY_SYM
......
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