Skip to content

[Bug]: Invalid FULLTEXT view aborts unrelated information_schema.COLUMNS queries with error 1191 (regression) #32763

Open

Description

@LeftHandCold

Summary

A previously valid View containing MATCH() AGAINST() can break metadata queries for an unrelated ordinary table in another database of the same account after its matching FULLTEXT index is dropped.

The unrelated query contains no MATCH, but fails with:

ERROR 1191 (HY000): Can't find FULLTEXT index matching the column list

This is a confirmed product regression, not evidence that the ordinary table or its indexes are corrupt. It is reproducible on one CN, with serial statements and three rows in total; concurrency, cross-CN propagation, and a large workload are not required.

The original observation was an integrity-check metadata read in Main MOTR. Its wrapper reported IntegrityQueryError: columns (RuntimeError) and zero completed integrity checks. The underlying SQL failure is in MatrixOne, not just the checker.

Environment and version comparison

Validation date: 2026-11-15. Each version used a fresh, isolated official MatrixOne container, default quickstart LOG/TN/CN deployment, 4 CPUs and a 6 GiB memory limit. The same SQL sequence was run three times per version. Runtime identity was checked with git_version() and matched the intended image.

Main revision Revision date Unrelated metadata query after DROP INDEX Recreate index
3727c5c5436ca136d7b0312f75bc223a11692a85 2026-09-22 3/3 success 3/3 success
21f711a7b852238394417e547282e14dce8660d9 2026-10-04 3/3 error 1191 3/3 restored
bc9b822cd1f5d742b550f8366516fd836936ba70 Tested by Nov 15 Main regression 3/3 error 1191 3/3 restored

Image repository: ccr.ccs.tencentyun.com/matrixone-dev/matrixone.

Immutable image digests, in the same order:

sha256:4f4fdae24d135567408e5210041badb8ed89bc5418d605ff6eee97157844fe63
sha256:64fa11a702c33108c071632a46e5d41c948e3c865b87446d48eee39cf499747c
sha256:8c2ad731d41bfa4e8a8e83f845fe7b6abe99068dbd5f12b293cf65066e95a556

This establishes an older behavioral regression: it was already present on October 4, rather than first introduced by yesterday's commits. The first introducing commit has not been binary-bisected.

Latest Main checked at investigation time was c71e0c6904f444f45c4f4095be0e9f088b0c3b50. The relevant descriptor, definition validation and error-classification code remains unchanged from the failing November revision. That is source inspection, not a claim of running the latest-HEAD binary.

Reproduction

Use a disposable instance with these fresh database names. No direct modification of system or hidden tables is needed. Run with autocommit enabled.

1. Create a valid View and an unrelated ordinary table

SET experimental_fulltext_index = 1;

CREATE DATABASE tc_meta_target;
CREATE TABLE tc_meta_target.t (
    id INT PRIMARY KEY,
    payload VARCHAR(30)
);
INSERT INTO tc_meta_target.t VALUES (1, 'unchanged');

CREATE DATABASE tc_meta_view;
USE tc_meta_view;
CREATE TABLE docs (id INT PRIMARY KEY, body TEXT);
INSERT INTO docs VALUES (1, 'hello matrixone'), (2, 'other text');
CREATE FULLTEXT INDEX ft_body ON docs(body);
CREATE VIEW v_good AS
    SELECT id FROM docs WHERE MATCH(body) AGAINST('hello');

2. Run this metadata query once as the passing control

This is the regression checker's SQL shape, with only the target database changed to the isolated fixture. 74635f6d6574615f746172676574 encodes tc_meta_target, and 74 encodes t.

/*integrity:columns*/
SELECT c.attname, c.attnotnull, c.att_is_hidden,
       s.DATA_TYPE, s.COLLATION_NAME, s.EXTRA
FROM mo_catalog.mo_columns c
JOIN mo_catalog.mo_tables t
  ON c.account_id = t.account_id AND c.att_relname_id = t.rel_id
LEFT JOIN information_schema.COLUMNS s
  ON s.TABLE_SCHEMA = t.reldatabase
 AND s.TABLE_NAME = t.relname
 AND s.COLUMN_NAME = c.attname
WHERE t.account_id = current_account_id()
  AND (
    t.reldatabase = CONVERT(X'74635f6d6574615f746172676574' USING utf8mb4)
    OR (@@lower_case_table_names <> 0 AND LOWER(t.reldatabase) =
        LOWER(CONVERT(X'74635f6d6574615f746172676574' USING utf8mb4)))
  )
  AND (
    t.relname = CONVERT(X'74' USING utf8mb4)
    OR (@@lower_case_table_names <> 0 AND LOWER(t.relname) =
        LOWER(CONVERT(X'74' USING utf8mb4)))
  )
ORDER BY c.attnum;

It succeeds and reports the ordinary table's columns (id, payload, and the hidden rowid in the raw-catalog side).

3. Drop only the other database's FULLTEXT index, then repeat step 2

USE tc_meta_view;
DROP INDEX ft_body ON docs;

-- Repeat the metadata SELECT from step 2.
-- Actual on affected revisions: ERROR 1191.

-- A bulk metadata enumeration also fails with 1191:
SELECT COUNT(*) FROM information_schema.COLUMNS;

