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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
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
Show 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(
...
@@ -2846,6 +2846,7 @@ os_file_write_func(
DWORD
high
;
DWORD
high
;
ulint
n_retries
=
0
;
ulint
n_retries
=
0
;
ulint
err
;
ulint
err
;
DWORD
saved_error
=
0
;
#ifndef UNIV_HOTBACKUP
#ifndef UNIV_HOTBACKUP
ulint
i
;
ulint
i
;
#endif
/* !UNIV_HOTBACKUP */
#endif
/* !UNIV_HOTBACKUP */
...
@@ -2935,8 +2936,10 @@ os_file_write_func(
...
@@ -2935,8 +2936,10 @@ os_file_write_func(
}
}
if
(
!
os_has_said_disk_full
)
{
if
(
!
os_has_said_disk_full
)
{
char
*
winmsg
=
NULL
;
err
=
(
ulint
)
GetLastError
();
saved_error
=
GetLastError
();
err
=
(
ulint
)
saved_error
;
ut_print_timestamp
(
stderr
);
ut_print_timestamp
(
stderr
);
...
@@ -2953,6 +2956,23 @@ os_file_write_func(
...
@@ -2953,6 +2956,23 @@ os_file_write_func(
name
,
offset
,
name
,
offset
,
(
ulong
)
n
,
(
ulong
)
len
,
(
ulong
)
err
);
(
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
)
{
if
(
strerror
((
int
)
err
)
!=
NULL
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"InnoDB: Error number %lu means '%s'.
\n
"
,
"InnoDB: Error number %lu means '%s'.
\n
"
,
...
@@ -2980,7 +3000,6 @@ os_file_write_func(
...
@@ -2980,7 +3000,6 @@ os_file_write_func(
}
}
if
(
!
os_has_said_disk_full
)
{
if
(
!
os_has_said_disk_full
)
{
ut_print_timestamp
(
stderr
);
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
fprintf
(
stderr
,
...
...
storage/xtradb/os/os0file.cc
View file @
0bb0230e
...
@@ -3050,6 +3050,7 @@ os_file_write_func(
...
@@ -3050,6 +3050,7 @@ os_file_write_func(
ulint
n_retries
=
0
;
ulint
n_retries
=
0
;
ulint
err
;
ulint
err
;
OVERLAPPED
overlapped
;
OVERLAPPED
overlapped
;
DWORD
saved_error
=
0
;
/* On 64-bit Windows, ulint is 64 bits. But offset and n should be
/* On 64-bit Windows, ulint is 64 bits. But offset and n should be
no more than 32 bits. */
no more than 32 bits. */
...
@@ -3076,7 +3077,7 @@ os_file_write_func(
...
@@ -3076,7 +3077,7 @@ os_file_write_func(
if
(
ret
)
{
if
(
ret
)
{
ret
=
GetOverlappedResult
(
file
,
&
overlapped
,
(
DWORD
*
)
&
len
,
FALSE
);
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
);
ret
=
GetOverlappedResult
(
file
,
&
overlapped
,
(
DWORD
*
)
&
len
,
TRUE
);
}
}
...
@@ -3104,8 +3105,10 @@ os_file_write_func(
...
@@ -3104,8 +3105,10 @@ os_file_write_func(
}
}
if
(
!
os_has_said_disk_full
)
{
if
(
!
os_has_said_disk_full
)
{
char
*
winmsg
=
NULL
;
err
=
(
ulint
)
GetLastError
();
saved_error
=
GetLastError
();
err
=
(
ulint
)
saved_error
;
ut_print_timestamp
(
stderr
);
ut_print_timestamp
(
stderr
);
...
@@ -3122,6 +3125,23 @@ os_file_write_func(
...
@@ -3122,6 +3125,23 @@ os_file_write_func(
name
,
offset
,
name
,
offset
,
(
ulong
)
n
,
(
ulong
)
len
,
(
ulong
)
err
);
(
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
)
{
if
(
strerror
((
int
)
err
)
!=
NULL
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"InnoDB: Error number %lu means '%s'.
\n
"
,
"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