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
39ed0743
Commit
39ed0743
authored
Mar 26, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-12266: Remove trx_undo_t::space
parent
5dd5b6ca
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
17 deletions
+15
-17
storage/innobase/include/trx0undo.h
storage/innobase/include/trx0undo.h
+0
-2
storage/innobase/trx/trx0rec.cc
storage/innobase/trx/trx0rec.cc
+1
-1
storage/innobase/trx/trx0roll.cc
storage/innobase/trx/trx0roll.cc
+1
-1
storage/innobase/trx/trx0trx.cc
storage/innobase/trx/trx0trx.cc
+1
-1
storage/innobase/trx/trx0undo.cc
storage/innobase/trx/trx0undo.cc
+12
-12
No files found.
storage/innobase/include/trx0undo.h
View file @
39ed0743
...
@@ -361,8 +361,6 @@ struct trx_undo_t {
...
@@ -361,8 +361,6 @@ struct trx_undo_t {
id */
id */
trx_rseg_t
*
rseg
;
/*!< rseg where the undo log belongs */
trx_rseg_t
*
rseg
;
/*!< rseg where the undo log belongs */
/*-----------------------------*/
/*-----------------------------*/
ulint
space
;
/*!< space id where the undo log
placed */
ulint
hdr_page_no
;
/*!< page number of the header page in
ulint
hdr_page_no
;
/*!< page number of the header page in
the undo log */
the undo log */
ulint
hdr_offset
;
/*!< header offset of the undo log on
ulint
hdr_offset
;
/*!< header offset of the undo log on
...
...
storage/innobase/trx/trx0rec.cc
View file @
39ed0743
...
@@ -2124,7 +2124,7 @@ trx_undo_report_row_operation(
...
@@ -2124,7 +2124,7 @@ trx_undo_report_row_operation(
" log pages. Please add new data file to the tablespace or"
" log pages. Please add new data file to the tablespace or"
" check if filesystem is full or enable auto-extension for"
" check if filesystem is full or enable auto-extension for"
" the tablespace"
,
" the tablespace"
,
undo
->
space
==
TRX_SYS_SPACE
undo
->
rseg
->
space
==
TRX_SYS_SPACE
?
"system"
:
is_temp
?
"temporary"
:
"undo"
);
?
"system"
:
is_temp
?
"temporary"
:
"undo"
);
/* Did not succeed: out of space */
/* Did not succeed: out of space */
...
...
storage/innobase/trx/trx0roll.cc
View file @
39ed0743
...
@@ -924,7 +924,7 @@ trx_roll_pop_top_rec(
...
@@ -924,7 +924,7 @@ trx_roll_pop_top_rec(
ut_ad
(
mutex_own
(
&
trx
->
undo_mutex
));
ut_ad
(
mutex_own
(
&
trx
->
undo_mutex
));
page_t
*
undo_page
=
trx_undo_page_get_s_latched
(
page_t
*
undo_page
=
trx_undo_page_get_s_latched
(
page_id_t
(
undo
->
space
,
undo
->
top_page_no
),
mtr
);
page_id_t
(
undo
->
rseg
->
space
,
undo
->
top_page_no
),
mtr
);
ulint
offset
=
undo
->
top_offset
;
ulint
offset
=
undo
->
top_offset
;
...
...
storage/innobase/trx/trx0trx.cc
View file @
39ed0743
...
@@ -688,7 +688,7 @@ trx_resurrect_table_locks(
...
@@ -688,7 +688,7 @@ trx_resurrect_table_locks(
/* trx_rseg_mem_create() may have acquired an X-latch on this
/* trx_rseg_mem_create() may have acquired an X-latch on this
page, so we cannot acquire an S-latch. */
page, so we cannot acquire an S-latch. */
undo_page
=
trx_undo_page_get
(
undo_page
=
trx_undo_page_get
(
page_id_t
(
undo
->
space
,
undo
->
top_page_no
),
&
mtr
);
page_id_t
(
undo
->
rseg
->
space
,
undo
->
top_page_no
),
&
mtr
);
undo_rec
=
undo_page
+
undo
->
top_offset
;
undo_rec
=
undo_page
+
undo
->
top_offset
;
...
...
storage/innobase/trx/trx0undo.cc
View file @
39ed0743
...
@@ -782,9 +782,9 @@ trx_undo_add_page(trx_t* trx, trx_undo_t* undo, mtr_t* mtr)
...
@@ -782,9 +782,9 @@ trx_undo_add_page(trx_t* trx, trx_undo_t* undo, mtr_t* mtr)
mutex_enter
(
&
rseg
->
mutex
);
mutex_enter
(
&
rseg
->
mutex
);
header_page
=
trx_undo_page_get
(
header_page
=
trx_undo_page_get
(
page_id_t
(
undo
->
space
,
undo
->
hdr_page_no
),
mtr
);
page_id_t
(
undo
->
rseg
->
space
,
undo
->
hdr_page_no
),
mtr
);
if
(
!
fsp_reserve_free_extents
(
&
n_reserved
,
undo
->
space
,
1
,
if
(
!
fsp_reserve_free_extents
(
&
n_reserved
,
undo
->
rseg
->
space
,
1
,
FSP_UNDO
,
mtr
))
{
FSP_UNDO
,
mtr
))
{
goto
func_exit
;
goto
func_exit
;
}
}
...
@@ -794,7 +794,7 @@ trx_undo_add_page(trx_t* trx, trx_undo_t* undo, mtr_t* mtr)
...
@@ -794,7 +794,7 @@ trx_undo_add_page(trx_t* trx, trx_undo_t* undo, mtr_t* mtr)
+
header_page
,
+
header_page
,
undo
->
top_page_no
+
1
,
FSP_UP
,
TRUE
,
mtr
,
mtr
);
undo
->
top_page_no
+
1
,
FSP_UP
,
TRUE
,
mtr
,
mtr
);
fil_space_release_free_extents
(
undo
->
space
,
n_reserved
);
fil_space_release_free_extents
(
undo
->
rseg
->
space
,
n_reserved
);
if
(
!
new_block
)
{
if
(
!
new_block
)
{
goto
func_exit
;
goto
func_exit
;
...
@@ -884,7 +884,7 @@ trx_undo_free_last_page(trx_undo_t* undo, mtr_t* mtr)
...
@@ -884,7 +884,7 @@ trx_undo_free_last_page(trx_undo_t* undo, mtr_t* mtr)
ut_ad
(
undo
->
size
>
0
);
ut_ad
(
undo
->
size
>
0
);
undo
->
last_page_no
=
trx_undo_free_page
(
undo
->
last_page_no
=
trx_undo_free_page
(
undo
->
rseg
,
FALSE
,
undo
->
space
,
undo
->
rseg
,
FALSE
,
undo
->
rseg
->
space
,
undo
->
hdr_page_no
,
undo
->
last_page_no
,
mtr
);
undo
->
hdr_page_no
,
undo
->
last_page_no
,
mtr
);
undo
->
size
--
;
undo
->
size
--
;
...
@@ -909,7 +909,8 @@ trx_undo_truncate_end(trx_undo_t* undo, undo_no_t limit, bool is_temp)
...
@@ -909,7 +909,8 @@ trx_undo_truncate_end(trx_undo_t* undo, undo_no_t limit, bool is_temp)
trx_undo_rec_t
*
trunc_here
=
NULL
;
trx_undo_rec_t
*
trunc_here
=
NULL
;
page_t
*
undo_page
=
trx_undo_page_get
(
page_t
*
undo_page
=
trx_undo_page_get
(
page_id_t
(
undo
->
space
,
undo
->
last_page_no
),
&
mtr
);
page_id_t
(
undo
->
rseg
->
space
,
undo
->
last_page_no
),
&
mtr
);
trx_undo_rec_t
*
rec
=
trx_undo_page_get_last_rec
(
trx_undo_rec_t
*
rec
=
trx_undo_page_get_last_rec
(
undo_page
,
undo
->
hdr_page_no
,
undo
->
hdr_offset
);
undo_page
,
undo
->
hdr_page_no
,
undo
->
hdr_offset
);
while
(
rec
)
{
while
(
rec
)
{
...
@@ -1049,7 +1050,7 @@ trx_undo_seg_free(
...
@@ -1049,7 +1050,7 @@ trx_undo_seg_free(
mutex_enter
(
&
(
rseg
->
mutex
));
mutex_enter
(
&
(
rseg
->
mutex
));
seg_header
=
trx_undo_page_get
(
page_id_t
(
undo
->
space
,
seg_header
=
trx_undo_page_get
(
page_id_t
(
undo
->
rseg
->
space
,
undo
->
hdr_page_no
),
undo
->
hdr_page_no
),
&
mtr
)
&
mtr
)
+
TRX_UNDO_SEG_HDR
;
+
TRX_UNDO_SEG_HDR
;
...
@@ -1215,7 +1216,6 @@ trx_undo_mem_create(
...
@@ -1215,7 +1216,6 @@ trx_undo_mem_create(
undo
->
rseg
=
rseg
;
undo
->
rseg
=
rseg
;
undo
->
space
=
rseg
->
space
;
undo
->
hdr_page_no
=
page_no
;
undo
->
hdr_page_no
=
page_no
;
undo
->
hdr_offset
=
offset
;
undo
->
hdr_offset
=
offset
;
undo
->
last_page_no
=
page_no
;
undo
->
last_page_no
=
page_no
;
...
@@ -1340,7 +1340,7 @@ trx_undo_reuse_cached(trx_t* trx, trx_rseg_t* rseg, trx_undo_t** pundo,
...
@@ -1340,7 +1340,7 @@ trx_undo_reuse_cached(trx_t* trx, trx_rseg_t* rseg, trx_undo_t** pundo,
ut_ad
(
undo
->
size
==
1
);
ut_ad
(
undo
->
size
==
1
);
ut_ad
(
undo
->
id
<
TRX_RSEG_N_SLOTS
);
ut_ad
(
undo
->
id
<
TRX_RSEG_N_SLOTS
);
buf_block_t
*
block
=
buf_page_get
(
page_id_t
(
undo
->
space
,
buf_block_t
*
block
=
buf_page_get
(
page_id_t
(
undo
->
rseg
->
space
,
undo
->
hdr_page_no
),
undo
->
hdr_page_no
),
univ_page_size
,
RW_X_LATCH
,
mtr
);
univ_page_size
,
RW_X_LATCH
,
mtr
);
if
(
!
block
)
{
if
(
!
block
)
{
...
@@ -1401,7 +1401,7 @@ trx_undo_assign(trx_t* trx, dberr_t* err, mtr_t* mtr)
...
@@ -1401,7 +1401,7 @@ trx_undo_assign(trx_t* trx, dberr_t* err, mtr_t* mtr)
if
(
undo
)
{
if
(
undo
)
{
return
buf_page_get_gen
(
return
buf_page_get_gen
(
page_id_t
(
undo
->
space
,
undo
->
last_page_no
),
page_id_t
(
undo
->
rseg
->
space
,
undo
->
last_page_no
),
univ_page_size
,
RW_X_LATCH
,
univ_page_size
,
RW_X_LATCH
,
buf_pool_is_obsolete
(
undo
->
withdraw_clock
)
buf_pool_is_obsolete
(
undo
->
withdraw_clock
)
?
NULL
:
undo
->
guess_block
,
?
NULL
:
undo
->
guess_block
,
...
@@ -1458,7 +1458,7 @@ trx_undo_assign_low(trx_t* trx, trx_rseg_t* rseg, trx_undo_t** undo,
...
@@ -1458,7 +1458,7 @@ trx_undo_assign_low(trx_t* trx, trx_rseg_t* rseg, trx_undo_t** undo,
if
(
*
undo
)
{
if
(
*
undo
)
{
return
buf_page_get_gen
(
return
buf_page_get_gen
(
page_id_t
(
(
*
undo
)
->
space
,
(
*
undo
)
->
last_page_no
),
page_id_t
(
rseg
->
space
,
(
*
undo
)
->
last_page_no
),
univ_page_size
,
RW_X_LATCH
,
univ_page_size
,
RW_X_LATCH
,
buf_pool_is_obsolete
((
*
undo
)
->
withdraw_clock
)
buf_pool_is_obsolete
((
*
undo
)
->
withdraw_clock
)
?
NULL
:
(
*
undo
)
->
guess_block
,
?
NULL
:
(
*
undo
)
->
guess_block
,
...
@@ -1508,7 +1508,7 @@ trx_undo_set_state_at_finish(
...
@@ -1508,7 +1508,7 @@ trx_undo_set_state_at_finish(
ut_a
(
undo
->
id
<
TRX_RSEG_N_SLOTS
);
ut_a
(
undo
->
id
<
TRX_RSEG_N_SLOTS
);
undo_page
=
trx_undo_page_get
(
undo_page
=
trx_undo_page_get
(
page_id_t
(
undo
->
space
,
undo
->
hdr_page_no
),
mtr
);
page_id_t
(
undo
->
rseg
->
space
,
undo
->
hdr_page_no
),
mtr
);
seg_hdr
=
undo_page
+
TRX_UNDO_SEG_HDR
;
seg_hdr
=
undo_page
+
TRX_UNDO_SEG_HDR
;
page_hdr
=
undo_page
+
TRX_UNDO_PAGE_HDR
;
page_hdr
=
undo_page
+
TRX_UNDO_PAGE_HDR
;
...
@@ -1552,7 +1552,7 @@ trx_undo_set_state_at_prepare(
...
@@ -1552,7 +1552,7 @@ trx_undo_set_state_at_prepare(
ut_a
(
undo
->
id
<
TRX_RSEG_N_SLOTS
);
ut_a
(
undo
->
id
<
TRX_RSEG_N_SLOTS
);
undo_page
=
trx_undo_page_get
(
undo_page
=
trx_undo_page_get
(
page_id_t
(
undo
->
space
,
undo
->
hdr_page_no
),
mtr
);
page_id_t
(
undo
->
rseg
->
space
,
undo
->
hdr_page_no
),
mtr
);
seg_hdr
=
undo_page
+
TRX_UNDO_SEG_HDR
;
seg_hdr
=
undo_page
+
TRX_UNDO_SEG_HDR
;
...
...
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