Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
0bb0230e
Commit
0bb0230e
authored
Jul 22, 2014
by
Jan Lindström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-6426: Maria DB crashes randomly on creating indexes
Improve OS error messages on Windows.
parent
dd1d9212
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
5 deletions
+44
-5
storage/innobase/os/os0file.cc
storage/innobase/os/os0file.cc
+21
-2
storage/xtradb/os/os0file.cc
storage/xtradb/os/os0file.cc
+23
-3
No files found.
storage/innobase/os/os0file.cc
View file @
0bb0230e
...
...
@@ -2846,6 +2846,7 @@ os_file_write_func(
DWORD
high
;
ulint
n_retries
=
0
;
ulint
err
;
DWORD
saved_error
=
0
;
#ifndef UNIV_HOTBACKUP
ulint
i
;
#endif
/* !UNIV_HOTBACKUP */
...
...
@@ -2935,8 +2936,10 @@ retry:
}
if
(
!
os_has_said_disk_full
)
{
char
*
winmsg
=
NULL
;
err
=
(
ulint
)
GetLastError
();
saved_error
=
GetLastError
();
err
=
(
ulint
)
saved_error
;
ut_print_timestamp
(
stderr
);
...
...
@@ -2953,6 +2956,23 @@ retry:
name
,
offset
,
(
ulong
)
n
,
(
ulong
)
len
,
(
ulong
)
err
);
/* Ask Windows to prepare a standard message for a
GetLastError() */
FormatMessage
(
FORMAT_MESSAGE_ALLOCATE_BUFFER
|
FORMAT_MESSAGE_FROM_SYSTEM
|
FORMAT_MESSAGE_IGNORE_INSERTS
,
NULL
,
saved_error
,
MAKELANGID
(
LANG_NEUTRAL
,
SUBLANG_DEFAULT
),
(
LPSTR
)
&
winmsg
,
0
,
NULL
);
if
(
winmsg
)
{
fprintf
(
stderr
,
"InnoDB: FormatMessage: Error number %lu means '%s'.
\n
"
,
(
ulong
)
saved_error
,
winmsg
);
LocalFree
(
winmsg
);
}
if
(
strerror
((
int
)
err
)
!=
NULL
)
{
fprintf
(
stderr
,
"InnoDB: Error number %lu means '%s'.
\n
"
,
...
...
@@ -2980,7 +3000,6 @@ retry:
}
if
(
!
os_has_said_disk_full
)
{
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
...
...
storage/xtradb/os/os0file.cc
View file @
0bb0230e
...
...
@@ -3049,7 +3049,8 @@ os_file_write_func(
DWORD
len
;
ulint
n_retries
=
0
;
ulint
err
;
OVERLAPPED
overlapped
;
OVERLAPPED
overlapped
;
DWORD
saved_error
=
0
;
/* On 64-bit Windows, ulint is 64 bits. But offset and n should be
no more than 32 bits. */
...
...
@@ -3076,7 +3077,7 @@ retry:
if
(
ret
)
{
ret
=
GetOverlappedResult
(
file
,
&
overlapped
,
(
DWORD
*
)
&
len
,
FALSE
);
}
else
if
(
GetLastError
()
==
ERROR_IO_PENDING
)
{
else
if
(
GetLastError
()
==
ERROR_IO_PENDING
)
{
ret
=
GetOverlappedResult
(
file
,
&
overlapped
,
(
DWORD
*
)
&
len
,
TRUE
);
}
...
...
@@ -3104,8 +3105,10 @@ retry:
}
if
(
!
os_has_said_disk_full
)
{
char
*
winmsg
=
NULL
;
err
=
(
ulint
)
GetLastError
();
saved_error
=
GetLastError
();
err
=
(
ulint
)
saved_error
;
ut_print_timestamp
(
stderr
);
...
...
@@ -3122,6 +3125,23 @@ retry:
name
,
offset
,
(
ulong
)
n
,
(
ulong
)
len
,
(
ulong
)
err
);
/* Ask Windows to prepare a standard message for a
GetLastError() */
FormatMessage
(
FORMAT_MESSAGE_ALLOCATE_BUFFER
|
FORMAT_MESSAGE_FROM_SYSTEM
|
FORMAT_MESSAGE_IGNORE_INSERTS
,
NULL
,
saved_error
,
MAKELANGID
(
LANG_NEUTRAL
,
SUBLANG_DEFAULT
),
(
LPSTR
)
&
winmsg
,
0
,
NULL
);
if
(
winmsg
)
{
fprintf
(
stderr
,
"InnoDB: FormatMessage: Error number %lu means '%s'.
\n
"
,
(
ulong
)
saved_error
,
winmsg
);
LocalFree
(
winmsg
);
}
if
(
strerror
((
int
)
err
)
!=
NULL
)
{
fprintf
(
stderr
,
"InnoDB: Error number %lu means '%s'.
\n
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment