diff options
Diffstat (limited to 'innobase/os/os0file.c')
-rw-r--r-- | innobase/os/os0file.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index 1e3eeb0de02..434f9460bb6 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -398,10 +398,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 */ @@ -1672,7 +1681,7 @@ os_file_set_size( } /* Print about progress for each 100 MB written */ - if ((offset + n_bytes) / (ib_longlong)(100 * 1024 * 1024) + if ((ib_longlong) (offset + n_bytes) / (ib_longlong)(100 * 1024 * 1024) != offset / (ib_longlong)(100 * 1024 * 1024)) { fprintf(stderr, " %lu00", |