-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MDEV-35494 fil_space_t::fil_space_t() may be unsafe with GCC -flifetime-dse #3659
Conversation
|
6458cf3
to
9399900
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dr-m The initialization of fil_space_t
and other refactoring looks good to me. I have some minor comments/suggestion on the patch. Please have a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dr-m for addressing the comments. Looks good to me. I have one observation in the latest change.
…me-dse fil_space_t::create(): Instead of invoking the default fil_space_t constructor on a zero-filled buffer, allocate an uninitialized buffer and invoke an explicitly defined constructor on it. Also, specify initializer expressions for all constant data members, so that all of them will be initialized in the constructor. fil_space_t::being_imported: Replaces part of fil_space_t::purpose. fil_space_t::is_being_imported(), fil_space_t::is_temporary(): Replaces fil_space_t::purpose. fil_space_t::id: Changed the type from ulint to uint32_t to reduce incompatibility with later branches that include commit ca501ff (MDEV-26195). fil_space_t::try_to_close(): Do not attempt to close files that are in an I/O bound phase of ALTER TABLE…IMPORT TABLESPACE. log_file_op, first_page_init: recv_spaces_t: Use uint32_t for the tablespace id. Reviewed by: Debarun Banerjee
1a4b97f
to
bfe7c8f
Compare
Description
fil_space_t::create()
: Instead of invoking the defaultfil_space_t
constructor on a zero-filled buffer, allocate an uninitialized buffer and invoke an explicitly defined constructor on it. Also, specify initializer expressions for all constant data members, so that all of them will be initialized in the constructor.fil_space_t::being_imported
: Replaces part offil_space_t::purpose
.fil_space_t::is_being_imported()
,fil_space_t::is_temporary()
: Replacesfil_space_t::purpose
.fil_space_t::id
: Changed the type fromulint
touint32_t
to reduce incompatibility with later branches that includecommit ca501ff (MDEV-26195).
log_file_op
,first_page_init
:recv_spaces_t
: Useuint32_t
for the tablespace id.Release Notes
This change should not have any noticeable effect.
How can this PR be tested?
This low level code is rather well covered by the regression test suite. As always, some additional stress testing with the random query generator (RQG) will be useful.
Basing the PR against the correct MariaDB version
main
branch.This is a portability bug fix that would be partly applicable to 10.5, but the 10.5 version would require some nontrivial adjustments, and the 10.5 branch is close to its end of life (EOL).
PR quality check