diff options
author | brian@zim.(none) <> | 2005-09-07 10:30:06 -0700 |
---|---|---|
committer | brian@zim.(none) <> | 2005-09-07 10:30:06 -0700 |
commit | 8a5c24536c774789a956db3a91782206c4e85b7b (patch) | |
tree | 312dd9743d4b854a96bfb6cfdc1cbc877fc2a0ac /sql/examples | |
parent | a0ddff9c6e8827de541f05a457703ec79e72767a (diff) | |
download | mariadb-git-8a5c24536c774789a956db3a91782206c4e85b7b.tar.gz |
Small tweak for random read performance (we shouldn't always tell the OS that we will be doing a linear scan).
Diffstat (limited to 'sql/examples')
-rw-r--r-- | sql/examples/ha_tina.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/examples/ha_tina.cc b/sql/examples/ha_tina.cc index bbcdfb0dafb..8a9aa91c680 100644 --- a/sql/examples/ha_tina.cc +++ b/sql/examples/ha_tina.cc @@ -609,7 +609,8 @@ int ha_tina::rnd_init(bool scan) records= 0; chain_ptr= chain; #ifdef HAVE_MADVISE - (void)madvise(share->mapped_file,share->file_stat.st_size,MADV_SEQUENTIAL); + if (scan) + (void)madvise(share->mapped_file,share->file_stat.st_size,MADV_SEQUENTIAL); #endif DBUG_RETURN(0); |