Skip to content

Commit 13989b3

Browse files
committed
cleanup: remove useless internal fied flag
1 parent 4434c5c commit 13989b3

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

client/mysql.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3452,7 +3452,6 @@ static char *fieldflags2str(uint f) {
34523452
ff2s_check_flag(NUM);
34533453
ff2s_check_flag(PART_KEY);
34543454
ff2s_check_flag(GROUP);
3455-
ff2s_check_flag(UNIQUE);
34563455
ff2s_check_flag(BINCMP);
34573456
ff2s_check_flag(ON_UPDATE_NOW);
34583457
#undef ff2s_check_flag

include/mysql_com.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ enum enum_server_command
139139
#define NUM_FLAG 32768 /* Field is num (for clients) */
140140
#define PART_KEY_FLAG 16384 /* Intern; Part of some key */
141141
#define GROUP_FLAG 32768 /* Intern: Group field */
142-
#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */
143142
#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */
144143
#define GET_FIXED_FIELDS_FLAG (1 << 18) /* Used to get fields in item tree */
145144
#define FIELD_IN_PART_FUNC_FLAG (1 << 19)/* Field part of partition func */

sql/sql_yacc.yy

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6148,7 +6148,7 @@ field_spec:
61486148

61496149
if (f->flags & PRI_KEY_FLAG)
61506150
add_key_to_list(lex, &$1, Key::PRIMARY, Lex->check_exists);
6151-
else if (f->flags & (UNIQUE_FLAG | UNIQUE_KEY_FLAG))
6151+
else if (f->flags & UNIQUE_KEY_FLAG)
61526152
add_key_to_list(lex, &$1, Key::UNIQUE, Lex->check_exists);
61536153
}
61546154
;
@@ -6194,13 +6194,13 @@ vcol_attribute:
61946194
UNIQUE_SYM
61956195
{
61966196
LEX *lex=Lex;
6197-
lex->last_field->flags|= UNIQUE_FLAG;
6197+
lex->last_field->flags|= UNIQUE_KEY_FLAG;
61986198
lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
61996199
}
62006200
| UNIQUE_SYM KEY_SYM
62016201
{
62026202
LEX *lex=Lex;
6203-
lex->last_field->flags|= UNIQUE_FLAG;
6203+
lex->last_field->flags|= UNIQUE_KEY_FLAG;
62046204
lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
62056205
}
62066206
| COMMENT_SYM TEXT_STRING_sys { Lex->last_field->comment= $2; }
@@ -6407,7 +6407,7 @@ field_type:
64076407
{
64086408
$$.set(MYSQL_TYPE_LONGLONG);
64096409
Lex->last_field->flags|= (AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNSIGNED_FLAG |
6410-
UNIQUE_FLAG);
6410+
UNIQUE_KEY_FLAG);
64116411
}
64126412
;
64136413

@@ -6544,7 +6544,7 @@ attribute:
65446544
| SERIAL_SYM DEFAULT VALUE_SYM
65456545
{
65466546
LEX *lex=Lex;
6547-
lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_FLAG;
6547+
lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_KEY_FLAG;
65486548
lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
65496549
}
65506550
| opt_primary KEY_SYM
@@ -6556,7 +6556,7 @@ attribute:
65566556
| UNIQUE_SYM
65576557
{
65586558
LEX *lex=Lex;
6559-
lex->last_field->flags|= UNIQUE_FLAG;
6559+
lex->last_field->flags|= UNIQUE_KEY_FLAG;
65606560
lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX;
65616561
}
65626562
| UNIQUE_SYM KEY_SYM

0 commit comments

Comments
 (0)