From ace7e53690c8af006b3854636b3d868c7e716374 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 13 Feb 2007 16:33:32 +0100 Subject: Bug#25460 - High concurrency MyISAM access causes severe mysqld crash. Under high load it was possible that memory mapping was started on a table while other threads were working with the table. I fixed the start of memory mapping so that it is done at the first table open or when the requesting thread is using the table exclusively only. include/my_base.h: Bug#25460 - High concurrency MyISAM access causes severe mysqld crash. Added a new MyISAM open_flag HA_OPEN_MMAP. storage/myisam/ha_myisam.cc: Bug#25460 - High concurrency MyISAM access causes severe mysqld crash. Replaced the call to mi_extra(... HA_EXTRA_MMAP ...) by the new open_flag HA_OPEN_MMAP. This effects that the mapping will no longer be done on every open of the table but just on the initial open, when the MyISAM share is created. storage/myisam/mi_dynrec.c: Bug#25460 - High concurrency MyISAM access causes severe mysqld crash. Added a comment with a concern regarding the mmap flag MAP_NORESERVE. storage/myisam/mi_extra.c: Bug#25460 - High concurrency MyISAM access causes severe mysqld crash. Limited the start of memory mapping to situations where the requesting thread has the table exclusively opened. storage/myisam/mi_open.c: Bug#25460 - High concurrency MyISAM access causes severe mysqld crash. Added memory mapping code. Used if the new open_flag HA_OPEN_MMAP is set. --- include/my_base.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/my_base.h') diff --git a/include/my_base.h b/include/my_base.h index 14e4e3afb44..26d513ba2a7 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -47,6 +47,7 @@ #define HA_OPEN_ABORT_IF_CRASHED 16 #define HA_OPEN_FOR_REPAIR 32 /* open even if crashed */ #define HA_OPEN_FROM_SQL_LAYER 64 +#define HA_OPEN_MMAP 128 /* open memory mapped */ /* The following is parameter to ha_rkey() how to use key */ -- cgit v1.2.1