[Commits] e6d8475: cleanup: remove useless internal fied flag

serg at mariadb.org serg at mariadb.org
Tue Nov 24 16:56:10 EET 2015


revision-id: e6d847523b3f2b870ab131ef7ce6b79f72b62426 (mariadb-10.1.8-64-ge6d8475)
parent(s): 80ca997faa4894d39cf354c62293d2e2213de9f5
committer: Sergei Golubchik
timestamp: 2015-11-24 15:55:04 +0100
message:

cleanup: remove useless internal fied flag

---
 client/mysql.cc     |  1 -
 include/mysql_com.h |  1 -
 sql/sql_yacc.yy     | 12 ++++++------
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/client/mysql.cc b/client/mysql.cc
index 29e39b6..3e08c87 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -3452,7 +3452,6 @@ static char *fieldflags2str(uint f) {
   ff2s_check_flag(NUM);
   ff2s_check_flag(PART_KEY);
   ff2s_check_flag(GROUP);
-  ff2s_check_flag(UNIQUE);
   ff2s_check_flag(BINCMP);
   ff2s_check_flag(ON_UPDATE_NOW);
 #undef ff2s_check_flag
diff --git a/include/mysql_com.h b/include/mysql_com.h
index a3790a4..aa6ab0f 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -139,7 +139,6 @@ enum enum_server_command
 #define NUM_FLAG	32768		/* Field is num (for clients) */
 #define PART_KEY_FLAG	16384		/* Intern; Part of some key */
 #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 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 */
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 5c9cd7c..e47bd43 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -6148,7 +6148,7 @@ field_spec:
 
             if (f->flags & PRI_KEY_FLAG)
               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);
           }
         ;
@@ -6194,13 +6194,13 @@ vcol_attribute:
           UNIQUE_SYM
           {
             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;
           }
         | UNIQUE_SYM KEY_SYM
           {
             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;
           }
         | COMMENT_SYM TEXT_STRING_sys { Lex->last_field->comment= $2; }
@@ -6407,7 +6407,7 @@ field_type:
           {
             $$.set(MYSQL_TYPE_LONGLONG);
             Lex->last_field->flags|= (AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNSIGNED_FLAG |
-              UNIQUE_FLAG);
+              UNIQUE_KEY_FLAG);
           }
         ;
 
@@ -6544,7 +6544,7 @@ attribute:
         | SERIAL_SYM DEFAULT VALUE_SYM
           { 
             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;
           }
         | opt_primary KEY_SYM
@@ -6556,7 +6556,7 @@ attribute:
         | UNIQUE_SYM
           {
             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;
           }
         | UNIQUE_SYM KEY_SYM


More information about the commits mailing list