Bug #106213 SchemaVersion set to 0 on index tables at ALTER TABLE of a primary table
Submitted: 19 Jan 2022 11:41 Modified: 28 Apr 2022 7:44
Reporter: Mikael Ronström Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:8.0.28 OS:Any
Assigned to: CPU Architecture:Any

[19 Jan 2022 11:41] Mikael Ronström
Description:
When performing an ALTER TABLE that is online we commit a new table version
on both primary tables and indexed tables. However we set the new table version to
0 on the indexed tables.

How to repeat:
No known issues at the moment, but could easily show up in the future.

Suggested fix:
Set it to either same schema version as before or set it to the new schema version with alter_object_inc.
[19 Jan 2022 11:57] MySQL Verification Team
Hello Mikael,

Thank you for the report and feedback.

Sincerely,
Umesh
[28 Mar 2022 7:44] MySQL Verification Team
Hello Mikael,

Looks like there was a follow up from Varun which was not synced with community Bug. I'm copying here for your reference.

-- Posted by Developer (Varun)

The bug could not be reproduced on either 8.0.28 or latest trunk. Is there
 any test case available which might help reproducing the issue?
 Currently, the version of a table/index is made up of 32 bits which in turn
 is comprised of two sub-versions, the major version and the minor version.
 The Major version occupies the 24 LSBs and the Minor occupies the 8 MSBs.
 Whenever a table is created, the minor version is set to 0 and the major
 version always starts with 1. So, the version of an index always starts with
 1. Whenever  an ALTER TABLE is issued on a table, the versions are
 incremented depending upon the type of ALTER. Online/inplace ALTER increments
 the minor version and Copy alter increments the major version since it
 involves 2 steps, a table drop and a recreate and where in the recreated
 table gets assigned a different major version. So, the 32bit version of an
 index is never observed to be 0 because of which the bug couldn't be
 reproduced. (edited) 

Sincerely,
Umesh
[29 Apr 2022 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".