diff options
author | unknown <igor@rurik.mysql.com> | 2003-10-30 10:45:28 -0800 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2003-10-30 10:45:28 -0800 |
commit | 52e86548c2ed957e1bef549c38a5b391cd3f47c6 (patch) | |
tree | bfd8508896ec045400e82650920bcfd37e53a8f1 /isam | |
parent | a4161274ef18a38eff95272cf9f05f46fb08fcb7 (diff) | |
parent | 06ecf87e15d8e8d7ae24aa23ccead4a2c4bbc78e (diff) | |
download | mariadb-git-52e86548c2ed957e1bef549c38a5b391cd3f47c6.tar.gz |
Merge
include/my_base.h:
Auto merged
include/my_global.h:
Auto merged
include/my_sys.h:
Auto merged
isam/test2.c:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/mi_test2.c:
Auto merged
myisam/myisamchk.c:
Auto merged
myisam/myisamdef.h:
Auto merged
mysql-test/r/func_group.result:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_test.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/mysqld.cc:
SCCS merged
sql/set_var.cc:
SCCS merged
Diffstat (limited to 'isam')
-rw-r--r-- | isam/_locking.c | 4 | ||||
-rw-r--r-- | isam/_page.c | 24 | ||||
-rw-r--r-- | isam/close.c | 3 | ||||
-rw-r--r-- | isam/isamchk.c | 13 | ||||
-rw-r--r-- | isam/isamlog.c | 8 | ||||
-rw-r--r-- | isam/panic.c | 2 | ||||
-rw-r--r-- | isam/test2.c | 4 | ||||
-rw-r--r-- | isam/test3.c | 2 |
8 files changed, 35 insertions, 25 deletions
diff --git a/isam/_locking.c b/isam/_locking.c index be9741a4237..0ffb46a81f8 100644 --- a/isam/_locking.c +++ b/isam/_locking.c @@ -50,7 +50,7 @@ int nisam_lock_database(N_INFO *info, int lock_type) else count= --share->w_locks; if (info->lock_type == F_WRLCK && !share->w_locks && - flush_key_blocks(share->kfile,FLUSH_KEEP)) + flush_key_blocks(*dflt_keycache,share->kfile,FLUSH_KEEP)) error=my_errno; if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED)) if (end_io_cache(&info->rec_cache)) @@ -329,7 +329,7 @@ int _nisam_test_if_changed(register N_INFO *info) share->state.uniq != info->last_uniq) { /* Keyfile has changed */ if (share->state.process != share->this_process) - VOID(flush_key_blocks(share->kfile,FLUSH_RELEASE)); + VOID(flush_key_blocks(*dflt_keycache,share->kfile,FLUSH_RELEASE)); share->last_process=share->state.process; info->last_loop= share->state.loop; info->last_uniq= share->state.uniq; diff --git a/isam/_page.c b/isam/_page.c index 65733d66b77..60f1dfb0ce6 100644 --- a/isam/_page.c +++ b/isam/_page.c @@ -27,10 +27,11 @@ uchar *_nisam_fetch_keypage(register N_INFO *info, N_KEYDEF *keyinfo, my_off_t page, uchar *buff, int return_buffer) { uchar *tmp; - tmp=(uchar*) key_cache_read(info->s->kfile,page,(byte*) buff, - (uint) keyinfo->base.block_length, - (uint) keyinfo->base.block_length, - return_buffer); + tmp=(uchar*) key_cache_read(*dflt_keycache, + info->s->kfile,page,DFLT_INIT_HITS,(byte*) buff, + (uint) keyinfo->base.block_length, + (uint) keyinfo->base.block_length, + return_buffer); if (tmp == info->buff) { info->update|=HA_STATE_BUFF_SAVED; @@ -83,9 +84,11 @@ int _nisam_write_keypage(register N_INFO *info, register N_KEYDEF *keyinfo, length=keyinfo->base.block_length; } #endif - return (key_cache_write(info->s->kfile,page,(byte*) buff,length, - (uint) keyinfo->base.block_length, - (int) (info->lock_type != F_UNLCK))); + return (key_cache_write(*dflt_keycache, + info->s->kfile,page,DFLT_INIT_HITS, + (byte*) buff,length, + (uint) keyinfo->base.block_length, + (int) (info->lock_type != F_UNLCK))); } /* nisam_write_keypage */ @@ -99,7 +102,9 @@ int _nisam_dispose(register N_INFO *info, N_KEYDEF *keyinfo, my_off_t pos) old_link=info->s->state.key_del[keynr]; info->s->state.key_del[keynr]=(ulong) pos; - DBUG_RETURN(key_cache_write(info->s->kfile,pos,(byte*) &old_link, + DBUG_RETURN(key_cache_write(*dflt_keycache, + info->s->kfile,pos,DFLT_INIT_HITS, + (byte*) &old_link, sizeof(long), (uint) keyinfo->base.block_length, (int) (info->lock_type != F_UNLCK))); @@ -126,7 +131,8 @@ ulong _nisam_new(register N_INFO *info, N_KEYDEF *keyinfo) } else { - if (!key_cache_read(info->s->kfile,pos, + if (!key_cache_read(*dflt_keycache, + info->s->kfile,pos,DFLT_INIT_HITS, (byte*) &info->s->state.key_del[keynr], (uint) sizeof(long), (uint) keyinfo->base.block_length,0)) diff --git a/isam/close.c b/isam/close.c index f1465990100..37b35e450ae 100644 --- a/isam/close.c +++ b/isam/close.c @@ -56,7 +56,8 @@ int nisam_close(register N_INFO *info) if (flag) { - if (share->kfile >= 0 && flush_key_blocks(share->kfile,FLUSH_RELEASE)) + if (share->kfile >= 0 && + flush_key_blocks(*dflt_keycache,share->kfile,FLUSH_RELEASE)) error=my_errno; if (share->kfile >= 0 && my_close(share->kfile,MYF(0))) error = my_errno; diff --git a/isam/isamchk.c b/isam/isamchk.c index 939a4be732f..e59da07e85b 100644 --- a/isam/isamchk.c +++ b/isam/isamchk.c @@ -516,7 +516,8 @@ static int nisamchk(my_string filename) if (!rep_quick) { if (testflag & T_EXTEND) - VOID(init_key_cache(use_buffers)); + VOID(init_key_cache(dflt_keycache,KEY_CACHE_BLOCK_SIZE, + use_buffers,&dflt_key_cache_var)); VOID(init_io_cache(&read_cache,datafile,(uint) read_buffer_length, READ_CACHE,share->pack.header_length,1, MYF(MY_WME))); @@ -1459,7 +1460,8 @@ my_string name; printf("Data records: %lu\n",(ulong) share->state.records); } - VOID(init_key_cache(use_buffers)); + VOID(init_key_cache(dflt_keycache,KEY_CACHE_BLOCK_SIZE,use_buffers, + &dflt_key_cache_var)); if (init_io_cache(&read_cache,info->dfile,(uint) read_buffer_length, READ_CACHE,share->pack.header_length,1,MYF(MY_WME))) goto err; @@ -1887,12 +1889,12 @@ static void lock_memory(void) static int flush_blocks(file) File file; { - if (flush_key_blocks(file,FLUSH_RELEASE)) + if (flush_key_blocks(dflt_keycache,file,FLUSH_RELEASE)) { print_error("%d when trying to write bufferts",my_errno); return(1); } - end_key_cache(); + end_key_cache(dflt_keycache,1); return 0; } /* flush_blocks */ @@ -1936,7 +1938,8 @@ int write_info; if (share->state.key_root[sort_key] == NI_POS_ERROR) DBUG_RETURN(0); /* Nothing to do */ - init_key_cache(use_buffers); + init_key_cache(dflt_keycache,KEY_CACHE_BLOCK_SIZE,use_buffers, + &dflt_key_cache_var); if (init_io_cache(&info->rec_cache,-1,(uint) write_buffer_length, WRITE_CACHE,share->pack.header_length,1, MYF(MY_WME | MY_WAIT_IF_FULL))) diff --git a/isam/isamlog.c b/isam/isamlog.c index ff3bca39e40..d8ea9d4ed80 100644 --- a/isam/isamlog.c +++ b/isam/isamlog.c @@ -329,8 +329,8 @@ static int examine_log(my_string file_name, char **table_names) bzero((gptr) com_count,sizeof(com_count)); init_tree(&tree,0,0,sizeof(file_info),(qsort_cmp2) file_info_compare,1, (tree_element_free) file_info_free, NULL); - VOID(init_key_cache(KEY_CACHE_SIZE)); - + VOID(init_key_cache(dflt_keycache,KEY_CACHE_BLOCK_SIZE,KEY_CACHE_SIZE, + &dflt_key_cache_var)); files_open=0; access_time=0; while (access_time++ != number_of_commands && !my_b_read(&cache,(byte*) head,9)) @@ -622,7 +622,7 @@ static int examine_log(my_string file_name, char **table_names) goto end; } } - end_key_cache(); + end_key_cache(dflt_keycache,1); delete_tree(&tree); VOID(end_io_cache(&cache)); VOID(my_close(file,MYF(0))); @@ -642,7 +642,7 @@ static int examine_log(my_string file_name, char **table_names) llstr(isamlog_filepos,llbuff))); fflush(stderr); end: - end_key_cache(); + end_key_cache(dflt_keycache,1); delete_tree(&tree); VOID(end_io_cache(&cache)); VOID(my_close(file,MYF(0))); diff --git a/isam/panic.c b/isam/panic.c index e51e83671df..de765f50e62 100644 --- a/isam/panic.c +++ b/isam/panic.c @@ -48,7 +48,7 @@ int nisam_panic(enum ha_panic_function flag) if (info->s->base.options & HA_OPTION_READ_ONLY_DATA) break; #endif - if (flush_key_blocks(info->s->kfile,FLUSH_RELEASE)) + if (flush_key_blocks(*dflt_keycache,info->s->kfile,FLUSH_RELEASE)) error=my_errno; if (info->opt_flag & WRITE_CACHE_USED) if (flush_io_cache(&info->rec_cache)) diff --git a/isam/test2.c b/isam/test2.c index 5b09cc8b716..67b411d1bbf 100644 --- a/isam/test2.c +++ b/isam/test2.c @@ -156,7 +156,7 @@ int main(int argc, char *argv[]) goto err; printf("- Writing key:s\n"); if (key_cacheing) - init_key_cache(IO_SIZE*16); /* Use a small cache */ + init_key_cache(dflt_keycache,512,IO_SIZE*16,0); /* Use a small cache */ if (locking) nisam_lock_database(file,F_WRLCK); if (write_cacheing) @@ -674,7 +674,7 @@ end: puts("Locking used"); if (use_blob) puts("blobs used"); - end_key_cache(); + end_key_cache(&dflt_keycache,1); if (blob_buffer) my_free(blob_buffer,MYF(0)); my_end(MY_CHECK_ERROR | MY_GIVE_INFO); diff --git a/isam/test3.c b/isam/test3.c index 228030f5832..1b867ba0348 100644 --- a/isam/test3.c +++ b/isam/test3.c @@ -173,7 +173,7 @@ void start_test(int id) exit(1); } if (key_cacheing && rnd(2) == 0) - init_key_cache(65536L); + init_key_cache(dflt_keycache,512,65536L,0); printf("Process %d, pid: %d\n",id,(int) getpid()); fflush(stdout); for (error=i=0 ; i < tests && !error; i++) |