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
9be9363c
Commit
9be9363c
authored
Mar 05, 2008
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: fsp_header_get_free_limit(), fsp_header_get_tablespace_size():
Remove the redundant parameter "space".
parent
79bbbc98
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
44 deletions
+32
-44
fsp/fsp0fsp.c
fsp/fsp0fsp.c
+17
-28
include/fsp0fsp.h
include/fsp0fsp.h
+12
-13
srv/srv0start.c
srv/srv0start.c
+3
-3
No files found.
fsp/fsp0fsp.c
View file @
9be9363c
...
...
@@ -1048,37 +1048,29 @@ fsp_header_inc_size(
}
/**************************************************************************
Gets the current free limit of
a tablespace. The free limit means the
place of the first page which has never been put to the the free list
f
or allocation. The space above that address is initialized to zero.
Sets also the global variable log_fsp_current_free_limit. */
Gets the current free limit of
the system tablespace. The free limit
means the place of the first page which has never been put to the the
f
ree list for allocation. The space above that address is initialized
to zero.
Sets also the global variable log_fsp_current_free_limit. */
UNIV_INTERN
ulint
fsp_header_get_free_limit
(
/*======================*/
fsp_header_get_free_limit
(
void
)
/*======================
=====
*/
/* out: free limit in megabytes */
ulint
space
)
/* in: space id, must be 0 */
{
fsp_header_t
*
header
;
ulint
limit
;
ulint
zip_size
;
mtr_t
mtr
;
ut_a
(
space
==
0
);
/* We have only one log_fsp_current_... variable */
mtr_start
(
&
mtr
);
mtr_x_lock
(
fil_space_get_latch
(
space
,
&
zip_size
),
&
mtr
);
mtr_x_lock
(
fil_space_get_latch
(
0
,
NULL
),
&
mtr
);
header
=
fsp_get_space_header
(
space
,
zip_size
,
&
mtr
);
header
=
fsp_get_space_header
(
0
,
0
,
&
mtr
);
limit
=
mtr_read_ulint
(
header
+
FSP_FREE_LIMIT
,
MLOG_4BYTES
,
&
mtr
);
if
(
!
zip_size
)
{
limit
/=
((
1024
*
1024
)
/
UNIV_PAGE_SIZE
);
}
else
{
limit
/=
((
1024
*
1024
)
/
zip_size
);
}
log_fsp_current_free_limit_set_and_checkpoint
(
limit
);
...
...
@@ -1088,28 +1080,25 @@ fsp_header_get_free_limit(
}
/**************************************************************************
Gets the size of the tablespace from the tablespace header. If we do not
have an auto-extending data file, this should be equal to the size of the
data files. If there is an auto-extending data file, this can be smaller. */
Gets the size of the system tablespace from the tablespace header. If
we do not have an auto-extending data file, this should be equal to
the size of the data files. If there is an auto-extending data file,
this can be smaller. */
UNIV_INTERN
ulint
fsp_header_get_tablespace_size
(
/*===========================*/
fsp_header_get_tablespace_size
(
void
)
/*===========================
=====
*/
/* out: size in pages */
ulint
space
)
/* in: space id, must be 0 */
{
fsp_header_t
*
header
;
ulint
size
;
ulint
zip_size
;
mtr_t
mtr
;
ut_a
(
space
==
0
);
/* We have only one log_fsp_current_... variable */
mtr_start
(
&
mtr
);
mtr_x_lock
(
fil_space_get_latch
(
space
,
&
zip_size
),
&
mtr
);
mtr_x_lock
(
fil_space_get_latch
(
0
,
NULL
),
&
mtr
);
header
=
fsp_get_space_header
(
space
,
zip_size
,
&
mtr
);
header
=
fsp_get_space_header
(
0
,
0
,
&
mtr
);
size
=
mtr_read_ulint
(
header
+
FSP_SIZE
,
MLOG_4BYTES
,
&
mtr
);
...
...
include/fsp0fsp.h
View file @
9be9363c
...
...
@@ -46,26 +46,25 @@ void
fsp_init
(
void
);
/*==========*/
/**************************************************************************
Gets the current free limit of
a tablespace. The free limit means the
place of the first page which has never been put to the the free list
f
or allocation. The space above that address is initialized to zero.
Sets also the global variable log_fsp_current_free_limit. */
Gets the current free limit of
the system tablespace. The free limit
means the place of the first page which has never been put to the the
f
ree list for allocation. The space above that address is initialized
to zero.
Sets also the global variable log_fsp_current_free_limit. */
UNIV_INTERN
ulint
fsp_header_get_free_limit
(
/*======================*/
fsp_header_get_free_limit
(
void
);
/*======================
=====
*/
/* out: free limit in megabytes */
ulint
space
);
/* in: space id, must be 0 */
/**************************************************************************
Gets the size of the tablespace from the tablespace header. If we do not
have an auto-extending data file, this should be equal to the size of the
data files. If there is an auto-extending data file, this can be smaller. */
Gets the size of the system tablespace from the tablespace header. If
we do not have an auto-extending data file, this should be equal to
the size of the data files. If there is an auto-extending data file,
this can be smaller. */
UNIV_INTERN
ulint
fsp_header_get_tablespace_size
(
/*===========================*/
fsp_header_get_tablespace_size
(
void
);
/*===========================
=====
*/
/* out: size in pages */
ulint
space
);
/* in: space id, must be 0 */
/**************************************************************************
Reads the file space size stored in the header page. */
UNIV_INTERN
...
...
srv/srv0start.c
View file @
9be9363c
...
...
@@ -1436,7 +1436,7 @@ innobase_start_or_create_for_mysql(void)
/* Initialize the fsp free limit global variable in the log
system */
fsp_header_get_free_limit
(
0
);
fsp_header_get_free_limit
();
recv_recovery_from_archive_finish
();
#endif
/* UNIV_LOG_ARCHIVE */
...
...
@@ -1491,7 +1491,7 @@ innobase_start_or_create_for_mysql(void)
/* Initialize the fsp free limit global variable in the log
system */
fsp_header_get_free_limit
(
0
);
fsp_header_get_free_limit
();
/* recv_recovery_from_checkpoint_finish needs trx lists which
are initialized in trx_sys_init_at_db_start(). */
...
...
@@ -1576,7 +1576,7 @@ innobase_start_or_create_for_mysql(void)
sum_of_data_file_sizes
+=
srv_data_file_sizes
[
i
];
}
tablespace_size_in_header
=
fsp_header_get_tablespace_size
(
0
);
tablespace_size_in_header
=
fsp_header_get_tablespace_size
();
if
(
!
srv_auto_extend_last_data_file
&&
sum_of_data_file_sizes
!=
tablespace_size_in_header
)
{
...
...
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