summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2004-12-08 17:53:01 +0200
committerunknown <heikki@hundin.mysql.fi>2004-12-08 17:53:01 +0200
commit0dbe00d14571f016f20727b286ca2491d7574c79 (patch)
treedbc5bd8b6c3718871465cc28d4a2f4022b458284 /innobase
parent3f9753d7b234bc9f65d5c99c3b3362ad07affa95 (diff)
downloadmariadb-git-0dbe00d14571f016f20727b286ca2491d7574c79.tar.gz
os0file.c:
Print a better error message to the .err log if InnoDB's advisory file locking fails innobase/os/os0file.c: Print a better error message to the .err log if InnoDB's advisory file locking fails
Diffstat (limited to 'innobase')
-rw-r--r--innobase/os/os0file.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index 8b9a0582781..5aa6fe37f26 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -394,10 +394,19 @@ os_file_lock(
lk.l_start = lk.l_len = 0;
if (fcntl(fd, F_SETLK, &lk) == -1) {
fprintf(stderr,
- "InnoDB: Unable to lock %s, error: %d", name, errno);
+ "InnoDB: Unable to lock %s, error: %d\n", name, errno);
+
+ if (errno == EAGAIN || errno == EACCES) {
+ fprintf(stderr,
+"InnoDB: Check that you do not already have another mysqld process\n"
+"InnoDB: using the same InnoDB data or log files.\n");
+ }
+
close(fd);
+
return(-1);
}
+
return(0);
}
#endif /* USE_FILE_LOCK */