summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-09-27 02:40:54 +0300
committerunknown <monty@donna.mysql.com>2000-09-27 02:40:54 +0300
commit8bd8993cd30c43f0712b555b384676d6906d4def (patch)
treef81605254863ffc2b10f71ccb7efd66e3844f345 /myisam
parentb95853972a4e9aa7adb3c1827d95c6b5dd69f2f6 (diff)
downloadmariadb-git-8bd8993cd30c43f0712b555b384676d6906d4def.tar.gz
Fixes for release
include/config-win.h: Increase the number of files on windows include/mysys_err.h: New error message myisam/mi_log.c: Fix myisam.log to be usable even if we are using NFS myisam/myisamdef.h: Fix myisam.log to be usable even if we are using NFS mysys/errors.c: Fix error message
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_log.c12
-rw-r--r--myisam/myisamdef.h1
2 files changed, 10 insertions, 3 deletions
diff --git a/myisam/mi_log.c b/myisam/mi_log.c
index d223cc69bcc..2d00387a945 100644
--- a/myisam/mi_log.c
+++ b/myisam/mi_log.c
@@ -14,7 +14,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-/* Logging of isamcommands and records on logfile */
+/*
+ Logging of MyISAM commands and records on logfile for debugging
+ The log can be examined with help of the myisamlog command.
+*/
#include "myisamdef.h"
#if defined(MSDOS) || defined(__WIN__)
@@ -30,14 +33,15 @@
#undef GETPID /* For HPUX */
#ifdef THREAD
-#define GETPID() (log_type == 1 ? getpid() : (long) my_thread_id());
+#define GETPID() (log_type == 1 ? myisam_pid : (long) my_thread_id());
#else
-#define GETPID() getpid()
+#define GETPID() myisam_pid
#endif
/* Activate logging if flag is 1 and reset logging if flag is 0 */
static int log_type=0;
+ulong myisam_pid=0;
int mi_log(int activate_log)
{
@@ -48,6 +52,8 @@ int mi_log(int activate_log)
log_type=activate_log;
if (activate_log)
{
+ if (!myisam_pid)
+ myisam_pid=(ulong) getpid();
if (myisam_log_file < 0)
{
if ((myisam_log_file = my_create(fn_format(buff,myisam_log_filename,
diff --git a/myisam/myisamdef.h b/myisam/myisamdef.h
index 8784afca0d9..e436e0872ca 100644
--- a/myisam/myisamdef.h
+++ b/myisam/myisamdef.h
@@ -384,6 +384,7 @@ extern uchar NEAR myisam_file_magic[],NEAR myisam_pack_file_magic[];
extern uint NEAR myisam_read_vec[],NEAR myisam_readnext_vec[];
extern uint myisam_quick_table_bits;
extern File myisam_log_file;
+extern ulong myisam_pid;
/* This is used by _mi_calc_xxx_key_length och _mi_store_key */