[Bug]: index on a missing column returns 20301 'column is not exist' instead of ER_KEY_COLUMN_DOES_NOT_EXIST 1072
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 74/100
Hướng nghiên cứu
Bắt đầu từ các trình xây dựng chỉ mục trong build_ddl.go và so sánh cách chúng xử lý cột không tồn tại với cách sử dụng hiện có của moerr.NewErrKeyColumnDoesNotExist cho ALTER TABLE ADD PRIMARY KEY. Tái hiện lỗi bằng một trong các câu lệnh SQL trong issue, sau đó kiểm tra xem các trường hợp chỉ mục thông thường có trả về lỗi 1072 với SQLSTATE 42000 hay không.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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 智能体执行。
- Ngôn ngữ chính
- Go
- Star
- 1.9k
- Fork
- 312
- Merge trung bình
- 21 giờ 57 phút
- Pull request đã merge (30 ngày)
- 730
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của matrixorigin/matrixone
-
kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
matrixorigin/matrixone#33363 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SLEEP rejects NULL and negative durations that MySQL acceptsCó thể đã có người làm @XuPeng-SH đã nhận 7 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
matrixorigin/matrixone#32653 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: TestChangeWatchProxy loses its first tenant connection during PingContext in Ubuntu CICó thể đã có người làm @XuPeng-SH đã nhận hôm nay. Đang mởkind/bug needs-triage
matrixorigin/matrixone#33371 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: TestDaemonClaimSQLRoundTrip exhausts its shared deadline during the stale claim update in Ubuntu CICó thể đã có người làm @XuPeng-SH đã nhận hôm nay. Đang mởkind/bug needs-triage
matrixorigin/matrixone#33370 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: TestCreateAndDeleteHashBasedWithAccount times out creating its tenant database in Ubuntu CICó thể đã có người làm @XuPeng-SH đã nhận hôm nay. Đang mởkind/bug needs-triage
matrixorigin/matrixone#33369 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của matrixorigin/matrixone
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/ui-schema good first issue type/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 4 ngày
-
A vessel you are not flying should draw dim grey, orbit and arrow (ADR 0041), not in its own colourĐang mởready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
jasonfen/terminal-space-program#1020 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
router-for-me/CLIProxyAPI#8573 ·
Maintainer thường phản hồi trong vòng 9 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
sipeed/picoclaw#3477 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày