summaryrefslogtreecommitdiff
path: root/innobase/os
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
commit433430f4a2549dfd1691da3a4df7c39429211013 (patch)
treedbc5bd8b6c3718871465cc28d4a2f4022b458284 /innobase/os
parent875cdfe3c965c1d38e30c04a9d42112936be76fb (diff)
downloadmariadb-git-433430f4a2549dfd1691da3a4df7c39429211013.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/os')
-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 */