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
fca5ee0c
Commit
fca5ee0c
authored
Jan 13, 2005
by
heikki@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
8474953c
76789a4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
innobase/os/os0file.c
innobase/os/os0file.c
+15
-9
No files found.
innobase/os/os0file.c
View file @
fca5ee0c
...
...
@@ -486,7 +486,7 @@ os_io_init_simple(void)
}
}
#if
ndef UNIV_HOTBACKUP
#if
!defined(UNIV_HOTBACKUP) && !defined(__NETWARE__)
/*************************************************************************
Creates a temporary file. This function is defined in ha_innodb.cc. */
...
...
@@ -494,7 +494,7 @@ int
innobase_mysql_tmpfile
(
void
);
/*========================*/
/* out: temporary file descriptor, or < 0 on error */
#endif
/* !UNIV_HOTBACKUP */
#endif
/* !UNIV_HOTBACKUP
&& !__NETWARE__
*/
/***************************************************************************
Creates a temporary file. */
...
...
@@ -504,9 +504,12 @@ os_file_create_tmpfile(void)
/*========================*/
/* out: temporary file handle, or NULL on error */
{
#ifdef __NETWARE__
FILE
*
file
=
tmpfile
();
#else
/* __NETWARE__ */
FILE
*
file
=
NULL
;
int
fd
=
-
1
;
#ifdef UNIV_HOTBACKUP
#
ifdef UNIV_HOTBACKUP
int
tries
;
for
(
tries
=
10
;
tries
--
;
)
{
char
*
name
=
tempnam
(
fil_path_to_mysql_datadir
,
"ib"
);
...
...
@@ -515,15 +518,15 @@ os_file_create_tmpfile(void)
}
fd
=
open
(
name
,
# ifdef __WIN__
#
ifdef __WIN__
O_SEQUENTIAL
|
O_SHORT_LIVED
|
O_TEMPORARY
|
# endif
/* __WIN__ */
#
endif
/* __WIN__ */
O_CREAT
|
O_EXCL
|
O_RDWR
,
S_IREAD
|
S_IWRITE
);
if
(
fd
>=
0
)
{
# ifndef __WIN__
#
ifndef __WIN__
unlink
(
name
);
# endif
/* !__WIN__ */
#
endif
/* !__WIN__ */
free
(
name
);
break
;
}
...
...
@@ -534,22 +537,25 @@ os_file_create_tmpfile(void)
name
);
free
(
name
);
}
#else
/* UNIV_HOTBACKUP */
#
else
/* UNIV_HOTBACKUP */
fd
=
innobase_mysql_tmpfile
();
#endif
/* UNIV_HOTBACKUP */
#
endif
/* UNIV_HOTBACKUP */
if
(
fd
>=
0
)
{
file
=
fdopen
(
fd
,
"w+b"
);
}
#endif
/* __NETWARE__ */
if
(
!
file
)
{
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
" InnoDB: Error: unable to create temporary file;"
" errno: %d
\n
"
,
errno
);
#ifndef __NETWARE__
if
(
fd
>=
0
)
{
close
(
fd
);
}
#endif
/* !__NETWARE__ */
}
return
(
file
);
...
...
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