diff options
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 a336a4379bd..3a9302483b4 100644 --- a/sql/examples/ha_tina.cc +++ b/sql/examples/ha_tina.cc @@ -652,7 +652,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); |