[Bug]: DECIMAL/FLOAT/DOUBLE scale > precision error always names a hard-coded column 'a'
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
- #33364 de @MatrixAdventurer — cerrado sin fusionar
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
The issue identifies five checks in mysql_sql.y; start by reading those type rules and how parser errors receive column names for regular columns and CAST targets. Compare the resulting errors with the MySQL 8.4 examples in the issue, including the stray ). Done means the error reports the appropriate column name (empty for CAST) without the extra parenthesis.
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
M must be >= D,column 'a',decimal(M,D)).
Branch Name
main (9bf005bf)
Describe the bug
When a DECIMAL/NUMERIC/FLOAT/DOUBLE type has a scale larger than its precision, the parser error always names a column 'a'. It does this for every column name, and also for a CAST target, which has no column at all. The message also has a stray ).
The five M must be >= D checks in mysql_sql.y all use the literal string "... M must be >= D (column 'a'))". The type rule does not know the column name, so the name is just a hard-coded placeholder. Users looking at a wide table get pointed at a column that may not exist.
Steps to reproduce
CREATE TABLE t (id INT PRIMARY KEY, price DECIMAL(5,6));
CREATE TABLE t2 (ratio DOUBLE(3,4));
SELECT CAST(1 AS DECIMAL(10,11));
Expected behavior
The error must not name a column that the statement does not have. MySQL 8.4 reports error 1427 For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 'price'). (and (column '') for CAST).
Actual behavior (MatrixOne main 9bf005bf)
CREATE TABLE t (id INT PRIMARY KEY, price DECIMAL(5,6));
-- ERROR 1064: SQL parser error: ... For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 'a')) at line 1 column 54 near "));";
SELECT CAST(1 AS DECIMAL(10,11));
-- ERROR 1064: SQL parser error: ... M must be >= D (column 'a')) at line 1 column 31 near "));";
Additional information
Single-node mo-service -launch etc/launch/launch.toml.
本操作由 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
-
kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
matrixorigin/matrixone#33362 ·
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
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