From 765c255873bdc2bad425a48aaf257f91da1fb3f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 11 Mar 2001 23:09:09 +0200 Subject: Optimization of delete with record cache (for MyISAM tables) Added missing files for innobase to the distribution BUILD/compile-pentium-debug: Always compile with BDB tables BUILD/compile-pentium: Always compile with BDB tables configure.in: Added missing files for innobase to the distribution innobase/mem/Makefile.am: Added missing files for innobase to the distribution innobase/pars/Makefile.am: Added missing files for innobase to the distribution sql/ha_isam.h: Don't use record cache with delete sql/handler.h: Optimization of delete with record cache sql/mysql_priv.h: Optimization of delete with record cache sql/records.cc: Optimization of delete with record cache sql/sql_delete.cc: Optimization of delete with record cache --- sql/records.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sql/records.cc') diff --git a/sql/records.cc b/sql/records.cc index 89eae81fe27..e6f76e7fec6 100644 --- a/sql/records.cc +++ b/sql/records.cc @@ -31,7 +31,7 @@ static int rr_cmp(uchar *a,uchar *b); void init_read_record(READ_RECORD *info,THD *thd, TABLE *table, SQL_SELECT *select, - bool use_record_cache, bool print_error) + int use_record_cache, bool print_error) { IO_CACHE *tempfile; DBUG_ENTER("init_read_record"); @@ -97,9 +97,11 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table, info->read_record=rr_sequential; table->file->rnd_init(); /* We can use record cache if we don't update dynamic length tables */ - if (use_record_cache || + if (use_record_cache > 0 || (int) table->reginfo.lock_type <= (int) TL_READ_HIGH_PRIORITY || - !(table->db_options_in_use & HA_OPTION_PACK_RECORD)) + !(table->db_options_in_use & HA_OPTION_PACK_RECORD) || + (use_record_cache < 0 && + !(table->file->option_flag() & HA_NOT_DELETE_WITH_CACHE))) VOID(table->file->extra(HA_EXTRA_CACHE)); // Cache reads } DBUG_VOID_RETURN; -- cgit v1.2.1