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
95d14fea
Commit
95d14fea
authored
Feb 22, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge r103 from hotbackup/trunk.
os_file_create_tmpfile(): Remove the implementation #ifdef UNIV_HOTBACKUP.
parent
b5ebf0b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
37 deletions
+12
-37
os/os0file.c
os/os0file.c
+12
-37
No files found.
os/os0file.c
View file @
95d14fea
...
...
@@ -522,61 +522,36 @@ os_file_create_tmpfile(void)
/*========================*/
/* out: temporary file handle, or NULL on error */
{
#ifdef __NETWARE__
#ifdef UNIV_HOTBACKUP
ut_error
;
return
(
NULL
);
#else
# ifdef __NETWARE__
FILE
*
file
=
tmpfile
();
#else
/* __NETWARE__ */
#
else
/* __NETWARE__ */
FILE
*
file
=
NULL
;
int
fd
=
-
1
;
# ifdef UNIV_HOTBACKUP
int
tries
;
for
(
tries
=
10
;
tries
--
;
)
{
char
*
name
=
tempnam
(
fil_path_to_mysql_datadir
,
"ib"
);
if
(
!
name
)
{
break
;
}
fd
=
open
(
name
,
# ifdef __WIN__
O_SEQUENTIAL
|
O_SHORT_LIVED
|
O_TEMPORARY
|
# endif
/* __WIN__ */
O_CREAT
|
O_EXCL
|
O_RDWR
,
0600
);
if
(
fd
>=
0
)
{
# ifndef __WIN__
unlink
(
name
);
# endif
/* !__WIN__ */
free
(
name
);
break
;
}
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
" InnoDB: Warning: "
"unable to create temporary file %s, retrying
\n
"
,
name
);
free
(
name
);
}
# else
/* UNIV_HOTBACKUP */
fd
=
innobase_mysql_tmpfile
();
# endif
/* UNIV_HOTBACKUP */
int
fd
=
innobase_mysql_tmpfile
();
if
(
fd
>=
0
)
{
file
=
fdopen
(
fd
,
"w+b"
);
}
#endif
/* __NETWARE__ */
#
endif
/* __NETWARE__ */
if
(
!
file
)
{
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
" InnoDB: Error: unable to create temporary file;"
" errno: %d
\n
"
,
errno
);
#ifndef __NETWARE__
#
ifndef __NETWARE__
if
(
fd
>=
0
)
{
close
(
fd
);
}
#endif
/* !__NETWARE__ */
#
endif
/* !__NETWARE__ */
}
return
(
file
);
#endif
/* UNIV_HOTBACKUP */
}
/***************************************************************************
...
...
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