diff options
author | unknown <monty@hundin.mysql.fi> | 2001-10-02 05:53:00 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-10-02 05:53:00 +0300 |
commit | 7cda1553badaa3ab519b5f54a5024ed2702f1446 (patch) | |
tree | b029d516fe4b48e540f64b01492d64cf5d68ad2f /myisam/mi_create.c | |
parent | fbb391209cf5485bce594e5bf469590f6940d90c (diff) | |
download | mariadb-git-7cda1553badaa3ab519b5f54a5024ed2702f1446.tar.gz |
Cleaned up SSL documentation
Fixes for embedded server
Made key_cache more configurable
Fixed that one can change key blocksize in MyISAM
A lot of optimizations to make MyISAM slightly faster
Docs/manual.texi:
Cleaned up SSL documentation
client/mysql.cc:
Fixes for embedded server
client/mysqltest.c:
Fixes for embedded server
Removed memory and file leaks
include/my_global.h:
Added C_MODE_START / C_MODE_END macros
include/my_sys.h:
Made key_cache more configurable
include/myisam.h:
Fixed that one can change MyISAM key block size
include/mysql.h:
Fixes for embedded server
libmysql/libmysql.c:
Cleanup
libmysqld/Makefile.am:
Cleanup
libmysqld/examples/test-run:
Added --debug
libmysqld/lib_sql.cc:
Cleanup
libmysqld/libmysqld.c:
Cleanup
myisam/ft_boolean_search.c:
Optimized mi_key_cmp to be faster
myisam/ft_nlq_search.c:
Optimized mi_key_cmp to be faster
myisam/ft_search.c:
Optimized mi_key_cmp to be faster
myisam/mi_changed.c:
Optimized mi_key_cmp to be faster
myisam/mi_check.c:
Optimized mi_key_cmp to be faster
myisam/mi_create.c:
Fixed that one can change blocksize by changing myisam_block_size
myisam/mi_delete.c:
Optimized mi_key_cmp to be faster
myisam/mi_delete_all.c:
Optimized mi_key_cmp to be faster
myisam/mi_dynrec.c:
Speed optimizations
myisam/mi_info.c:
Speed optimizations
myisam/mi_key.c:
Speed optimizations
myisam/mi_locking.c:
Speed optimizations
myisam/mi_open.c:
Fixed that one can change blocksize by changing myisam_block_size
myisam/mi_page.c:
Fixed that one can change blocksize by changing myisam_block_size
myisam/mi_range.c:
Speed optimizations
myisam/mi_rkey.c:
Speed optimizations
myisam/mi_rnext.c:
Speed optimizations
myisam/mi_rnext_same.c:
Speed optimizations
myisam/mi_rprev.c:
Speed optimizations
myisam/mi_rsame.c:
Speed optimizations
myisam/mi_search.c:
Speed optimizations
myisam/mi_static.c:
Fixed that one can change blocksize by changing myisam_block_size
myisam/mi_statrec.c:
Speed optimizations
myisam/mi_test2.c:
Added more test options
myisam/mi_test_all.res:
Added more test options
myisam/mi_test_all.sh:
Added more test options
myisam/mi_write.c:
Speed optimizations
myisam/myisamchk.c:
Added options to change block size and repair checksums
myisam/myisamdef.h:
Speed optimizations
mysys/Makefile.am:
Added bit handling functions
mysys/mf_keycache.c:
Made key_cache more configurable
mysys/my_init.c:
made my_init_done global
scripts/mysql_fix_privilege_tables.sh:
Fixes for SSL
scripts/mysql_install_db.sh:
Fixes for SSL
sql/derror.cc:
Don't call exit, call unireg_abort()
sql/item_cmpfunc.cc:
Speed optimizations
sql/item_cmpfunc.h:
Speed optimizations
sql/mysql_priv.h:
Fixes for embedded server
sql/mysqld.cc:
Fixes for embedded server
Diffstat (limited to 'myisam/mi_create.c')
-rw-r--r-- | myisam/mi_create.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/myisam/mi_create.c b/myisam/mi_create.c index 7033cd59639..aad0300c978 100644 --- a/myisam/mi_create.c +++ b/myisam/mi_create.c @@ -227,8 +227,8 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, share.state.key_del=key_del; if (uniques) { - max_key_block_length= MI_KEY_BLOCK_LENGTH; - max_key_length= MI_UNIQUE_HASH_LENGTH; + max_key_block_length= myisam_block_size; + max_key_length= MI_UNIQUE_HASH_LENGTH; } for (i=0, keydef=keydefs ; i < keys ; i++ , keydef++) @@ -370,7 +370,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, share.state.rec_per_key_part[key_segs-1]=1L; length+=key_length; keydef->block_length= MI_BLOCK_SIZE(length,pointer,MI_MAX_KEYPTR_SIZE); - if (keydef->block_length/MI_KEY_BLOCK_LENGTH > MI_MAX_KEY_BLOCK_SIZE) + if (keydef->block_length > MI_MAX_KEY_BLOCK_LENGTH) { my_errno=HA_WRONG_CREATE_OPTION; goto err; @@ -386,7 +386,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, (length*2)))* (ulong) keydef->block_length; } - for (i=max_key_block_length/MI_KEY_BLOCK_LENGTH ; i-- ; ) + for (i=max_key_block_length/MI_MIN_KEY_BLOCK_LENGTH ; i-- ; ) key_del[i]=HA_OFFSET_ERROR; unique_key_parts=0; @@ -401,7 +401,8 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, key_segs+=uniques; /* Each unique has 1 key seg */ base_pos=(MI_STATE_INFO_SIZE + keys * MI_STATE_KEY_SIZE + - max_key_block_length/MI_KEY_BLOCK_LENGTH*MI_STATE_KEYBLOCK_SIZE+ + max_key_block_length/MI_MIN_KEY_BLOCK_LENGTH* + MI_STATE_KEYBLOCK_SIZE+ key_segs*MI_STATE_KEYSEG_SIZE); info_length=base_pos+(uint) (MI_BASE_INFO_SIZE+ keys * MI_KEYDEF_SIZE+ @@ -420,7 +421,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, mi_int2store(share.state.header.base_pos,base_pos); share.state.header.language= (ci->language ? ci->language : MY_CHARSET_CURRENT); - share.state.header.max_block_size=max_key_block_length/MI_KEY_BLOCK_LENGTH; + share.state.header.max_block_size=max_key_block_length/MI_MIN_KEY_BLOCK_LENGTH; share.state.dellink = HA_OFFSET_ERROR; share.state.process= (ulong) getpid(); @@ -433,7 +434,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, share.base.rec_reflength=pointer; share.base.key_reflength= mi_get_pointer_length((tot_length + max_key_block_length * keys * - MI_INDEX_BLOCK_MARGIN) / MI_KEY_BLOCK_LENGTH, + MI_INDEX_BLOCK_MARGIN) / MI_MIN_KEY_BLOCK_LENGTH, 3); share.base.keys= share.state.header.keys = keys; share.state.header.uniques= uniques; @@ -575,7 +576,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, { tmp_keydef.keysegs=1; tmp_keydef.flag= HA_UNIQUE_CHECK; - tmp_keydef.block_length= MI_KEY_BLOCK_LENGTH; + 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; |