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
92ba2cef
Commit
92ba2cef
authored
Mar 03, 2008
by
kaa@kaamos.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge kaamos.(none):/data/src/opt/bug31781/my50
into kaamos.(none):/data/src/opt/bug31781/my51
parents
a5dd9cdc
bd53f960
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
mysys/my_create.c
mysys/my_create.c
+17
-3
No files found.
mysys/my_create.c
View file @
92ba2cef
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
File
my_create
(
const
char
*
FileName
,
int
CreateFlags
,
int
access_flags
,
File
my_create
(
const
char
*
FileName
,
int
CreateFlags
,
int
access_flags
,
myf
MyFlags
)
myf
MyFlags
)
{
{
int
fd
;
int
fd
,
rc
;
DBUG_ENTER
(
"my_create"
);
DBUG_ENTER
(
"my_create"
);
DBUG_PRINT
(
"my"
,(
"Name: '%s' CreateFlags: %d AccessFlags: %d MyFlags: %d"
,
DBUG_PRINT
(
"my"
,(
"Name: '%s' CreateFlags: %d AccessFlags: %d MyFlags: %d"
,
FileName
,
CreateFlags
,
access_flags
,
MyFlags
));
FileName
,
CreateFlags
,
access_flags
,
MyFlags
));
...
@@ -52,6 +52,20 @@ File my_create(const char *FileName, int CreateFlags, int access_flags,
...
@@ -52,6 +52,20 @@ File my_create(const char *FileName, int CreateFlags, int access_flags,
fd
=
open
(
FileName
,
access_flags
);
fd
=
open
(
FileName
,
access_flags
);
#endif
#endif
DBUG_RETURN
(
my_register_filename
(
fd
,
FileName
,
FILE_BY_CREATE
,
rc
=
my_register_filename
(
fd
,
FileName
,
FILE_BY_CREATE
,
EE_CANTCREATEFILE
,
MyFlags
));
EE_CANTCREATEFILE
,
MyFlags
);
/*
my_register_filename() may fail on some platforms even if the call to
*open() above succeeds. In this case, don't leave the stale file because
callers assume the file to not exist if my_create() fails, so they don't
do any cleanups.
*/
if
(
unlikely
(
fd
>=
0
&&
rc
<
0
))
{
int
tmp
=
my_errno
;
my_delete
(
FileName
,
MyFlags
);
my_errno
=
tmp
;
}
DBUG_RETURN
(
rc
);
}
/* my_create */
}
/* my_create */
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