Skip to content

MDEV-34210 Improve auto-inc upgrade check message#4602

Merged
vuvova merged 1 commit intoMariaDB:10.11from
tonychen2001:10.11-MDEV-34210
Apr 18, 2026
Merged

MDEV-34210 Improve auto-inc upgrade check message#4602
vuvova merged 1 commit intoMariaDB:10.11from
tonychen2001:10.11-MDEV-34210

Conversation

@tonychen2001
Copy link
Copy Markdown
Contributor

Description

Improvements to clarity for auto increment checks during CHECK TABLE FOR UPGRADE operations. The message now makes it clear that a CHECK TABLE FOR UPGRADE must 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_import MTR 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.

@tonychen2001
Copy link
Copy Markdown
Contributor Author

tonychen2001 commented Jan 29, 2026

Test failure on Windows ARM64 seems unrelated

main.udf_query_cache                     w5 [ fail ]

@@ -9,7 +9,7 @@
 metaphon('MySQL')
 show status like "Qcache_hits";
 Variable_name	Value
-Qcache_hits	0
+Qcache_hits	2
 show status like "Qcache_queries_in_cache";
 Variable_name	Value
 Qcache_queries_in_cache	0
@@ -17,7 +17,7 @@
 metaphon('MySQL')
 show status like "Qcache_hits";
 Variable_name	Value
-Qcache_hits	0
+Qcache_hits	2
 show status like "Qcache_queries_in_cache";
 Variable_name	Value
 Qcache_queries_in_cache	0

Result content mismatch

@gkodinov gkodinov added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Feb 3, 2026
Copy link
Copy Markdown
Contributor

@svoj svoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 gkodinov changed the title MDEV-34210 Improve auto-inc upgrade check message MDEV-34210 Improve auto-inc upgrade check message Feb 17, 2026
Copy link
Copy Markdown
Member

@gkodinov gkodinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

@gkodinov gkodinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@tonychen2001 tonychen2001 changed the base branch from main to 10.11 March 23, 2026 19:28
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 23, 2026

CLA assistant check
All committers have signed the CLA.

@vuvova vuvova force-pushed the 10.11-MDEV-34210 branch from f32a241 to 5e82cc4 Compare April 17, 2026 18:25
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.
@vuvova vuvova force-pushed the 10.11-MDEV-34210 branch from 5e82cc4 to 55f0992 Compare April 17, 2026 22:13
@vuvova vuvova merged commit 78742b2 into MariaDB:10.11 Apr 18, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements.

Development

Successfully merging this pull request may close these issues.

5 participants