You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATEDATABASEalias_prefix;
USE alias_prefix;
CREATETABLEt (
id INTPRIMARY KEY,
`__mo_alias_payload`VARCHAR(32),
KEY idx_alias (`__mo_alias_payload`(2))
);
SHOW CREATE TABLE t;
Expected
The internal alias namespace must not be usable for user columns, or a legal user identifier must round-trip through SHOW CREATE with its index definition intact.
Actual
CREATE TABLE succeeds. SHOW CREATE TABLE produces an empty index key list and then fails to parse it:
ERROR 1105 (HY000): syntax error near ")"
The regular secondary-index builder and SHOW CREATE both identify aliases by the raw _mo_alias prefix, so a user column is mistaken for the hidden primary-key suffix.
Scope / duplicate check
This is distinct from #26823 (delimiter-safe prefix-length metadata), #26822 (stale metadata on column rename), #26818, and #26813. I searched recent MatrixOne issues for "__mo_alias", "alias prefix", "reserved column name index", and SHOW CREATE index syntax errors; none describe this collision.
Fixed in d380dc711fe2df93f7cd69139f7f059f1fbf8251.
The _mo_alias prefix is now explicitly reserved wherever user column names enter the planner:
CREATE TABLE
CREATE TABLE AS SELECT
ALTER TABLE ADD COLUMN
ALTER TABLE CHANGE COLUMN
ALTER TABLE RENAME COLUMN
This matches the existing regular-index implementation, which uses the prefix for its hidden primary-key suffix. Rejecting the collision prevents new schemas from becoming non-round-trippable or producing an invalid empty key list in SHOW CREATE.
Validation:
New white-box validation test.
New distributed coverage verifies every rejection path plus a normal CTAS control: 13/13.
Existing ALTER TABLE RENAME COLUMN suite: 269/269.
Existing ALTER TABLE CHANGE COLUMN suite: 923/923.
Full pkg/sql/plan test suite, controlled go vet, and make build passed.
Verified on the exact merge commit ac339444b558daf2c3d7fe63f755743449db7696, with an 08770e1 baseline comparison.
Baseline: user columns in the internal __mo_alias_ namespace were accepted by CREATE TABLE, CTAS, ALTER ADD, CHANGE, and RENAME, producing non-round-trippable index metadata.
Fix verification: all five entry points reject the namespace, including a mixed-case spelling. The resulting schema has zero user-visible __mo_alias_ columns and valid SHOW CREATE output for unaffected tables.
Conclusion: the reported namespace-collision defect is fixed. Closing.
Activity
LeftHandCold commentedon Aug 9, 2026
Fixed in d380dc711fe2df93f7cd69139f7f059f1fbf8251.
The _mo_alias prefix is now explicitly reserved wherever user column names enter the planner:
This matches the existing regular-index implementation, which uses the prefix for its hidden primary-key suffix. Rejecting the collision prevents new schemas from becoming non-round-trippable or producing an invalid empty key list in SHOW CREATE.
Validation:
fix(ddl): reserve internal index alias column names (matrixorigin#26824)
fix(ddl): reserve internal index alias column names (matrixorigin#26824)
fix: harden regular prefix index correctness (#26829)
LeftHandCold commentedon Aug 11, 2026
Validation result — fixed by #26829.
Verified on the exact merge commit
ac339444b558daf2c3d7fe63f755743449db7696, with an08770e1baseline comparison.Baseline: user columns in the internal
__mo_alias_namespace were accepted by CREATE TABLE, CTAS, ALTER ADD, CHANGE, and RENAME, producing non-round-trippable index metadata.Fix verification: all five entry points reject the namespace, including a mixed-case spelling. The resulting schema has zero user-visible
__mo_alias_columns and valid SHOW CREATE output for unaffected tables.Conclusion: the reported namespace-collision defect is fixed. Closing.
fix: harden regular prefix index correctness (matrixorigin#26829)
fix: harden regular prefix index correctness (matrixorigin#26829)
fix: harden regular prefix index correctness (matrixorigin#26829)