summaryrefslogtreecommitdiff
path: root/sql/examples
diff options
context:
space:
mode:
authorbrian@zim.(none) <>2005-09-07 10:30:06 -0700
committerbrian@zim.(none) <>2005-09-07 10:30:06 -0700
commit8a5c24536c774789a956db3a91782206c4e85b7b (patch)
tree312dd9743d4b854a96bfb6cfdc1cbc877fc2a0ac /sql/examples
parenta0ddff9c6e8827de541f05a457703ec79e72767a (diff)
downloadmariadb-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.cc3
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);