[Bug]: index on a missing column returns 20301 'column is not exist' instead of ER_KEY_COLUMN_DOES_NOT_EXIST 1072
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 74/100
Línea de trabajo
Empieza por los constructores de índices en build_ddl.go y compara cómo gestionan las columnas inexistentes con el uso existente de moerr.NewErrKeyColumnDoesNotExist para ALTER TABLE ADD PRIMARY KEY. Reprodúcelo con una de las sentencias SQL del issue y comprueba después que los casos habituales de índices devuelven el error 1072 con SQLSTATE 42000.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is there an existing issue for the same bug?
- I have checked the existing issues (searched
is not exist,Key column,1072).
Branch Name
main (9bf005bf)
Describe the bug
When a regular index (KEY / INDEX / UNIQUE, in CREATE TABLE, CREATE [UNIQUE] INDEX or ALTER TABLE ADD INDEX) names a column the table does not have, MO returns the generic error 20301 invalid input: column 'x' is not exist. MySQL returns ER_KEY_COLUMN_DOES_NOT_EXIST (1072, SQLSTATE 42000) Key column 'x' doesn't exist in table. Migration tools and ORMs that match on the error number cannot recognize the MO error.
MO already has moerr.NewErrKeyColumnDoesNotExist (used by ALTER TABLE ADD PRIMARY KEY). The index builders in build_ddl.go (unique, secondary, fulltext-type and spatial checks) still use NewInvalidInputf("column '%s' is not exist").
Steps to reproduce
CREATE TABLE t4 (a INT, b INT, KEY (c));
CREATE TABLE t5 (a INT PRIMARY KEY, UNIQUE KEY uk (col10));
CREATE TABLE t6 (col1 INT, col2 CHAR(15));
CREATE UNIQUE INDEX m3 ON t6 (col3);
Expected behavior (MySQL 8.4)
ERROR 1072 (42000): Key column 'c' doesn't exist in table
ERROR 1072 (42000): Key column 'col10' doesn't exist in table
ERROR 1072 (42000): Key column 'col3' doesn't exist in table
Actual behavior (MatrixOne main 9bf005bf)
ERROR 20301: invalid input: column 'c' is not exist
ERROR 20301: invalid input: column 'col10' is not exist
ERROR 20301: invalid input: column 'col3' is not exist
Additional information
Single-node mo-service -launch etc/launch/launch.toml. Vector index plugins (IVFFLAT/HNSW/…) are MO-specific and out of scope.
本操作由 LW 授权的 Grok Bot 智能体执行。
- Lenguaje dominante
- Go
- Estrellas
- 1.9k
- Forks
- 312
- Merge medio
- 22 h 59 min
- PR fusionados (30 d)
- 736
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de matrixorigin/matrixone
-
kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
matrixorigin/matrixone#33363 ·
Los mantenedores suelen responder en 1 día
-
SLEEP rejects NULL and negative durations that MySQL acceptsPosiblemente ocupada @XuPeng-SH la tomó hace 7 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
matrixorigin/matrixone#32653 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: TestChangeWatchProxy loses its first tenant connection during PingContext in Ubuntu CIPosiblemente ocupada @XuPeng-SH la tomó hoy. Abiertokind/bug needs-triage
matrixorigin/matrixone#33371 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Bug]: TestDaemonClaimSQLRoundTrip exhausts its shared deadline during the stale claim update in Ubuntu CIPosiblemente ocupada @XuPeng-SH la tomó hoy. Abiertokind/bug needs-triage
matrixorigin/matrixone#33370 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Bug]: TestCreateAndDeleteHashBasedWithAccount times out creating its tenant database in Ubuntu CIPosiblemente ocupada @XuPeng-SH la tomó hoy. Abiertokind/bug needs-triage
matrixorigin/matrixone#33369 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de matrixorigin/matrixone
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
pg-sharding/spqr#3314 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
zalando/postgres-operator#3257 ·
Los mantenedores suelen responder en 2 días
-
[inputs.internal] README lists go_version tag on internal_gather instead of internal_agentPosiblemente ocupada @cvas22 la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
influxdata/telegraf#20264 ·
Los mantenedores suelen responder en 1 día