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
7bb661cd
Commit
7bb661cd
authored
Mar 15, 2018
by
Daniel Black
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
innodb: os_file_create_tmpfile always called with NULL -> simplify
parent
7fb03d7a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
17 deletions
+11
-17
storage/innobase/dict/dict0dict.cc
storage/innobase/dict/dict0dict.cc
+1
-1
storage/innobase/include/os0file.h
storage/innobase/include/os0file.h
+2
-5
storage/innobase/lock/lock0lock.cc
storage/innobase/lock/lock0lock.cc
+1
-1
storage/innobase/os/os0file.cc
storage/innobase/os/os0file.cc
+5
-8
storage/innobase/srv/srv0start.cc
storage/innobase/srv/srv0start.cc
+2
-2
No files found.
storage/innobase/dict/dict0dict.cc
View file @
7bb661cd
...
...
@@ -1109,7 +1109,7 @@ dict_init(void)
dict_operation_lock
,
SYNC_DICT_OPERATION
);
if
(
!
srv_read_only_mode
)
{
dict_foreign_err_file
=
os_file_create_tmpfile
(
NULL
);
dict_foreign_err_file
=
os_file_create_tmpfile
();
ut_a
(
dict_foreign_err_file
);
}
...
...
storage/innobase/include/os0file.h
View file @
7bb661cd
...
...
@@ -535,14 +535,11 @@ struct os_file_stat_t {
};
/** Create a temporary file. This function is like tmpfile(3), but
the temporary file is created in the given parameter path. If the path
is null then it will create the file in the mysql server configuration
the temporary file is created in the in the mysql server configuration
parameter (--tmpdir).
@param[in] path location for creating temporary file
@return temporary file handle, or NULL on error */
FILE
*
os_file_create_tmpfile
(
const
char
*
path
);
os_file_create_tmpfile
();
/** The os_file_opendir() function opens a directory stream corresponding to the
directory named by the dirname argument. The directory stream is positioned
...
...
storage/innobase/lock/lock0lock.cc
View file @
7bb661cd
...
...
@@ -496,7 +496,7 @@ void lock_sys_t::create(ulint n_cells)
prdt_page_hash
=
hash_create
(
n_cells
);
if
(
!
srv_read_only_mode
)
{
lock_latest_err_file
=
os_file_create_tmpfile
(
NULL
);
lock_latest_err_file
=
os_file_create_tmpfile
();
ut_a
(
lock_latest_err_file
);
}
}
...
...
storage/innobase/os/os0file.cc
View file @
7bb661cd
...
...
@@ -1215,19 +1215,16 @@ AIO::release_with_mutex(Slot* slot)
release
();
}
/** Creates a temporary file. This function is like tmpfile(3), but
the temporary file is created in the given parameter path. If the path
is NULL then it will create the file in the MySQL server configuration
/** Create a temporary file. This function is like tmpfile(3), but
the temporary file is created in the in the mysql server configuration
parameter (--tmpdir).
@param[in] path location for creating temporary file
@@return temporary file handle, or NULL on error */
@return temporary file handle, or NULL on error */
FILE
*
os_file_create_tmpfile
(
const
char
*
path
)
os_file_create_tmpfile
()
{
FILE
*
file
=
NULL
;
WAIT_ALLOW_WRITES
();
int
fd
=
innobase_mysql_tmpfile
(
path
);
int
fd
=
innobase_mysql_tmpfile
(
NULL
);
if
(
fd
>=
0
)
{
file
=
fdopen
(
fd
,
"w+b"
);
...
...
storage/innobase/srv/srv0start.cc
View file @
7bb661cd
...
...
@@ -1754,7 +1754,7 @@ innobase_start_or_create_for_mysql()
}
else
{
srv_monitor_file_name
=
NULL
;
srv_monitor_file
=
os_file_create_tmpfile
(
NULL
);
srv_monitor_file
=
os_file_create_tmpfile
();
if
(
!
srv_monitor_file
&&
err
==
DB_SUCCESS
)
{
err
=
DB_ERROR
;
...
...
@@ -1764,7 +1764,7 @@ innobase_start_or_create_for_mysql()
mutex_create
(
LATCH_ID_SRV_MISC_TMPFILE
,
&
srv_misc_tmpfile_mutex
);
srv_misc_tmpfile
=
os_file_create_tmpfile
(
NULL
);
srv_misc_tmpfile
=
os_file_create_tmpfile
();
if
(
!
srv_misc_tmpfile
&&
err
==
DB_SUCCESS
)
{
err
=
DB_ERROR
;
...
...
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