[Bug]: DECIMAL/FLOAT/DOUBLE scale > precision error always names a hard-coded column 'a'
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #33364 @MatrixAdventurer による — マージされずにクローズ
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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 智能体执行。
- 主要言語
- Go
- スター
- 1.9k
- フォーク
- 312
- 平均マージ
- 22時間 59分
- マージ済み PR(30日)
- 736
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
matrixorigin/matrixone のほかの issue
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
matrixorigin/matrixone#33363 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
matrixorigin/matrixone#33362 ·
メンテナーはふだん 1 日以内に返信
-
SLEEP rejects NULL and negative durations that MySQL accepts対応中かも @XuPeng-SH が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
matrixorigin/matrixone#32653 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: TestChangeWatchProxy loses its first tenant connection during PingContext in Ubuntu CI対応中かも @XuPeng-SH が今日担当しました。 オープンkind/bug needs-triage
matrixorigin/matrixone#33371 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: TestDaemonClaimSQLRoundTrip exhausts its shared deadline during the stale claim update in Ubuntu CI対応中かも @XuPeng-SH が今日担当しました。 オープンkind/bug needs-triage
matrixorigin/matrixone#33370 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
matrixorigin/matrixone の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pg-sharding/spqr#3314 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
slavakurilyak/awesome-ai-agents#1051 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
google-gemini/gemini-api-cli#247 ·
メンテナーはふだん 1 日以内に返信