MDEV-34210 Improve auto-inc upgrade check message#4602
Conversation
|
Test failure on Windows ARM64 seems unrelated |
svoj
left a comment
There was a problem hiding this comment.
Does it even make sense to run mariadb-upgrade in a read-only mode? mariadb-upgrade must contain other statements that need to modify database and they must fail too.
I believe the real culprit here is the TABLE_SHARE::keep_original_mysql_version flag. In many cases it means upgrade from MySQL, see 3c7fd3c for details.
gkodinov
left a comment
There was a problem hiding this comment.
Thank you for your contribution. This is a preliminary review.
The code formally complies with the coding standards. I'd squash the two commits in one.
Please wait for the final review.
gkodinov
left a comment
There was a problem hiding this comment.
Can you please rebase on 10.11? This seems to be the lowest version affected. And, of course, squash the commits into a single one.
fc328c0 to
f32a241
Compare
f32a241 to
5e82cc4
Compare
In commit 0381921, logic was added to fix bogus values of PAGE_ROOT_AUTO_INC when upgrading from MySQL or versions of MariaDB < 10.2.10. As part of this change, if a table's frm version was less than 10.2.10 and the server was in a read-only state (preventing the frm version from being updated), a message was introduced during the execution of CHECK TABLE FOR UPGRADE informing users that the auto_increment check would be performed on each open of the table. However, this message didn't mention the fact that the server being in a read-only state would prevent the frm version from being updated thus causing confusion as the message would not go away even after running CHECK TABLE FOR UPGRADE. The message is now improved for clarity. Additionally, we remove a redundant check in ha_innobase::check. A small simplification is made to ha_innobase::check() by removing redundant checks for `check_for_upgrade()` and handler_flags. ha_innobase::handler_flags is only set by `check_for_upgrade()`. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
5e82cc4 to
55f0992
Compare
Description
Improvements to clarity for auto increment checks during
CHECK TABLE FOR UPGRADEoperations. The message now makes it clear that aCHECK TABLE FOR UPGRADEmust be run while the engine is not in a read-only state for the auto increment check on each open notification to be cleared.Release Notes
N/A
How can this PR be tested?
Existing
innodb.autoinc_importMTR had been updated according to the new notification message.PR quality check
Copyright
All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.