summaryrefslogtreecommitdiff
path: root/sql/examples/ha_tina.cc
diff options
context:
space:
mode:
authorunknown <brian@zim.(none)>2005-09-07 10:30:06 -0700
committerunknown <brian@zim.(none)>2005-09-07 10:30:06 -0700
commit1ac26b4a6cfd5cf72b39e4fda31d2bb114463ad8 (patch)
tree312dd9743d4b854a96bfb6cfdc1cbc877fc2a0ac /sql/examples/ha_tina.cc
parent4fdf0ce3803f42d20681ed332888b16042b33f8f (diff)
downloadmariadb-git-1ac26b4a6cfd5cf72b39e4fda31d2bb114463ad8.tar.gz
Small tweak for random read performance (we shouldn't always tell the OS that we will be doing a linear scan).
sql/examples/ha_tina.cc: Small tweak for random read performance.
Diffstat (limited to 'sql/examples/ha_tina.cc')
-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);