diff options
author | Michael Widenius <monty@askmonty.org> | 2014-07-19 17:46:08 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2014-07-19 17:46:08 +0300 |
commit | f0f2072d1fe2616a734e3d100f251516c3f2e0b2 (patch) | |
tree | e49597b4ef92d725a4ccf0c6e85deb9dd81825e7 /storage | |
parent | ff205b25d543f87c8b79afc3ea0013017e751cd9 (diff) | |
download | mariadb-git-f0f2072d1fe2616a734e3d100f251516c3f2e0b2.tar.gz |
Fixed problem with very slow shutdown when using 100,000 MyISAM tables with delay_key_write
Reason for the problem was that the hash of changed files in the key cache was too small (was 128). Fixed by making the hash size larger and changeable.
- Introduced key-cache-file-hash-size (default 512) for MyISAM and aria_pagecache_file_hash_size (default 512) for Aria.
- Added new status variable "Feature_delay_key_write" which counts number of tables opened that are using delay_key_write
mysql-test/r/features.result:
Added test of Feature_delay_key_write
mysql-test/r/key_cache.result:
Updated tests as the number of blocks has changed
mysql-test/r/mysqld--help.result:
Updated result
mysql-test/suite/maria/maria3.result:
Updated result
mysql-test/suite/sys_vars/r/key_cache_file_hash_size_basic.result:
Test new variable
mysql-test/suite/sys_vars/t/aria_pagecache_file_hash_size_basic.test:
Test new variable
mysql-test/suite/sys_vars/t/key_cache_file_hash_size_basic.test:
Test new variable
mysql-test/t/features.test:
Added test of Feature_delay_key_write
mysql-test/t/key_cache.test:
Updated tests as the number of blocks has changed
mysys/mf_keycache.c:
Made CHANGED_BLOCKS_HASH dynamic
sql/handler.cc:
Updated call to init_key_cache()
sql/mysqld.cc:
Added "Feature_delay_key_write"
Added support for key-cache-file-hash-size
sql/mysqld.h:
Added support for key-cache-file-hash-size
sql/sql_class.h:
Added feature_files_opened_with_delayed_keys
sql/sys_vars.cc:
Added key_cache_file_hash_size
storage/maria/ha_maria.cc:
Added pagecache_file_hash_size
Added counting of files with delay_key_write
storage/maria/ma_checkpoint.c:
Fixed compiler warning
storage/maria/ma_pagecache.c:
Made PAGECACHE_CHANGED_BLOCKS_HASH into a variable
storage/maria/ma_pagecache.h:
Made PAGECACHE_CHANGED_BLOCKS_HASH into a variable
storage/maria/ma_rt_test.c:
Updated parameters for init_pagecache()
storage/maria/ma_test1.c:
Updated parameters for init_pagecache()
storage/maria/ma_test2.c:
Updated parameters for init_pagecache()
storage/maria/ma_test3.c:
Updated parameters for init_pagecache()
storage/maria/maria_chk.c:
Updated parameters for init_pagecache()
storage/maria/maria_ftdump.c:
Updated parameters for init_pagecache()
storage/maria/maria_pack.c:
Updated parameters for init_pagecache()
storage/maria/maria_read_log.c:
Updated parameters for init_pagecache()
storage/maria/unittest/ma_pagecache_consist.c:
Updated parameters for init_pagecache()
storage/maria/unittest/ma_pagecache_rwconsist.c:
Updated parameters for init_pagecache()
storage/maria/unittest/ma_pagecache_rwconsist2.c:
Updated parameters for init_pagecache()
storage/maria/unittest/ma_pagecache_single.c:
Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler-t.c:
Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_noflush-t.c:
Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_nologs-t.c:
Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_purge-t.c:
Updated parameters for init_pagecache()
storage/myisam/ha_myisam.cc:
Added counting of files with delay_key_write
storage/myisam/mi_check.c:
Updated call to init_key_cache()
storage/myisam/mi_test1.c:
Updated call to init_key_cache()
storage/myisam/mi_test2.c:
Updated call to init_key_cache()
storage/myisam/mi_test3.c:
Updated call to init_key_cache()
storage/myisam/mi_test_all.sh:
Fixed broken test
storage/myisam/myisam_ftdump.c:
Updated call to init_key_cache()
storage/myisam/myisamchk.c:
Updated call to init_key_cache()
storage/myisam/myisamlog.c:
Updated call to init_key_cache()
Diffstat (limited to 'storage')
34 files changed, 122 insertions, 104 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 081e90f89f7..fd98166a19f 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -57,7 +57,7 @@ C_MODE_END #endif #define THD_TRN (*(TRN **)thd_ha_data(thd, maria_hton)) -ulong pagecache_division_limit, pagecache_age_threshold; +ulong pagecache_division_limit, pagecache_age_threshold, pagecache_file_hash_size; ulonglong pagecache_buffer_size; const char *zerofill_error_msg= "Table is from another system and must be zerofilled or repaired to be " @@ -250,6 +250,13 @@ static MYSQL_SYSVAR_ULONG(pagecache_division_limit, pagecache_division_limit, "The minimum percentage of warm blocks in key cache", 0, 0, 100, 1, 100, 1); +static MYSQL_SYSVAR_ULONG(pagecache_file_hash_size, pagecache_file_hash_size, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "Number of hash buckets for open and changed files. If you have a lot of Aria " + "files open you should increase this for faster flush of changes. A good " + "value is probably 1/10 of number of possible open Aria files.", 0,0, + 512, 128, 16384, 1); + static MYSQL_SYSVAR_SET(recover, maria_recover_options, PLUGIN_VAR_OPCMDARG, "Specifies how corrupted tables should be automatically repaired." " Possible values are one or more of \"NORMAL\" (the default), " @@ -1236,6 +1243,14 @@ int ha_maria::open(const char *name, int mode, uint test_if_locked) table->key_info[i].block_size= file->s->keyinfo[i].block_length; } my_errno= 0; + + /* Count statistics of usage for newly open normal files */ + if (file->s->reopen == 1 && ! (test_if_locked & HA_OPEN_TMP_TABLE)) + { + if (file->s->delay_key_write) + feature_files_opened_with_delayed_keys++; + } + return my_errno; } @@ -3520,10 +3535,11 @@ static int ha_maria_init(void *p) mark_recovery_start(log_dir)) || !init_pagecache(maria_pagecache, (size_t) pagecache_buffer_size, pagecache_division_limit, - pagecache_age_threshold, maria_block_size, 0) || + pagecache_age_threshold, maria_block_size, pagecache_file_hash_size, + 0) || !init_pagecache(maria_log_pagecache, TRANSLOG_PAGECACHE_SIZE, 0, 0, - TRANSLOG_PAGE_SIZE, 0) || + TRANSLOG_PAGE_SIZE, 0, 0) || translog_init(maria_data_root, log_file_size, MYSQL_VERSION_ID, server_id, maria_log_pagecache, TRANSLOG_DEFAULT_FLAGS, 0) || @@ -3639,6 +3655,7 @@ struct st_mysql_sys_var* system_variables[]= { MYSQL_SYSVAR(pagecache_age_threshold), MYSQL_SYSVAR(pagecache_buffer_size), MYSQL_SYSVAR(pagecache_division_limit), + MYSQL_SYSVAR(pagecache_file_hash_size), MYSQL_SYSVAR(recover), MYSQL_SYSVAR(repair_threads), MYSQL_SYSVAR(sort_buffer_size), diff --git a/storage/maria/ma_checkpoint.c b/storage/maria/ma_checkpoint.c index e4adf5fbccd..de8a9610a64 100644 --- a/storage/maria/ma_checkpoint.c +++ b/storage/maria/ma_checkpoint.c @@ -230,7 +230,7 @@ static int really_execute_checkpoint(void) sizeof(checkpoint_start_log_horizon_char); for (i= 0; i < (sizeof(record_pieces)/sizeof(record_pieces[0])); i++) { - log_array[TRANSLOG_INTERNAL_PARTS + 1 + i].str= record_pieces[i].str; + log_array[TRANSLOG_INTERNAL_PARTS + 1 + i].str= (uchar*) record_pieces[i].str; log_array[TRANSLOG_INTERNAL_PARTS + 1 + i].length= record_pieces[i].length; total_rec_length+= (translog_size_t) record_pieces[i].length; } diff --git a/storage/maria/ma_pagecache.c b/storage/maria/ma_pagecache.c index 8e8ecf945f0..bb085bbdc7a 100644 --- a/storage/maria/ma_pagecache.c +++ b/storage/maria/ma_pagecache.c @@ -502,7 +502,7 @@ static void test_key_cache(PAGECACHE *pagecache, #define PAGECACHE_HASH(p, f, pos) (((ulong) (pos) + \ (ulong) (f).file) & (p->hash_entries-1)) -#define FILE_HASH(f) ((uint) (f).file & (PAGECACHE_CHANGED_BLOCKS_HASH - 1)) +#define FILE_HASH(f,cache) ((uint) (f).file & (cache->changed_blocks_hash_size-1)) #define DEFAULT_PAGECACHE_DEBUG_LOG "pagecache_debug.log" @@ -743,7 +743,8 @@ static inline uint next_power(uint value) ulong init_pagecache(PAGECACHE *pagecache, size_t use_mem, uint division_limit, uint age_threshold, - uint block_size, myf my_readwrite_flags) + uint block_size, uint changed_blocks_hash_size, + myf my_readwrite_flags) { ulong blocks, hash_links, length; int error; @@ -786,6 +787,10 @@ ulong init_pagecache(PAGECACHE *pagecache, size_t use_mem, 2 * sizeof(PAGECACHE_HASH_LINK) + sizeof(PAGECACHE_HASH_LINK*) * 5/4 + block_size)); + /* Changed blocks hash needs to be a power of 2 */ + changed_blocks_hash_size= my_round_up_to_next_power(MY_MAX(changed_blocks_hash_size, + MIN_PAGECACHE_CHANGED_BLOCKS_HASH_SIZE)); + /* We need to support page cache with just one block to be able to do scanning of rows-in-block files @@ -809,10 +814,11 @@ ulong init_pagecache(PAGECACHE *pagecache, size_t use_mem, hash_links= MAX_THREADS + blocks - 1; #endif while ((length= (ALIGN_SIZE(blocks * sizeof(PAGECACHE_BLOCK_LINK)) + - ALIGN_SIZE(hash_links * sizeof(PAGECACHE_HASH_LINK)) + ALIGN_SIZE(sizeof(PAGECACHE_HASH_LINK*) * - pagecache->hash_entries))) + - (blocks << pagecache->shift) > use_mem) + pagecache->hash_entries) + + ALIGN_SIZE(hash_links * sizeof(PAGECACHE_HASH_LINK)) + + sizeof(PAGECACHE_BLOCK_LINK*)* (changed_blocks_hash_size*2))) + + (blocks << pagecache->shift) > use_mem && blocks > 8) blocks--; /* Allocate memory for cache page buffers */ if ((pagecache->block_mem= @@ -823,8 +829,17 @@ ulong init_pagecache(PAGECACHE *pagecache, size_t use_mem, Allocate memory for blocks, hash_links and hash entries; For each block 2 hash links are allocated */ - if ((pagecache->block_root= - (PAGECACHE_BLOCK_LINK*) my_malloc((size_t) length, MYF(0)))) + if (my_multi_malloc(MYF(MY_ZEROFILL), + &pagecache->block_root, blocks * sizeof(PAGECACHE_BLOCK_LINK), + &pagecache->hash_root, + sizeof(PAGECACHE_HASH_LINK*) * pagecache->hash_entries, + &pagecache->hash_link_root, + hash_links * sizeof(PAGECACHE_HASH_LINK), + &pagecache->changed_blocks, + sizeof(PAGECACHE_BLOCK_LINK*) * changed_blocks_hash_size, + &pagecache->file_blocks, + sizeof(PAGECACHE_BLOCK_LINK*) * changed_blocks_hash_size, + NullS)) break; my_large_free(pagecache->block_mem); pagecache->block_mem= 0; @@ -834,19 +849,6 @@ ulong init_pagecache(PAGECACHE *pagecache, size_t use_mem, pagecache->blocks_unused= blocks; pagecache->disk_blocks= (long) blocks; pagecache->hash_links= hash_links; - pagecache->hash_root= - (PAGECACHE_HASH_LINK**) ((char*) pagecache->block_root + - ALIGN_SIZE(blocks*sizeof(PAGECACHE_BLOCK_LINK))); - pagecache->hash_link_root= - (PAGECACHE_HASH_LINK*) ((char*) pagecache->hash_root + - ALIGN_SIZE((sizeof(PAGECACHE_HASH_LINK*) * - pagecache->hash_entries))); - bzero((uchar*) pagecache->block_root, - pagecache->disk_blocks * sizeof(PAGECACHE_BLOCK_LINK)); - bzero((uchar*) pagecache->hash_root, - pagecache->hash_entries * sizeof(PAGECACHE_HASH_LINK*)); - bzero((uchar*) pagecache->hash_link_root, - pagecache->hash_links * sizeof(PAGECACHE_HASH_LINK)); pagecache->hash_links_used= 0; pagecache->free_hash_list= NULL; pagecache->blocks_used= pagecache->blocks_changed= 0; @@ -866,6 +868,7 @@ ulong init_pagecache(PAGECACHE *pagecache, size_t use_mem, pagecache->age_threshold= (age_threshold ? blocks * age_threshold / 100 : blocks); + pagecache->changed_blocks_hash_size= changed_blocks_hash_size; pagecache->cnt_for_resize_op= 0; pagecache->resize_in_flush= 0; @@ -879,12 +882,6 @@ ulong init_pagecache(PAGECACHE *pagecache, size_t use_mem, pagecache->disk_blocks, (long) pagecache->block_root, pagecache->hash_entries, (long) pagecache->hash_root, pagecache->hash_links, (long) pagecache->hash_link_root)); - bzero((uchar*) pagecache->changed_blocks, - sizeof(pagecache->changed_blocks[0]) * - PAGECACHE_CHANGED_BLOCKS_HASH); - bzero((uchar*) pagecache->file_blocks, - sizeof(pagecache->file_blocks[0]) * - PAGECACHE_CHANGED_BLOCKS_HASH); pagecache->blocks= pagecache->disk_blocks > 0 ? pagecache->disk_blocks : 0; DBUG_RETURN((ulong) pagecache->disk_blocks); @@ -980,12 +977,11 @@ static int flush_all_key_blocks(PAGECACHE *pagecache) #if NOT_USED /* keep disabled until code is fixed see above !! */ ulong resize_pagecache(PAGECACHE *pagecache, size_t use_mem, uint division_limit, - uint age_threshold) + uint age_threshold, uint changed_blocks_hash_size) { ulong blocks; struct st_my_thread_var *thread; WQUEUE *wqueue; - DBUG_ENTER("resize_pagecache"); if (!pagecache->inited) @@ -1028,7 +1024,7 @@ ulong resize_pagecache(PAGECACHE *pagecache, end_pagecache(pagecache, 0); /* Don't free mutex */ /* The following will work even if use_mem is 0 */ blocks= init_pagecache(pagecache, pagecache->block_size, use_mem, - division_limit, age_threshold, + division_limit, age_threshold, changed_blocks_hash_size, pagecache->readwrite_flags); finish: @@ -1237,7 +1233,7 @@ static void link_to_file_list(PAGECACHE *pagecache, { if (unlink_flag) unlink_changed(block); - link_changed(block, &pagecache->file_blocks[FILE_HASH(*file)]); + link_changed(block, &pagecache->file_blocks[FILE_HASH(*file, pagecache)]); if (block->status & PCBLOCK_CHANGED) { block->status&= ~(PCBLOCK_CHANGED | PCBLOCK_DEL_WRITE); @@ -1258,7 +1254,7 @@ static inline void link_to_changed_list(PAGECACHE *pagecache, { unlink_changed(block); link_changed(block, - &pagecache->changed_blocks[FILE_HASH(block->hash_link->file)]); + &pagecache->changed_blocks[FILE_HASH(block->hash_link->file, pagecache)]); block->status|=PCBLOCK_CHANGED; pagecache->blocks_changed++; pagecache->global_blocks_changed++; @@ -4578,7 +4574,7 @@ static int flush_pagecache_blocks_int(PAGECACHE *pagecache, Count how many key blocks we have to cache to be able to flush all dirty pages with minimum seek moves. */ - for (block= pagecache->changed_blocks[FILE_HASH(*file)] ; + for (block= pagecache->changed_blocks[FILE_HASH(*file, pagecache)] ; block; block= block->next_changed) { @@ -4603,7 +4599,7 @@ static int flush_pagecache_blocks_int(PAGECACHE *pagecache, /* Retrieve the blocks and write them to a buffer to be flushed */ restart: end= (pos= cache)+count; - for (block= pagecache->changed_blocks[FILE_HASH(*file)] ; + for (block= pagecache->changed_blocks[FILE_HASH(*file, pagecache)] ; block; block= next) { @@ -4729,7 +4725,7 @@ restart: #if defined(PAGECACHE_DEBUG) cnt=0; #endif - for (block= pagecache->file_blocks[FILE_HASH(*file)] ; + for (block= pagecache->file_blocks[FILE_HASH(*file, pagecache)] ; block; block= next) { @@ -4918,7 +4914,7 @@ my_bool pagecache_collect_changed_blocks_with_lsn(PAGECACHE *pagecache, } /* Count how many dirty pages are interesting */ - for (file_hash= 0; file_hash < PAGECACHE_CHANGED_BLOCKS_HASH; file_hash++) + for (file_hash= 0; file_hash < pagecache->changed_blocks_hash_size; file_hash++) { PAGECACHE_BLOCK_LINK *block; for (block= pagecache->changed_blocks[file_hash] ; @@ -4957,7 +4953,7 @@ my_bool pagecache_collect_changed_blocks_with_lsn(PAGECACHE *pagecache, DBUG_PRINT("info", ("found %lu dirty pages", stored_list_size)); if (stored_list_size == 0) goto end; - for (file_hash= 0; file_hash < PAGECACHE_CHANGED_BLOCKS_HASH; file_hash++) + for (file_hash= 0; file_hash < pagecache->changed_blocks_hash_size; file_hash++) { PAGECACHE_BLOCK_LINK *block; for (block= pagecache->changed_blocks[file_hash] ; @@ -5008,7 +5004,7 @@ void pagecache_file_no_dirty_page(PAGECACHE *pagecache, PAGECACHE_FILE *file) { File fd= file->file; PAGECACHE_BLOCK_LINK *block; - for (block= pagecache->changed_blocks[FILE_HASH(*file)]; + for (block= pagecache->changed_blocks[FILE_HASH(*file, pagecache)]; block != NULL; block= block->next_changed) if (block->hash_link->file.file == fd) diff --git a/storage/maria/ma_pagecache.h b/storage/maria/ma_pagecache.h index 8460eaddc57..f7ddb2fe716 100644 --- a/storage/maria/ma_pagecache.h +++ b/storage/maria/ma_pagecache.h @@ -104,7 +104,9 @@ typedef struct st_pagecache_hash_link PAGECACHE_HASH_LINK; #include <wqueue.h> -#define PAGECACHE_CHANGED_BLOCKS_HASH 128 /* must be power of 2 */ +/* Default size of hash for changed files */ +#define MIN_PAGECACHE_CHANGED_BLOCKS_HASH_SIZE 512 + #define PAGECACHE_PRIORITY_LOW 0 #define PAGECACHE_PRIORITY_DEFAULT 3 #define PAGECACHE_PRIORITY_HIGH 6 @@ -121,6 +123,7 @@ typedef struct st_pagecache ulong age_threshold; /* age threshold for hot blocks */ ulonglong time; /* total number of block link operations */ ulong hash_entries; /* max number of entries in the hash table */ + ulong changed_blocks_hash_size; /* Number of hash buckets for file blocks */ long hash_links; /* max number of hash links */ long hash_links_used; /* number of hash links taken from free links pool */ long disk_blocks; /* max number of blocks in the cache */ @@ -145,9 +148,9 @@ typedef struct st_pagecache WQUEUE waiting_for_hash_link;/* waiting for a free hash link */ WQUEUE waiting_for_block; /* requests waiting for a free block */ /* hash for dirty file bl.*/ - PAGECACHE_BLOCK_LINK *changed_blocks[PAGECACHE_CHANGED_BLOCKS_HASH]; + PAGECACHE_BLOCK_LINK **changed_blocks; /* hash for other file bl.*/ - PAGECACHE_BLOCK_LINK *file_blocks[PAGECACHE_CHANGED_BLOCKS_HASH]; + PAGECACHE_BLOCK_LINK **file_blocks; /* The following variables are and variables used to hold parameters for @@ -195,10 +198,11 @@ extern PAGECACHE dflt_pagecache_var, *dflt_pagecache; extern ulong init_pagecache(PAGECACHE *pagecache, size_t use_mem, uint division_limit, uint age_threshold, - uint block_size, myf my_read_flags); + uint block_size, uint changed_blocks_hash_size, + myf my_read_flags); extern ulong resize_pagecache(PAGECACHE *pagecache, size_t use_mem, uint division_limit, - uint age_threshold); + uint age_threshold, uint changed_blocks_hash_size); extern void change_pagecache_param(PAGECACHE *pagecache, uint division_limit, uint age_threshold); diff --git a/storage/maria/ma_rt_test.c b/storage/maria/ma_rt_test.c index 29244bab6ce..9d8574212ca 100644 --- a/storage/maria/ma_rt_test.c +++ b/storage/maria/ma_rt_test.c @@ -100,11 +100,11 @@ int main(int argc, char *argv[]) /* Maria requires that we always have a page cache */ if (maria_init() || (init_pagecache(maria_pagecache, maria_block_size * 16, 0, 0, - maria_block_size, MY_WME) == 0) || + maria_block_size, 0, MY_WME) == 0) || ma_control_file_open(TRUE, TRUE) || (init_pagecache(maria_log_pagecache, TRANSLOG_PAGECACHE_SIZE, 0, 0, - TRANSLOG_PAGE_SIZE, MY_WME) == 0) || + TRANSLOG_PAGE_SIZE, 0, MY_WME) == 0) || translog_init(maria_data_root, TRANSLOG_FILE_SIZE, 0, 0, maria_log_pagecache, TRANSLOG_DEFAULT_FLAGS, 0) || diff --git a/storage/maria/ma_test1.c b/storage/maria/ma_test1.c index 595b87ef4d0..901a7ef06e3 100644 --- a/storage/maria/ma_test1.c +++ b/storage/maria/ma_test1.c @@ -79,11 +79,11 @@ int main(int argc,char *argv[]) /* Maria requires that we always have a page cache */ if (maria_init() || (init_pagecache(maria_pagecache, maria_block_size * 16, 0, 0, - maria_block_size, MY_WME) == 0) || + maria_block_size, 0, MY_WME) == 0) || ma_control_file_open(TRUE, TRUE) || (init_pagecache(maria_log_pagecache, TRANSLOG_PAGECACHE_SIZE, 0, 0, - TRANSLOG_PAGE_SIZE, MY_WME) == 0) || + TRANSLOG_PAGE_SIZE, 0, MY_WME) == 0) || translog_init(maria_data_root, TRANSLOG_FILE_SIZE, 0, 0, maria_log_pagecache, TRANSLOG_DEFAULT_FLAGS, 0) || diff --git a/storage/maria/ma_test2.c b/storage/maria/ma_test2.c index 52c0839cff6..709a190c1a7 100644 --- a/storage/maria/ma_test2.c +++ b/storage/maria/ma_test2.c @@ -91,11 +91,11 @@ int main(int argc, char *argv[]) /* Maria requires that we always have a page cache */ if (maria_init() || (init_pagecache(maria_pagecache, pagecache_size, 0, 0, - maria_block_size, MY_WME) == 0) || + maria_block_size, 0, MY_WME) == 0) || ma_control_file_open(TRUE, TRUE) || (init_pagecache(maria_log_pagecache, TRANSLOG_PAGECACHE_SIZE, 0, 0, - TRANSLOG_PAGE_SIZE, MY_WME) == 0) || + TRANSLOG_PAGE_SIZE, 0, MY_WME) == 0) || translog_init(maria_data_root, TRANSLOG_FILE_SIZE, 0, 0, maria_log_pagecache, TRANSLOG_DEFAULT_FLAGS, 0) || diff --git a/storage/maria/ma_test3.c b/storage/maria/ma_test3.c index 64b22e45c1b..5d57bef8f9e 100644 --- a/storage/maria/ma_test3.c +++ b/storage/maria/ma_test3.c @@ -178,7 +178,7 @@ void start_test(int id) exit(1); } if (pagecacheing && rnd(2) == 0) - init_pagecache(maria_pagecache, 65536L, 0, 0, MARIA_KEY_BLOCK_LENGTH, + init_pagecache(maria_pagecache, 65536L, 0, 0, MARIA_KEY_BLOCK_LENGTH, 0, MY_WME); printf("Process %d, pid: %ld\n",id,(long) getpid()); fflush(stdout); diff --git a/storage/maria/maria_chk.c b/storage/maria/maria_chk.c index 9235d5ee96a..2ea647ea1f5 100644 --- a/storage/maria/maria_chk.c +++ b/storage/maria/maria_chk.c @@ -140,7 +140,7 @@ int main(int argc, char **argv) { if (init_pagecache(maria_log_pagecache, TRANSLOG_PAGECACHE_SIZE, 0, 0, - TRANSLOG_PAGE_SIZE, MY_WME) == 0 || + TRANSLOG_PAGE_SIZE, 0, MY_WME) == 0 || translog_init(opt_log_dir, TRANSLOG_FILE_SIZE, 0, 0, maria_log_pagecache, TRANSLOG_DEFAULT_FLAGS, 0)) @@ -1178,7 +1178,7 @@ static int maria_chk(HA_CHECK *param, char *filename) maria_lock_database(info, F_EXTRA_LCK); datafile= info->dfile.file; if (init_pagecache(maria_pagecache, (size_t) param->use_buffers, 0, 0, - maria_block_size, MY_WME) == 0) + maria_block_size, 0, MY_WME) == 0) { _ma_check_print_error(param, "Can't initialize page cache with %lu memory", (ulong) param->use_buffers); diff --git a/storage/maria/maria_ftdump.c b/storage/maria/maria_ftdump.c index 68e13a8ddc4..4e34678c8f8 100644 --- a/storage/maria/maria_ftdump.c +++ b/storage/maria/maria_ftdump.c @@ -85,7 +85,7 @@ int main(int argc,char *argv[]) } init_pagecache(maria_pagecache, PAGE_BUFFER_INIT, 0, 0, - MARIA_KEY_BLOCK_LENGTH, MY_WME); + MARIA_KEY_BLOCK_LENGTH, 0, MY_WME); if (!(info=maria_open(argv[0], O_RDONLY, HA_OPEN_ABORT_IF_LOCKED|HA_OPEN_FROM_SQL_LAYER))) diff --git a/storage/maria/maria_pack.c b/storage/maria/maria_pack.c index 26d57ade59a..7eca9e14e93 100644 --- a/storage/maria/maria_pack.c +++ b/storage/maria/maria_pack.c @@ -511,7 +511,7 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table) fn_format(org_name,isam_file->s->open_file_name.str, "",MARIA_NAME_DEXT, 2+4+16); if (init_pagecache(maria_pagecache, MARIA_MIN_PAGE_CACHE_SIZE, 0, 0, - maria_block_size, MY_WME) == 0) + maria_block_size, 0, MY_WME) == 0) { fprintf(stderr, "Can't initialize page cache\n"); goto err; diff --git a/storage/maria/maria_read_log.c b/storage/maria/maria_read_log.c index f5b91f9628f..8fa6533bc46 100644 --- a/storage/maria/maria_read_log.c +++ b/storage/maria/maria_read_log.c @@ -70,7 +70,7 @@ int main(int argc, char **argv) goto err; } if (init_pagecache(maria_pagecache, opt_page_buffer_size, 0, 0, - maria_block_size, MY_WME) == 0) + maria_block_size, 0, MY_WME) == 0) { fprintf(stderr, "Got error in init_pagecache() (errno: %d)\n", errno); goto err; @@ -82,7 +82,7 @@ int main(int argc, char **argv) which is useless. TODO: start log handler in read-only mode. */ if (init_pagecache(maria_log_pagecache, opt_translog_buffer_size, - 0, 0, TRANSLOG_PAGE_SIZE, MY_WME) == 0 || + 0, 0, TRANSLOG_PAGE_SIZE, 0, MY_WME) == 0 || translog_init(maria_data_root, TRANSLOG_FILE_SIZE, 0, 0, maria_log_pagecache, TRANSLOG_DEFAULT_FLAGS, opt_display_only)) diff --git a/storage/maria/unittest/ma_pagecache_consist.c b/storage/maria/unittest/ma_pagecache_consist.c index 6a25a47591c..5f0e25b5bf4 100644 --- a/storage/maria/unittest/ma_pagecache_consist.c +++ b/storage/maria/unittest/ma_pagecache_consist.c @@ -431,7 +431,7 @@ int main(int argc __attribute__((unused)), #endif if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, - TEST_PAGE_SIZE, 0)) == 0) + TEST_PAGE_SIZE, 0, 0)) == 0) { diag("Got error: init_pagecache() (errno: %d)\n", errno); diff --git a/storage/maria/unittest/ma_pagecache_rwconsist.c b/storage/maria/unittest/ma_pagecache_rwconsist.c index 7afdbfd0ac1..1a268db6ad5 100644 --- a/storage/maria/unittest/ma_pagecache_rwconsist.c +++ b/storage/maria/unittest/ma_pagecache_rwconsist.c @@ -301,7 +301,7 @@ int main(int argc __attribute__((unused)), #endif if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, - TEST_PAGE_SIZE, 0)) == 0) + TEST_PAGE_SIZE, 0, 0)) == 0) { diag("Got error: init_pagecache() (errno: %d)\n", errno); diff --git a/storage/maria/unittest/ma_pagecache_rwconsist2.c b/storage/maria/unittest/ma_pagecache_rwconsist2.c index 917fddd0bcf..751c045a879 100644 --- a/storage/maria/unittest/ma_pagecache_rwconsist2.c +++ b/storage/maria/unittest/ma_pagecache_rwconsist2.c @@ -297,7 +297,7 @@ int main(int argc __attribute__((unused)), #endif if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, - TEST_PAGE_SIZE, 0)) == 0) + TEST_PAGE_SIZE, 0, 0)) == 0) { diag("Got error: init_pagecache() (errno: %d)\n", errno); diff --git a/storage/maria/unittest/ma_pagecache_single.c b/storage/maria/unittest/ma_pagecache_single.c index 0031582589e..64f6782f20f 100644 --- a/storage/maria/unittest/ma_pagecache_single.c +++ b/storage/maria/unittest/ma_pagecache_single.c @@ -828,7 +828,7 @@ int main(int argc __attribute__((unused)), #endif if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, - TEST_PAGE_SIZE, MYF(MY_WME))) == 0) + TEST_PAGE_SIZE, 0, MYF(MY_WME))) == 0) { fprintf(stderr,"Got error: init_pagecache() (errno: %d)\n", errno); diff --git a/storage/maria/unittest/ma_test_loghandler-t.c b/storage/maria/unittest/ma_test_loghandler-t.c index abf2078ce8f..18650fa400d 100644 --- a/storage/maria/unittest/ma_test_loghandler-t.c +++ b/storage/maria/unittest/ma_test_loghandler-t.c @@ -147,7 +147,6 @@ int main(int argc __attribute__((unused)), char *argv[]) { uint32 i; uint32 rec_len; - uint pagen; uchar long_tr_id[6]; uchar lsn_buff[23]= { @@ -203,8 +202,8 @@ int main(int argc __attribute__((unused)), char *argv[]) fprintf(stderr, "Can't init control file (%d)\n", errno); exit(1); } - if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, - TRANSLOG_PAGE_SIZE, 0)) == 0) + if (init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, + TRANSLOG_PAGE_SIZE, 0, 0) == 0) { fprintf(stderr, "Got error: init_pagecache() (errno: %d)\n", errno); exit(1); diff --git a/storage/maria/unittest/ma_test_loghandler_first_lsn-t.c b/storage/maria/unittest/ma_test_loghandler_first_lsn-t.c index 9ebd56c754c..cf86b59da45 100644 --- a/storage/maria/unittest/ma_test_loghandler_first_lsn-t.c +++ b/storage/maria/unittest/ma_test_loghandler_first_lsn-t.c @@ -35,7 +35,6 @@ static const char *default_dbug_option; int main(int argc __attribute__((unused)), char *argv[]) { - uint pagen; uchar long_tr_id[6]; PAGECACHE pagecache; LSN lsn, first_lsn, theor_lsn; @@ -72,8 +71,8 @@ int main(int argc __attribute__((unused)), char *argv[]) fprintf(stderr, "Can't init control file (%d)\n", errno); exit(1); } - if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, - PCACHE_PAGE, 0)) == 0) + if (init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, + PCACHE_PAGE, 0, 0) == 0) { fprintf(stderr, "Got error: init_pagecache() (errno: %d)\n", errno); exit(1); diff --git a/storage/maria/unittest/ma_test_loghandler_max_lsn-t.c b/storage/maria/unittest/ma_test_loghandler_max_lsn-t.c index 4ae9def8598..855135451c3 100644 --- a/storage/maria/unittest/ma_test_loghandler_max_lsn-t.c +++ b/storage/maria/unittest/ma_test_loghandler_max_lsn-t.c @@ -36,7 +36,6 @@ static const char *default_dbug_option; int main(int argc __attribute__((unused)), char *argv[]) { ulong i; - uint pagen; uchar long_tr_id[6]; PAGECACHE pagecache; LSN lsn, max_lsn, last_lsn= LSN_IMPOSSIBLE; @@ -70,8 +69,8 @@ int main(int argc __attribute__((unused)), char *argv[]) fprintf(stderr, "Can't init control file (%d)\n", errno); exit(1); } - if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, - PCACHE_PAGE, 0)) == 0) + if (init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, + PCACHE_PAGE, 0, 0) == 0) { fprintf(stderr, "Got error: init_pagecache() (errno: %d)\n", errno); exit(1); diff --git a/storage/maria/unittest/ma_test_loghandler_multigroup-t.c b/storage/maria/unittest/ma_test_loghandler_multigroup-t.c index c8e63cb26ab..63d1f1c6977 100644 --- a/storage/maria/unittest/ma_test_loghandler_multigroup-t.c +++ b/storage/maria/unittest/ma_test_loghandler_multigroup-t.c @@ -226,7 +226,6 @@ int main(int argc __attribute__((unused)), char *argv[]) { uint32 i; uint32 rec_len; - uint pagen; uchar long_tr_id[6]; uchar lsn_buff[23]= { @@ -284,8 +283,8 @@ int main(int argc __attribute__((unused)), char *argv[]) fprintf(stderr, "Can't init control file (%d)\n", errno); exit(1); } - if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, - TRANSLOG_PAGE_SIZE, 0)) == 0) + if (init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, + TRANSLOG_PAGE_SIZE, 0, 0) == 0) { fprintf(stderr, "Got error: init_pagecache() (errno: %d)\n", errno); exit(1); @@ -447,8 +446,8 @@ int main(int argc __attribute__((unused)), char *argv[]) fprintf(stderr, "pass2: Can't init control file (%d)\n", errno); exit(1); } - if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, - TRANSLOG_PAGE_SIZE, 0)) == 0) + if (init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, + TRANSLOG_PAGE_SIZE, 0, 0) == 0) { fprintf(stderr, "pass2: Got error: init_pagecache() (errno: %d)\n", errno); exit(1); diff --git a/storage/maria/unittest/ma_test_loghandler_multithread-t.c b/storage/maria/unittest/ma_test_loghandler_multithread-t.c index 18fbaeace5a..535f363048b 100644 --- a/storage/maria/unittest/ma_test_loghandler_multithread-t.c +++ b/storage/maria/unittest/ma_test_loghandler_multithread-t.c @@ -261,7 +261,6 @@ int main(int argc __attribute__((unused)), char **argv __attribute__ ((unused))) { uint32 i; - uint pagen; PAGECACHE pagecache; LSN first_lsn; TRANSLOG_HEADER_BUFFER rec; @@ -341,8 +340,8 @@ int main(int argc __attribute__((unused)), fprintf(stderr, "Can't init control file (%d)\n", errno); exit(1); } - if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, - TRANSLOG_PAGE_SIZE, 0)) == 0) + if (init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, + TRANSLOG_PAGE_SIZE, 0, 0) == 0) { fprintf(stderr, "Got error: init_pagecache() (errno: %d)\n", errno); exit(1); diff --git a/storage/maria/unittest/ma_test_loghandler_noflush-t.c b/storage/maria/unittest/ma_test_loghandler_noflush-t.c index c8c0f7d1873..8d0af947574 100644 --- a/storage/maria/unittest/ma_test_loghandler_noflush-t.c +++ b/storage/maria/unittest/ma_test_loghandler_noflush-t.c @@ -34,7 +34,6 @@ static const char *default_dbug_option; int main(int argc __attribute__((unused)), char *argv[]) { - uint pagen; int rc= 1; uchar long_tr_id[6]; PAGECACHE pagecache; @@ -71,8 +70,8 @@ int main(int argc __attribute__((unused)), char *argv[]) fprintf(stderr, "Can't init control file (%d)\n", errno); exit(1); } - if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, - PCACHE_PAGE, 0)) == 0) + if (init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, + PCACHE_PAGE, 0, 0) == 0) { fprintf(stderr, "Got error: init_pagecache() (errno: %d)\n", errno); exit(1); diff --git a/storage/maria/unittest/ma_test_loghandler_nologs-t.c b/storage/maria/unittest/ma_test_loghandler_nologs-t.c index 24c93e428e1..5d6db7355c2 100644 --- a/storage/maria/unittest/ma_test_loghandler_nologs-t.c +++ b/storage/maria/unittest/ma_test_loghandler_nologs-t.c @@ -36,7 +36,6 @@ static const char *default_dbug_option; int main(int argc __attribute__((unused)), char *argv[]) { ulong i; - uint pagen; uchar long_tr_id[6]; PAGECACHE pagecache; LSN lsn; @@ -72,8 +71,8 @@ int main(int argc __attribute__((unused)), char *argv[]) fprintf(stderr, "Can't init control file (%d)\n", errno); exit(1); } - if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, - PCACHE_PAGE, 0)) == 0) + if (init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, + PCACHE_PAGE, 0, 0) == 0) { fprintf(stderr, "Got error: init_pagecache() (errno: %d)\n", errno); exit(1); @@ -145,8 +144,8 @@ int main(int argc __attribute__((unused)), char *argv[]) fprintf(stderr, "Can't init control file (%d)\n", errno); exit(1); } - if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, - PCACHE_PAGE, 0)) == 0) + if (init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, + PCACHE_PAGE, 0, 0) == 0) { fprintf(stderr, "Got error: init_pagecache() (errno: %d)\n", errno); exit(1); diff --git a/storage/maria/unittest/ma_test_loghandler_pagecache-t.c b/storage/maria/unittest/ma_test_loghandler_pagecache-t.c index a939cef71a7..e634506628a 100644 --- a/storage/maria/unittest/ma_test_loghandler_pagecache-t.c +++ b/storage/maria/unittest/ma_test_loghandler_pagecache-t.c @@ -64,7 +64,6 @@ dummy_fail_callback(uchar* data_ptr __attribute__((unused))) int main(int argc __attribute__((unused)), char *argv[]) { - uint pagen; uchar long_tr_id[6]; PAGECACHE pagecache; LSN lsn; @@ -99,8 +98,8 @@ int main(int argc __attribute__((unused)), char *argv[]) fprintf(stderr, "Can't init control file (%d)\n", errno); exit(1); } - if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, - PCACHE_PAGE, 0)) == 0) + if (init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, + PCACHE_PAGE, 0, 0) == 0) { fprintf(stderr, "Got error: init_pagecache() (errno: %d)\n", errno); exit(1); diff --git a/storage/maria/unittest/ma_test_loghandler_purge-t.c b/storage/maria/unittest/ma_test_loghandler_purge-t.c index 6ae0e7830ae..a13645f1bb8 100644 --- a/storage/maria/unittest/ma_test_loghandler_purge-t.c +++ b/storage/maria/unittest/ma_test_loghandler_purge-t.c @@ -73,7 +73,7 @@ int main(int argc __attribute__((unused)), char *argv[]) exit(1); } if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, - PCACHE_PAGE, 0)) == 0) + PCACHE_PAGE, 0, 0)) == 0) { fprintf(stderr, "Got error: init_pagecache() (errno: %d)\n", errno); exit(1); diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index bc4c5139810..ff3af8bac05 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -823,7 +823,15 @@ int ha_myisam::open(const char *name, int mode, uint test_if_locked) table->key_info[i].block_size= file->s->keyinfo[i].block_length; } my_errno= 0; + + /* Count statistics of usage for newly open normal files */ + if (file->s->reopen == 1 && ! (test_if_locked & HA_OPEN_TMP_TABLE)) + { + if (file->s->delay_key_write) + feature_files_opened_with_delayed_keys++; + } goto end; + err: this->close(); end: diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c index 3a2bdb2e899..b79d6c891f1 100644 --- a/storage/myisam/mi_check.c +++ b/storage/myisam/mi_check.c @@ -1536,7 +1536,7 @@ int mi_repair(HA_CHECK *param, register MI_INFO *info, if (!param->using_global_keycache) (void) init_key_cache(dflt_key_cache, param->key_cache_block_size, - (size_t) param->use_buffers, 0, 0, 0); + (size_t) param->use_buffers, 0, 0, 0, 0); if (init_io_cache(¶m->read_cache,info->dfile, (uint) param->read_buffer_length, diff --git a/storage/myisam/mi_test1.c b/storage/myisam/mi_test1.c index 87cea2e5566..d90a8549e1e 100644 --- a/storage/myisam/mi_test1.c +++ b/storage/myisam/mi_test1.c @@ -51,7 +51,7 @@ int main(int argc,char *argv[]) my_init(); if (key_cacheing) init_key_cache(dflt_key_cache,KEY_CACHE_BLOCK_SIZE,IO_SIZE*16,0,0, - DEFAULT_KEY_CACHE_PARTITIONS); + 0, DEFAULT_KEY_CACHE_PARTITIONS); get_options(argc,argv); exit(run_test("test1")); diff --git a/storage/myisam/mi_test2.c b/storage/myisam/mi_test2.c index e53c68874b2..be58b3c54d0 100644 --- a/storage/myisam/mi_test2.c +++ b/storage/myisam/mi_test2.c @@ -217,7 +217,7 @@ int main(int argc, char *argv[]) printf("- Writing key:s\n"); if (key_cacheing) init_key_cache(dflt_key_cache,key_cache_block_size,key_cache_size,0,0, - DEFAULT_KEY_CACHE_PARTITIONS); + 0, DEFAULT_KEY_CACHE_PARTITIONS); if (do_locking) mi_lock_database(file,F_WRLCK); if (write_cacheing) @@ -278,8 +278,9 @@ int main(int argc, char *argv[]) } } if (key_cacheing) - resize_key_cache(dflt_key_cache,key_cache_block_size,key_cache_size*2,0,0); - + resize_key_cache(dflt_key_cache,key_cache_block_size,key_cache_size*2, + 0, 0, 0); + if (!silent) printf("- Delete\n"); for (i=0 ; i<recant/10 ; i++) diff --git a/storage/myisam/mi_test3.c b/storage/myisam/mi_test3.c index 885118d4eec..e05398f7c4a 100644 --- a/storage/myisam/mi_test3.c +++ b/storage/myisam/mi_test3.c @@ -178,7 +178,7 @@ void start_test(int id) } if (key_cacheing && rnd(2) == 0) init_key_cache(dflt_key_cache, KEY_CACHE_BLOCK_SIZE, 65536L, 0, 0, - DEFAULT_KEY_CACHE_PARTITIONS); + 0, DEFAULT_KEY_CACHE_PARTITIONS); printf("Process %d, pid: %ld\n", id, (long) getpid()); fflush(stdout); diff --git a/storage/myisam/mi_test_all.sh b/storage/myisam/mi_test_all.sh index 12c28d7d132..e6327fd8247 100755 --- a/storage/myisam/mi_test_all.sh +++ b/storage/myisam/mi_test_all.sh @@ -156,9 +156,9 @@ echo "mi_test2$suffix $silent -L -K -R1 -m2000 ; Should give error 135" ./myisamchk$suffix -sm test2 ./mi_test2$suffix $silent -L -K -W -P -m50 -l -./myisamlog$suffix +./myisamlog$suffix -P ./mi_test2$suffix $silent -L -K -W -P -m50 -l -b100 -./myisamlog$suffix +./myisamlog$suffix -P time ./mi_test2$suffix $silent time ./mi_test2$suffix $silent -K -B time ./mi_test2$suffix $silent -L -B diff --git a/storage/myisam/myisam_ftdump.c b/storage/myisam/myisam_ftdump.c index e1ea9f2de37..55ee3795f9b 100644 --- a/storage/myisam/myisam_ftdump.c +++ b/storage/myisam/myisam_ftdump.c @@ -84,7 +84,7 @@ int main(int argc,char *argv[]) usage(); } - init_key_cache(dflt_key_cache, MI_KEY_BLOCK_LENGTH, KEY_BUFFER_INIT, 0, 0, 0); + init_key_cache(dflt_key_cache, MI_KEY_BLOCK_LENGTH, KEY_BUFFER_INIT, 0, 0, 0, 0); if (!(info=mi_open(argv[0], O_RDONLY, HA_OPEN_ABORT_IF_LOCKED|HA_OPEN_FROM_SQL_LAYER))) diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c index 0cd01398cbc..7835ab83531 100644 --- a/storage/myisam/myisamchk.c +++ b/storage/myisam/myisamchk.c @@ -1115,7 +1115,7 @@ static int myisamchk(HA_CHECK *param, char * filename) { if (param->testflag & (T_EXTEND | T_MEDIUM)) (void) init_key_cache(dflt_key_cache,opt_key_cache_block_size, - param->use_buffers, 0, 0, 0); + param->use_buffers, 0, 0, 0, 0); (void) init_io_cache(¶m->read_cache,datafile, (uint) param->read_buffer_length, READ_CACHE, @@ -1532,7 +1532,7 @@ static int mi_sort_records(HA_CHECK *param, DBUG_RETURN(0); /* Nothing to do */ init_key_cache(dflt_key_cache, opt_key_cache_block_size, - (size_t) param->use_buffers, 0, 0, 0); + (size_t) param->use_buffers, 0, 0, 0, 0); if (init_io_cache(&info->rec_cache,-1,(uint) param->write_buffer_length, WRITE_CACHE,share->pack.header_length,1, MYF(MY_WME | MY_WAIT_IF_FULL))) diff --git a/storage/myisam/myisamlog.c b/storage/myisam/myisamlog.c index 86e1978edaa..d549dd76037 100644 --- a/storage/myisam/myisamlog.c +++ b/storage/myisam/myisamlog.c @@ -333,7 +333,7 @@ static int examine_log(char * file_name, char **table_names) (tree_element_free) file_info_free, NULL, MYF(MY_TREE_WITH_DELETE)); (void) init_key_cache(dflt_key_cache,KEY_CACHE_BLOCK_SIZE,KEY_CACHE_SIZE, - 0, 0, 0); + 0, 0, 0, 0); files_open=0; access_time=0; while (access_time++ != number_of_commands && |