Skip to content

Allow dynamic pruning mode also for transactions #29851

@mjonss

Description

@mjonss

Enhancement

Revert #26876 (#26719) and fix the underlying issue.

Might also be related to #28073?

See:

// UseDynamicPartitionPrune indicates whether use new dynamic partition prune.
func (s *SessionVars) UseDynamicPartitionPrune() bool {
if s.InTxn() {
// UnionScan cannot get partition table IDs in dynamic-mode, this is a quick-fix for issues/26719,
// please see it for more details.
return false
}
return PartitionPruneMode(s.PartitionPruneMode.Load()) == Dynamic
}

where it explicitly turns off dynamic pruning mode if there is an ongoing transaction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementThe issue or PR belongs to an enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions