diff options
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sql/table.h b/sql/table.h index f1c6e269c66..f4ef7aeb8c2 100644 --- a/sql/table.h +++ b/sql/table.h @@ -347,19 +347,14 @@ enum field_visibility_t { }; #define INVISIBLE_MAX_BITS 3 -/* We will store the info into 3rd bit if field is hash field */ -#define HASH_FIELD_MASK 15 -#define HASH_FIELD_MASK_SHIFT 4 #define HA_HASH_FIELD_LENGTH 8 #define HA_HASH_KEY_LENGTH_WITHOUT_NULL 8 #define HA_HASH_KEY_LENGTH_WITH_NULL 9 -const LEX_CSTRING ha_hash_str {STRING_WITH_LEN("HASH")}; - int find_field_pos_in_hash(Item *hash_item, const char * field_name); -int fields_in_hash_keyinfo(KEY *keyinfo); +inline int fields_in_hash_keyinfo(KEY *keyinfo); inline void setup_keyinfo_hash(KEY *key_info); @@ -367,7 +362,7 @@ inline void re_setup_keyinfo_hash(KEY *key_info); Field * field_ptr_in_hash_str(Item *hash_item, int index); -void calc_hash_for_unique(ulong &nr1, ulong &nr2, String *str); +inline void calc_hash_for_unique(ulong &nr1, ulong &nr2, String *str); void create_update_handler(THD *thd, TABLE *table); @@ -1138,10 +1133,10 @@ public: uchar *check_unique_buf; handler *update_handler; /* Handler used in case of update */ /* - In the case of write row for long unique we are unable of find - Whick key is voilated. Because we in case of duplicate hash we never reach + In the case of write row for long unique we are unable to find + which key is violated. Because we in case of duplicate hash we never reach handler write_row function. So print_error will always print that - key 0 is voilated. We store which key is voilated in this variable + key 0 is violated. We store which key is violated in this variable by default this should be initialized to -1 */ int dupp_hash_key; @@ -2969,7 +2964,6 @@ void append_unescaped(String *res, const char *pos, size_t length); void prepare_frm_header(THD *thd, uint reclength, uchar *fileinfo, HA_CREATE_INFO *create_info, uint keys, KEY *key_info); const char *fn_frm_ext(const char *name); -void calc_hash_for_unique(ulong &nr1, ulong &nr2, String *str); /* Check that the integer is in the internal */ static inline int set_zone(int nr,int min_zone,int max_zone) |