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
78e42153
Commit
78e42153
authored
Apr 13, 2018
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compile on windows: O_SYNC is not available, use a my_sync() call instead.
parent
5545753b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
storage/rocksdb/rdb_utils.cc
storage/rocksdb/rdb_utils.cc
+8
-1
No files found.
storage/rocksdb/rdb_utils.cc
View file @
78e42153
...
...
@@ -358,7 +358,8 @@ bool rdb_check_rocksdb_corruption() {
void
rdb_persist_corruption_marker
()
{
const
std
::
string
&
fileName
(
myrocks
::
rdb_corruption_marker_file_name
());
int
fd
=
my_open
(
fileName
.
c_str
(),
O_CREAT
|
O_SYNC
,
MYF
(
MY_WME
));
/* O_SYNC is not supported on windows */
int
fd
=
my_open
(
fileName
.
c_str
(),
O_CREAT
|
IF_WIN
(
0
,
O_SYNC
),
MYF
(
MY_WME
));
if
(
fd
<
0
)
{
sql_print_error
(
"RocksDB: Can't create file %s to mark rocksdb as "
"corrupted."
,
...
...
@@ -370,6 +371,12 @@ void rdb_persist_corruption_marker() {
fileName
.
c_str
());
}
#ifdef _WIN32
/* A replacement for O_SYNC flag above */
if
(
fd
>=
0
)
my_sync
(
fd
,
MYF
(
0
));
#endif
int
ret
=
my_close
(
fd
,
MYF
(
MY_WME
));
if
(
ret
)
{
// NO_LINT_DEBUG
...
...
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