The following controls still succeed:

SELECT * FROM tc_meta_target.t;
-- 1, unchanged

SHOW COLUMNS FROM tc_meta_target.t;

SELECT COLUMN_NAME, DATA_TYPE
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = 'tc_meta_target' AND TABLE_NAME = 't'
ORDER BY ORDINAL_POSITION;
-- id/int; payload/varchar

4. Reverse the trigger

USE tc_meta_view;
CREATE FULLTEXT INDEX ft_body ON docs(body);
-- Repeat step 2: succeeds again with the original rows.

Repeat DROP / step 2 / CREATE / step 2 three times: the affected images consistently fail only while the matching index is absent.

An independent recovery control also succeeds:

DROP INDEX ft_body ON docs;
DROP VIEW v_good;
-- Repeat step 2 and bulk metadata enumeration: both succeed.

Expected behavior

A failed dependency of one View must not abort a valid metadata read of an unrelated ordinary table.

For bulk metadata enumeration, preserve the established contract: proven invalid View definitions are isolated with a warning, valid metadata rows remain available, and cancellation/authorization/unexpected internal errors are not swallowed. Directly querying the invalid View may still fail.

Do not fix this by prohibiting DROP INDEX. The supported lifecycle already allows a View to become temporarily unqueryable after dropping its index, and recreating the index makes it queryable again. #27027 explicitly excludes that post-creation lifecycle from its original defect.

Causal evidence and code analysis

There are two interacting parts:

  1. The tested CONVERT(X'...' USING utf8mb4) JOIN shape does not push the target database/table predicates into the View-candidate scan before mo_view_columns. Its EXPLAIN therefore permits derivation of the unrelated tc_meta_view.v_good. Replacing those expressions with plain string literals pushes the scope into that scan and makes the otherwise equivalent query succeed.
  2. The descriptor rebinds the invalid MATCH View, produces ErrFtMatchingKeyNotFound / MySQL 1191, and the metadata operator fails to classify that particular error as an invalid View dependency. The error escapes and aborts the whole statement.

Source anchors at the inspected Main revision:

A contrasting invalid-View control confirms the intended isolation mechanism: create a normal View, drop its source table, then run the same unrelated metadata query and bulk enumeration. Both succeed on the affected images; SHOW WARNINGS reports 1356 for that invalid View. The missing-FULLTEXT-index case instead aborts with 1191.

The on-demand metadata path and the incomplete error classifier were introduced together in #29139 (merged September 28, commit 8db6d7ff4f0f38701f6e3154a578e4ce01f4f7ac). This is a strong introduction-path candidate, consistent with the September 22 / October 4 binary results, but the exact parent/merge pair has not been run. #30578 later added the shared-request path; it is not necessary to explain a defect already reproduced on October 4.

Original regression evidence

  • Nov 15 Main MOTR, Run 43607872311 / Job 132628994317, MO bc9b822cd1f5d742b550f8366516fd836936ba70.
  • Nov 14 Main Run 43449052910, MO 5009da9d29cad96ea4a8ad120af061aa1bc539e2.
  • Both used MOTR fb3af4a32a8be6e9f4cb1fa186cd09f7e120a054 and recorded the same underlying metadata-query error.
  • The target in the real query was motr_issue_27054.t. It had no MATCH expression. A different parallel case, issue_27027_fulltext_view_ddl, dropped and recreated ft_body on its own table as part of its supported lifecycle test.
  • On Nov 15, that DROP completed at approximately 07:48:40.631 CST; the integrity query's snapshot was within the missing-index interval, and its error was recorded at 07:48:40.727 CST. The isolated serial reproduction removes the need to rely only on that timing correlation.

Impact and limits

  • Confirmed: unrelated table metadata JOINs and bulk information_schema.COLUMNS enumeration can fail within the same account while an invalid FULLTEXT View exists.
  • This can interrupt schema-inspection and integrity-check tools using these query shapes. It must not be reported as a successful integrity scan or as proven table/index corruption.
  • Not all metadata SQL fails: direct scoped literal queries and SHOW COLUMNS succeeded in the controls.
  • No cross-account impact, data corruption, crash, OOM, or performance regression is claimed by this report.
  • This report establishes Main behavior only; it does not claim reproduction on 4.2 or a released version.
  • Diagnostic containers and their disposable data were removed. No shared TKE or production environment was used or modified.

Related issues / duplicate check

Open and closed Issue/PR searches for FULLTEXT + metadata/information_schema, error 1191, invalid View enumeration, and mo_view_columns found no exact standalone bug report for this failure.

Suggested focused regression coverage

Add a small public-SQL regression using two databases in one account:

  1. Valid FULLTEXT View plus unrelated ordinary-table metadata queries succeed.
  2. DROP INDEX leaves that View invalid, but unrelated scoped JOINs and bulk metadata enumeration still expose valid rows under the established warning contract.
  3. Preserve the original hex/CONVERT predicate shape; a literal-only test misses the observed path.
  4. Recreating the index and separately dropping the View recover without session or service restart.
  5. Retain a missing-table View control and verify cancellation/authorization errors are not converted into successful metadata reads.

No new cluster, large data load, or broad test framework is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugneeds-triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions