[Bug]: Prepared SHOW INDEX returns empty success after cross-session DROP TABLE
メンテナーはふだん 1 日以内に返信
@matrix-meow がすでに取り組んでいます。
2026年11月27日 から。
評価
この issue はまだ評価されていません。
説明
Is there an existing issue for the same bug?
- I have checked the existing issues.
Searched open and closed issues for prepared SHOW INDEX, cross-session DROP, stale plan invalidation, and missing-table empty results. #33353 covers prepared SHOW CREATE after COPY ALTER; #25986 covers prepared schema-changing statements; #27759, #30545, and #30549 cover different SHOW metadata problems. None covers this reproduction.
Branch Name
main
Commit ID
c0cef5c9cce2164fedd201c188bfffe4d2d09a96
A read-only check of main snapshot 9bf005bfcd06ef722351bccd9c9a59833ce2b5bd found the relevant PREPARE/SHOW function bodies unchanged. Runtime reproduction is against the commit above.
Other Environment Information
- Hardware parameters: single-CN local deployment
- OS type: macOS
- Others: SQL text protocol through two independent sessions; MySQL 8.0.46 used as a control
Actual Behavior
After another session drops the target table, an existing prepared SHOW INDEX executes successfully and returns the normal SHOW INDEX columns with zero rows. In the same session, direct SHOW INDEX reports Error 1146, and a fresh PREPARE also reports Error 1146.
Expected Behavior
The old EXECUTE should not silently turn a missing target table into an empty successful result. It should either be invalidated and rebuilt using current metadata or report Error 1146, consistent with direct SHOW INDEX and a fresh statement.
Steps to Reproduce
-- Session S1
CREATE DATABASE home_db;
CREATE DATABASE show_db;
CREATE TABLE show_db.t(
id INT PRIMARY KEY,
v INT,
KEY idx_v(v)
);
USE home_db;
PREPARE p_idx FROM 'SHOW INDEX FROM show_db.t';
EXECUTE p_idx; -- returns PRIMARY and idx_v
-- Session S2, with autocommit enabled
DROP TABLE show_db.t;
-- Session S1
EXECUTE p_idx; -- actual: success, zero rows
SHOW INDEX FROM show_db.t; -- Error 1146
PREPARE p_idx_new FROM 'SHOW INDEX FROM show_db.t'; -- Error 1146
The initial EXECUTE intentionally warms the prepared-plan reuse path before the cross-session DDL.
MySQL 8.0.46 reports Error 1146 for the old EXECUTE and direct SHOW INDEX. Its fresh PREPARE succeeds, but the fresh EXECUTE also reports Error 1146; the difference in PREPARE-time validation is not the issue being reported here.
Controls and scope
Two independent MatrixOne processes reproduced the old-empty/direct-1146/fresh-1146 sequence in two 19-event runs. A separate simplified two-session MatrixOne/MySQL comparison was also repeated twice on each engine.
After recreating show_db.t with a new index idx_new, the old MatrixOne handle and direct SHOW INDEX both return PRIMARY and idx_new. Therefore this report is limited to missing existence validation while the table is absent; it does not claim that the old handle continuously returns indexes from the deleted table.
Additional information
buildShowIndex resolves the table while preparing, but resetPreparePlan returns no schema dependency for this SHOW plan because it has no Ddl.Query. collectPrepareDdlSchemas also has no SHOW INDEX target-table case. The old handle consequently lacks the dependency needed to invalidate it when another session drops the table.
- 主要言語
- 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 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
zalando/postgres-operator#3257 ·
メンテナーはふだん 2 日以内に返信
-
[inputs.internal] README lists go_version tag on internal_gather instead of internal_agent対応中かも @cvas22 が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
influxdata/telegraf#20264 ·
メンテナーはふだん 1 日以内に返信