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
347a21e1
Commit
347a21e1
authored
Jun 03, 2004
by
heikki@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fil0fil.c:
Make allocation for file path more uniform: always use mem_alloc(), not ut_malloc()
parent
0dced9ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
innobase/fil/fil0fil.c
innobase/fil/fil0fil.c
+11
-11
No files found.
innobase/fil/fil0fil.c
View file @
347a21e1
...
...
@@ -2528,7 +2528,7 @@ func_exit:
#ifdef UNIV_HOTBACKUP
/***********************************************************************
Allocates a file name for an old version of a single-table tablespace.
The string must be freed by caller with
ut_free(), NOT with
mem_free()! */
The string must be freed by caller with mem_free()! */
static
char
*
fil_make_ibbackup_old_name
(
...
...
@@ -2538,7 +2538,7 @@ fil_make_ibbackup_old_name(
{
static
const
char
suffix
[]
=
"_ibbackup_old_vers_"
;
ulint
len
=
strlen
(
name
);
char
*
path
=
ut_m
alloc
(
len
+
(
15
+
sizeof
suffix
));
char
*
path
=
mem_
alloc
(
len
+
(
15
+
sizeof
suffix
));
memcpy
(
path
,
name
,
len
);
memcpy
(
path
+
len
,
suffix
,
(
sizeof
suffix
)
-
1
);
...
...
@@ -2570,7 +2570,7 @@ fil_load_single_table_tablespace(
#ifdef UNIV_HOTBACKUP
fil_space_t
*
space
;
#endif
filepath
=
ut_m
alloc
(
strlen
(
dbname
)
+
strlen
(
filename
)
filepath
=
mem_
alloc
(
strlen
(
dbname
)
+
strlen
(
filename
)
+
strlen
(
fil_path_to_mysql_datadir
)
+
3
);
sprintf
(
filepath
,
"%s/%s/%s"
,
fil_path_to_mysql_datadir
,
dbname
,
...
...
@@ -2598,7 +2598,7 @@ fil_load_single_table_tablespace(
"InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
\n
"
"InnoDB: and force InnoDB to continue crash recovery here.
\n
"
,
filepath
);
ut
_free
(
filepath
);
mem
_free
(
filepath
);
if
(
srv_force_recovery
>
0
)
{
fprintf
(
stderr
,
...
...
@@ -2633,7 +2633,7 @@ fil_load_single_table_tablespace(
"InnoDB: and force InnoDB to continue crash recovery here.
\n
"
,
filepath
);
os_file_close
(
file
);
ut
_free
(
filepath
);
mem
_free
(
filepath
);
if
(
srv_force_recovery
>
0
)
{
fprintf
(
stderr
,
...
...
@@ -2661,7 +2661,7 @@ fil_load_single_table_tablespace(
(
ulong
)
size_high
,
(
ulong
)
size_low
,
(
ulong
)
(
4
*
UNIV_PAGE_SIZE
));
os_file_close
(
file
);
ut
_free
(
filepath
);
mem
_free
(
filepath
);
return
;
}
...
...
@@ -2707,8 +2707,8 @@ fil_load_single_table_tablespace(
ut_a
(
os_file_rename
(
filepath
,
new_path
));
ut_free
(
buf2
);
ut
_free
(
filepath
);
ut
_free
(
new_path
);
mem
_free
(
filepath
);
mem
_free
(
new_path
);
return
;
}
...
...
@@ -2743,8 +2743,8 @@ fil_load_single_table_tablespace(
ut_a
(
os_file_rename
(
filepath
,
new_path
));
ut_free
(
buf2
);
ut
_free
(
filepath
);
ut
_free
(
new_path
);
mem
_free
(
filepath
);
mem
_free
(
new_path
);
return
;
}
...
...
@@ -2764,7 +2764,7 @@ fil_load_single_table_tablespace(
func_exit:
os_file_close
(
file
);
ut_free
(
buf2
);
ut
_free
(
filepath
);
mem
_free
(
filepath
);
}
/************************************************************************
...
...
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