diff options
author | unknown <serg@sergbook.mysql.com> | 2002-07-24 21:57:37 +0200 |
---|---|---|
committer | unknown <serg@sergbook.mysql.com> | 2002-07-24 21:57:37 +0200 |
commit | 65366ce789f58e5bfcb192fc416f0f4021baf374 (patch) | |
tree | be34ba4c4758aacb417960c22f8cf3baa6b8536e /myisam | |
parent | cbef80af1d0db652a95fcb18059241e34e5f870a (diff) | |
parent | 2b5dc846b9a243e0cff26908a44c3e5fd7ca6e69 (diff) | |
download | mariadb-git-65366ce789f58e5bfcb192fc416f0f4021baf374.tar.gz |
Merge work:/home/bk/mysql-4.0
into sergbook.mysql.com:/usr/home/serg/Abk/mysql-4.0
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_create.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/myisam/mi_create.c b/myisam/mi_create.c index 91c2c64c3cf..c87607ee5b6 100644 --- a/myisam/mi_create.c +++ b/myisam/mi_create.c @@ -228,7 +228,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, if (uniques) { max_key_block_length= myisam_block_size; - max_key_length= MI_UNIQUE_HASH_LENGTH; + max_key_length= MI_UNIQUE_HASH_LENGTH; } for (i=0, keydef=keydefs ; i < keys ; i++ , keydef++) @@ -396,6 +396,9 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, uniquedef->key=keys+i; unique_key_parts+=uniquedef->keysegs; share.state.key_root[keys+i]= HA_OFFSET_ERROR; + tot_length+= (max_rows/(ulong) (((uint) myisam_block_size-5)/ + ((MI_UNIQUE_HASH_LENGTH + pointer)*2)))* + (ulong) myisam_block_size; } keys+=uniques; /* Each unique has 1 key */ key_segs+=uniques; /* Each unique has 1 key seg */ @@ -579,8 +582,8 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, tmp_keydef.block_length= myisam_block_size; tmp_keydef.keylength= MI_UNIQUE_HASH_LENGTH + pointer; tmp_keydef.minlength=tmp_keydef.maxlength=tmp_keydef.keylength; - tmp_keyseg.type= MI_UNIQUE_HASH_TYPE; - tmp_keyseg.length= MI_UNIQUE_HASH_LENGTH; + tmp_keyseg.type= MI_UNIQUE_HASH_TYPE; + tmp_keyseg.length= MI_UNIQUE_HASH_LENGTH; tmp_keyseg.start= offset; offset+= MI_UNIQUE_HASH_LENGTH; if (mi_keydef_write(file,&tmp_keydef) || |