summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-01-25 15:31:07 +0200
committerunknown <monty@mashka.mysql.fi>2003-01-25 15:31:07 +0200
commit49e0eea578eb119cafb2df1ba77b35fcf8391224 (patch)
tree45f7768e20be3d146b414bb9b770a956b9601f78 /innobase
parentdb47e4ca2479a8e7bde91757fa968c462ca2a343 (diff)
parent4886e3d2d4e05faba9f13869c5e0e3b4dc6a7c1c (diff)
downloadmariadb-git-49e0eea578eb119cafb2df1ba77b35fcf8391224.tar.gz
Merge with 3.23.55
BitKeeper/deleted/.del-net.c~ef21d6402bb882f9: Auto merged innobase/os/os0file.c: Auto merged libmysql/Makefile.am: Auto merged scripts/make_binary_distribution.sh: Auto merged sql/log.cc: Auto merged sql/mysqld.cc: Auto merged sql/sql_select.cc: Auto merged Build-tools/Do-compile: Use local version Makefile.am: remove double libmysql_r configure.in: Use local libmysql/libmysql.c: Dont abort connection if too big packet error sql/ha_innodb.cc: use local sql/net_serv.cc: use local sql/sql_parse.cc: Merge with 3.23.55 (fix double free of user)
Diffstat (limited to 'innobase')
-rw-r--r--innobase/os/os0file.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index fa5482a8cd1..293ced92c42 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -8,6 +8,7 @@ Created 10/21/1995 Heikki Tuuri
#include "os0file.h"
#include "os0sync.h"
+#include "os0thread.h"
#include "ut0mem.h"
#include "srv0srv.h"
#include "fil0fil.h"
@@ -1093,6 +1094,7 @@ os_file_write(
DWORD low;
DWORD high;
ulint i;
+ ulint n_retries = 0;
ut_a((offset & 0xFFFFFFFF) == offset);
@@ -1101,7 +1103,7 @@ os_file_write(
ut_ad(file);
ut_ad(buf);
ut_ad(n > 0);
-
+retry:
low = offset;
high = offset_high;
@@ -1145,6 +1147,19 @@ os_file_write(
return(TRUE);
}
+ /* If some background file system backup tool is running, then, at
+ least in Windows 2000, we may get here a specific error. Let us
+ retry the operation 100 times, with 1 second waits. */
+
+ if (GetLastError() == ERROR_LOCK_VIOLATION && n_retries < 100) {
+
+ os_thread_sleep(1000000);
+
+ n_retries++;
+
+ goto retry;
+ }
+
if (!os_has_said_disk_full) {
ut_print_timestamp(stderr);
@@ -1157,7 +1172,7 @@ os_file_write(
"InnoDB: what the error number means.\n"
"InnoDB: Check that your OS and file system support files of this size.\n"
"InnoDB: Check also that the disk is not full or a disk quota exceeded.\n",
- name, offset_high, offset, n, len,
+ name, offset_high, offset, n, (ulint)len,
(ulint)GetLastError());
os_has_said_disk_full = TRUE;
@@ -1180,13 +1195,13 @@ os_file_write(
fprintf(stderr,
" InnoDB: Error: Write to file %s failed at offset %lu %lu.\n"
-"InnoDB: %lu bytes should have been written, only %lu were written.\n"
+"InnoDB: %lu bytes should have been written, only %ld were written.\n"
"InnoDB: Operating system error number %lu.\n"
"InnoDB: Look from section 13.2 at http://www.innodb.com/ibman.html\n"
"InnoDB: what the error number means or use the perror program of MySQL.\n"
"InnoDB: Check that your OS and file system support files of this size.\n"
"InnoDB: Check also that the disk is not full or a disk quota exceeded.\n",
- name, offset_high, offset, n, (ulint)ret,
+ name, offset_high, offset, n, (long int)ret,
(ulint)errno);
os_has_said_disk_full = TRUE;
}