diff options
-rw-r--r-- | myisam/mi_preload.c | 8 | ||||
-rw-r--r-- | mysql-test/r/preload.result | 28 |
2 files changed, 18 insertions, 18 deletions
diff --git a/myisam/mi_preload.c b/myisam/mi_preload.c index 5e03d489efe..317ab4ad7fe 100644 --- a/myisam/mi_preload.c +++ b/myisam/mi_preload.c @@ -71,15 +71,15 @@ int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves) if (flush_key_blocks(share->key_cache,share->kfile, FLUSH_RELEASE)) goto err; - + do { /* Read the next block of index file into the preload buffer */ if ((my_off_t) length > (key_file_length-pos)) length= (ulong) (key_file_length-pos); - if (my_pread(share->kfile, (byte*) buff, length, pos, MYF(MY_FAE))) + if (my_pread(share->kfile, (byte*) buff, length, pos, MYF(MY_FAE|MY_FNABP))) goto err; - + if (ignore_leaves) { uchar *end= buff+length; @@ -88,7 +88,7 @@ int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves) if (mi_test_if_nod(buff)) { if (key_cache_insert(share->key_cache, - share->kfile, pos, DFLT_INIT_HITS, + share->kfile, pos, DFLT_INIT_HITS, (byte*) buff, block_length)) goto err; } diff --git a/mysql-test/r/preload.result b/mysql-test/r/preload.result index f0b99a8d6f1..7237a0da7e0 100644 --- a/mysql-test/r/preload.result +++ b/mysql-test/r/preload.result @@ -74,15 +74,15 @@ Table Op Msg_type Msg_text test.t1 preload_keys status OK show status like "key_read%"; Variable_name Value -Key_read_requests 0 -Key_reads 0 +Key_read_requests 581 +Key_reads 581 select count(*) from t1 where b = 'test1'; count(*) 4181 show status like "key_read%"; Variable_name Value -Key_read_requests 217 -Key_reads 45 +Key_read_requests 798 +Key_reads 581 flush tables; flush status; show status like "key_read%"; @@ -98,15 +98,15 @@ Table Op Msg_type Msg_text test.t1 preload_keys status OK show status like "key_read%"; Variable_name Value -Key_read_requests 0 -Key_reads 0 +Key_read_requests 10 +Key_reads 10 select count(*) from t1 where b = 'test1'; count(*) 4181 show status like "key_read%"; Variable_name Value -Key_read_requests 217 -Key_reads 45 +Key_read_requests 227 +Key_reads 52 flush tables; flush status; show status like "key_read%"; @@ -123,8 +123,8 @@ test.t1 preload_keys status OK test.t2 preload_keys status OK show status like "key_read%"; Variable_name Value -Key_read_requests 0 -Key_reads 0 +Key_read_requests 587 +Key_reads 587 select count(*) from t1 where b = 'test1'; count(*) 4181 @@ -133,8 +133,8 @@ count(*) 2584 show status like "key_read%"; Variable_name Value -Key_read_requests 351 -Key_reads 73 +Key_read_requests 938 +Key_reads 613 flush tables; flush status; show status like "key_read%"; @@ -147,8 +147,8 @@ test.t3 preload_keys error Table 'test.t3' doesn't exist test.t2 preload_keys status OK show status like "key_read%"; Variable_name Value -Key_read_requests 0 -Key_reads 0 +Key_read_requests 355 +Key_reads 355 flush tables; flush status; show status like "key_read%"; |