Commit f7a9f446 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: remove unused keyinfo flag

HA_UNIQUE_CHECK was
* only used internally by MyISAM/Aria
* only used for internal temporary tables (for DISTINCT)
* never saved in frm
* saved in MYI/MAD but only for temporary tables
* only set, never checked

it's safe to remove it and free the bit (there are only 16 of them)
parent 383baa81
...@@ -268,17 +268,15 @@ enum ha_base_keytype { ...@@ -268,17 +268,15 @@ enum ha_base_keytype {
#define HA_NOSAME 1U /* Set if not dupplicated records */ #define HA_NOSAME 1U /* Set if not dupplicated records */
#define HA_PACK_KEY 2U /* Pack string key to previous key */ #define HA_PACK_KEY 2U /* Pack string key to previous key */
#define HA_AUTO_KEY 16U #define HA_AUTO_KEY 16U /* MEMORY/MyISAM/Aria internal */
#define HA_BINARY_PACK_KEY 32U /* Packing of all keys to prev key */ #define HA_BINARY_PACK_KEY 32U /* Packing of all keys to prev key */
#define HA_FULLTEXT 128U /* For full-text search */ #define HA_FULLTEXT 128U /* For full-text search */
#define HA_UNIQUE_CHECK 256U /* Check the key for uniqueness */
#define HA_SPATIAL 1024U /* For spatial search */ #define HA_SPATIAL 1024U /* For spatial search */
#define HA_NULL_ARE_EQUAL 2048U /* NULL in key are cmp as equal */ #define HA_NULL_ARE_EQUAL 2048U /* NULL in key are cmp as equal */
#define HA_GENERATED_KEY 8192U /* Automatically generated key */ #define HA_GENERATED_KEY 8192U /* Automatically generated key */
/* The combination of the above can be used for key type comparison. */ /* The combination of the above can be used for key type comparison. */
#define HA_KEYFLAG_MASK (HA_NOSAME | HA_AUTO_KEY | \ #define HA_KEYFLAG_MASK (HA_NOSAME | HA_AUTO_KEY | HA_FULLTEXT | \
HA_FULLTEXT | HA_UNIQUE_CHECK | \
HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY) HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY)
/* /*
......
...@@ -980,7 +980,6 @@ int maria_create(const char *name, enum data_file_type datafile_type, ...@@ -980,7 +980,6 @@ int maria_create(const char *name, enum data_file_type datafile_type,
for (i=0; i < uniques ; i++) for (i=0; i < uniques ; i++)
{ {
tmp_keydef.keysegs=1; tmp_keydef.keysegs=1;
tmp_keydef.flag= HA_UNIQUE_CHECK;
tmp_keydef.block_length= (uint16) maria_block_size; tmp_keydef.block_length= (uint16) maria_block_size;
tmp_keydef.keylength= MARIA_UNIQUE_HASH_LENGTH + pointer; tmp_keydef.keylength= MARIA_UNIQUE_HASH_LENGTH + pointer;
tmp_keydef.minlength=tmp_keydef.maxlength=tmp_keydef.keylength; tmp_keydef.minlength=tmp_keydef.maxlength=tmp_keydef.keylength;
......
...@@ -754,7 +754,6 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, ...@@ -754,7 +754,6 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
for (i=0; i < uniques ; i++) for (i=0; i < uniques ; i++)
{ {
tmp_keydef.keysegs=1; tmp_keydef.keysegs=1;
tmp_keydef.flag= HA_UNIQUE_CHECK;
tmp_keydef.block_length= (uint16)myisam_block_size; tmp_keydef.block_length= (uint16)myisam_block_size;
tmp_keydef.keylength= MI_UNIQUE_HASH_LENGTH + pointer; tmp_keydef.keylength= MI_UNIQUE_HASH_LENGTH + pointer;
tmp_keydef.minlength=tmp_keydef.maxlength=tmp_keydef.keylength; tmp_keydef.minlength=tmp_keydef.maxlength=tmp_keydef.keylength;
......
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