From 8a5c24536c774789a956db3a91782206c4e85b7b Mon Sep 17 00:00:00 2001 From: "brian@zim.(none)" <> Date: Wed, 7 Sep 2005 10:30:06 -0700 Subject: 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit v1.2.1