forked from facebook/mysql-5.6
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FB8-265: main.innodb_pk_extension_on fail in 8.0.23 after porting fro…
…m 8.0.20 https://jira.percona.com/browse/FB8-265 Failing MTR tests: main.innodb_pk_extension_on main.innodb_pk_extension_off Reason: 8.0.23 reworked logic in in dd_table_share.cc::prepare_share(). In particular commit ff4d6b9 fixed add_pk_parts_to_sk() to not add PK parts to SK if the key size exceeds MAX_REF_PARTS limit. However, commit ff4d6b9 moved the part of setting initial value of field->part_of_key after the call to add_pk_parts_to_sk(). This resulted in wrong field->part_of_key value. Solution: Partially revert fix done in commit ff4d6b9. This is not needed now, as we introduced 'goto restart' logic in commit 8dae15d Failing MTR test: rocksdb.rocksdb_parts Reason: For partitioned tables, the handler_file inside dd_table_share.cc::prepare_share() points to ha_rockspart object which inherits from Partition_base. The method init_with_fields() is not overrode however, and the implementation provided by Partition_base does nothing if handler is not initialized (underlying ha_rocksdb handlers are not created/initialized). ha_rockspart handler is opened after share is prepared, but it is too late, as we need to know if HA_PRIMARY_KEY_IN_READ_INDEX is set inside prepare_share() Solution: Override implementation of init_with_fields() in ha_rockspart. We take the advantage of the fact that RocksDB sets HA_PRIMARY_KEY_IN_READ_INDEX flag if primary key is present, so we can make the decision in this scope before creation of underlying partitions handlers. This way the flow inside dd_table_share.cc::prepare_share() is able to determine proper state of HA_PRIMARY_KEY_IN_READ_INDEX for ha_rockspart handler as well.
- Loading branch information
1 parent
484becb
commit 865b375
Showing
4 changed files
with
46 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters