schemadiff
: introduce "atomic diffs" concept.
#15842
Labels
Component: Query Serving
Type: Enhancement
Logical improvement (somewhere between a bug and feature)
schemadiff
already knows how to split incompatible diffs into multiple changes. For example, one cannot add twoFULLTEXT
indexes in the sameALTER TABLE
statement.schemadiff
uses the notion ofsubsequentDiff
, a linked list that can be turned into a slice of diffs. With this mechanism,schemadiff
can break complex changes into valid, optimized smaller changes.However, these are not necessarily atomic. One particular use case, changed recently in #15698, is when we drop multiple partitions in one statement, as in
ALTER TABLE ... DROP PARTITION p1, p2, p3
. This multi-partition statement is in fact the most correct form, because in MySQL you may not run twoDROP PARTITION
statements in a singleALTER TABLE
, and also because it is he most succinct and descriptive form.So far so good. But for analysis reasons, we sometimes may want to have an even deeper breakdown, so we can identify distinct changes.
Some breakdown can be complex. For example, if we add column and add index on that column, then there is a dependency between the changes.
The text was updated successfully, but these errors were encountered: