Problem
RepairTableChecksum (cluster/cluster_chk.go) repairs diverged chunks on the master with:
DELETE FROM <schema>.<table> A WHERE <chunk condition>
This is a single-table DELETE with a table alias, which MariaDB only accepts since 11.6.1 (MDEV-33988). The backport to LTS lines was refused (MDEV-37227, Won't Fix), so on 10.5 / 10.6 / 10.11 / 11.4 the statement fails with error 1064 and cluster-checksum-repair cannot repair any chunk.
The alias cannot simply be dropped: the persisted chunkRangeCondition is built with A.-qualified primary-key predicates (A.pk >= ... AND A.pk <= ...).
Fix
Use the multi-table DELETE form, accepted by every MySQL and MariaDB version and semantically identical:
DELETE A FROM <schema>.<table> A WHERE <chunk condition>
Fixed in develop by 85546d9.
How it was found
Live use of cluster-checksum-repair against a MariaDB LTS server. The same syntax gap also affects user applications written against MySQL 8 (e.g. PrestaShop, which prompted MDEV-33988) — a good candidate for a workload advisory tag mapping the failing statement pattern to the MDEV.
Problem
RepairTableChecksum(cluster/cluster_chk.go) repairs diverged chunks on the master with:This is a single-table DELETE with a table alias, which MariaDB only accepts since 11.6.1 (MDEV-33988). The backport to LTS lines was refused (MDEV-37227, Won't Fix), so on 10.5 / 10.6 / 10.11 / 11.4 the statement fails with error 1064 and cluster-checksum-repair cannot repair any chunk.
The alias cannot simply be dropped: the persisted
chunkRangeConditionis built withA.-qualified primary-key predicates (A.pk >= ... AND A.pk <= ...).Fix
Use the multi-table DELETE form, accepted by every MySQL and MariaDB version and semantically identical:
Fixed in develop by 85546d9.
How it was found
Live use of cluster-checksum-repair against a MariaDB LTS server. The same syntax gap also affects user applications written against MySQL 8 (e.g. PrestaShop, which prompted MDEV-33988) — a good candidate for a workload advisory tag mapping the failing statement pattern to the MDEV.