[Bug]: CHAR/BINARY column wider than 255 returns 1690 'typeLen is over the MaxCharLen' instead of ER_TOO_BIG_FIELDLENGTH 1074
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 70/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- backend-api-design, databases
Direzione di ricerca
Start by reading the shared getTypeFromAst path and the existing handling for over-long VARCHAR columns, then trace how column names are available for CREATE TABLE and ALTER TABLE definitions. Check the relevant SQL tests for those statements. Done means overlong CHAR and BINARY columns return error 1074 with the offending column name, while length 255 and the separate CAST path remain unaffected.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is there an existing issue for the same bug?
- I have checked the existing issues (searched
1074,Column length too big,MaxCharLen,char(256)). #31809 and #30156 are about VARCHAR, not CHAR/BINARY.
Branch Name
main (9bf005bf)
Describe the bug
A CHAR(N) or BINARY(N) column with N > 255 is rejected with MO-internal error 1690 and the message data out of range: data type char, typeLen is over the MaxCharLen: 255. The message does not say which column is wrong. MySQL returns ER_TOO_BIG_FIELDLENGTH (1074, SQLSTATE 42000) and names the column. MO already does this for an over-long VARCHAR column.
The check is in the shared getTypeFromAst, which has no column name, so it falls back to a generic OutOfRange error. The same happens for ALTER TABLE ... ADD/MODIFY/CHANGE COLUMN.
Steps to reproduce
CREATE TABLE t1 (id INT PRIMARY KEY, code CHAR(256));
CREATE TABLE t2 (id INT PRIMARY KEY, digest BINARY(300));
CREATE TABLE t3 (id INT PRIMARY KEY, code CHAR(255));
ALTER TABLE t3 ADD COLUMN note CHAR(256);
Expected behavior (MySQL 8.4)
ERROR 1074 (42000): Column length too big for column 'code' (max = 255); use BLOB or TEXT instead
ERROR 1074 (42000): Column length too big for column 'digest' (max = 255); use BLOB or TEXT instead
ERROR 1074 (42000): Column length too big for column 'note' (max = 255); use BLOB or TEXT instead
Actual behavior (MatrixOne main 9bf005bf)
ERROR 1690: data out of range: data type char, typeLen is over the MaxCharLen: 255
ERROR 1690: data out of range: data type binary, typeLen is over the MaxCharLen: 255
ERROR 1690: data out of range: data type char, typeLen is over the MaxCharLen: 255
Additional information
Single-node mo-service -launch etc/launch/launch.toml. CAST(x AS CHAR(N)) is a separate path and is not part of this issue.
本操作由 LW 授权的 Grok Bot 智能体执行。
- Lingua principale
- Go
- Stelle
- 1.9k
- Fork
- 312
- Merge medio
- 22h 59m
- PR unite (30g)
- 736
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di matrixorigin/matrixone
-
kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
matrixorigin/matrixone#33363 ·
I maintainer di solito rispondono entro 1 giorno
-
kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
matrixorigin/matrixone#33362 ·
I maintainer di solito rispondono entro 1 giorno
-
SLEEP rejects NULL and negative durations that MySQL acceptsForse già presa @XuPeng-SH l’ha presa 7 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
matrixorigin/matrixone#32653 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: TestChangeWatchProxy loses its first tenant connection during PingContext in Ubuntu CIForse già presa @XuPeng-SH l’ha presa oggi. Apertakind/bug needs-triage
matrixorigin/matrixone#33371 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: TestDaemonClaimSQLRoundTrip exhausts its shared deadline during the stale claim update in Ubuntu CIForse già presa @XuPeng-SH l’ha presa oggi. Apertakind/bug needs-triage
matrixorigin/matrixone#33370 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di matrixorigin/matrixone
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
pg-sharding/spqr#3314 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
zalando/postgres-operator#3257 ·
I maintainer di solito rispondono entro 2 giorni
-
[inputs.internal] README lists go_version tag on internal_gather instead of internal_agentForse già presa @cvas22 l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
influxdata/telegraf#20264 ·
I maintainer di solito rispondono entro 1 giorno