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
e1349c7e
Commit
e1349c7e
authored
Oct 09, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
row_undo_mod_clust(): Fix the trx_id_offset for the metadata record
parent
78e7a16b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
11 deletions
+24
-11
storage/innobase/row/row0umod.cc
storage/innobase/row/row0umod.cc
+24
-11
No files found.
storage/innobase/row/row0umod.cc
View file @
e1349c7e
...
...
@@ -415,18 +415,31 @@ row_undo_mod_clust(
goto
mtr_commit_exit
;
}
ulint
trx_id_offset
=
index
->
trx_id_offset
;
ulint
trx_id_pos
=
index
->
n_uniq
?
index
->
n_uniq
:
1
;
ut_ad
(
index
->
n_uniq
<=
MAX_REF_PARTS
);
/* Reserve enough offsets for the PRIMARY KEY and 2 columns
so that we can access DB_TRX_ID, DB_ROLL_PTR. */
ulint
offsets_
[
REC_OFFS_HEADER_SIZE
+
MAX_REF_PARTS
+
2
];
rec_offs_init
(
offsets_
);
offsets
=
rec_get_offsets
(
rec
,
index
,
offsets_
,
true
,
trx_id_pos
+
2
,
&
heap
);
ulint
len
;
ulint
trx_id_offset
=
rec_get_nth_field_offs
(
offsets
,
trx_id_pos
,
&
len
);
ut_ad
(
len
==
DATA_TRX_ID_LEN
);
if
(
trx_id_offset
)
{
}
else
if
(
rec_is_metadata
(
rec
,
*
index
))
{
ut_ad
(
!
buf_block_get_page_zip
(
btr_pcur_get_block
(
&
node
->
pcur
)));
for
(
unsigned
i
=
index
->
first_user_field
();
i
--
;
)
{
trx_id_offset
+=
index
->
fields
[
i
].
fixed_len
;
}
}
else
{
ut_ad
(
index
->
n_uniq
<=
MAX_REF_PARTS
);
/* Reserve enough offsets for the PRIMARY KEY and
2 columns so that we can access
DB_TRX_ID, DB_ROLL_PTR. */
ulint
offsets_
[
REC_OFFS_HEADER_SIZE
+
MAX_REF_PARTS
+
2
];
rec_offs_init
(
offsets_
);
offsets
=
rec_get_offsets
(
rec
,
index
,
offsets_
,
true
,
trx_id_pos
+
2
,
&
heap
);
ulint
len
;
trx_id_offset
=
rec_get_nth_field_offs
(
offsets
,
trx_id_pos
,
&
len
);
ut_ad
(
len
==
DATA_TRX_ID_LEN
);
}
if
(
trx_read_trx_id
(
rec
+
trx_id_offset
)
==
node
->
new_trx_id
)
{
ut_ad
(
!
rec_get_deleted_flag
(
...
...
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