diff options
author | unknown <heikki@hundin.mysql.fi> | 2003-01-21 00:18:48 +0200 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2003-01-21 00:18:48 +0200 |
commit | fb466c176b6bd0f41b21e3dcfe04c21867f94a80 (patch) | |
tree | dd8d0a5e4fc86fb451acef57d7ca44367914e7c3 /innobase | |
parent | e7193c63ceb339bede6775d563be53aae63c78c2 (diff) | |
download | mariadb-git-fb466c176b6bd0f41b21e3dcfe04c21867f94a80.tar.gz |
os0file.c:
Fix an assertion about ERROR_LOCK_VIOLATION 33 in file write if InnoDB Hot Backup is run concurrently with mysqld in Windows
innobase/os/os0file.c:
Fix an assertion about ERROR_LOCK_VIOLATION 33 in file write if InnoDB Hot Backup is run concurrently with mysqld in Windows
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/os/os0file.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index 098d5b25e89..e199075d6da 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -1083,6 +1083,7 @@ os_file_write( DWORD low; DWORD high; ulint i; + ulint n_retries = 0; ut_a((offset & 0xFFFFFFFF) == offset); @@ -1091,7 +1092,7 @@ os_file_write( ut_ad(file); ut_ad(buf); ut_ad(n > 0); - +retry: low = offset; high = offset_high; @@ -1135,6 +1136,17 @@ os_file_write( return(TRUE); } + /* If InnoDB Hot Backup is running, then, at least in Windows 2000, + we may get here a specific error. Let us retry the operation 10 + times. */ + + if (GetLastError() == ERROR_LOCK_VIOLATION && n_retries < 10) { + + n_retries++; + + goto retry; + } + if (!os_has_said_disk_full) { ut_print_timestamp(stderr); @@ -1147,7 +1159,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; @@ -1170,13 +1182,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; } |