仅仅因为 InnoDB 使用表作为内部数据结构并不意味着您可以使用 SQL 语句查询那些 FTS 表。他们没有出现在INFORMATION_SCHEMA.TABLES
.
创建该opening_lines
手册页中给出的示例表后,我看到了:
mysql> SELECT table_id, name, space FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
-> WHERE name LIKE 'test/%';
+----------+----------------------------------------------------+-------+
| table_id | name | space |
+----------+----------------------------------------------------+-------+
| 52 | test/FTS_000000000000002e_0000000000000085_INDEX_1 | 36 |
| 53 | test/FTS_000000000000002e_0000000000000085_INDEX_2 | 37 |
| 54 | test/FTS_000000000000002e_0000000000000085_INDEX_3 | 38 |
| 55 | test/FTS_000000000000002e_0000000000000085_INDEX_4 | 39 |
| 56 | test/FTS_000000000000002e_0000000000000085_INDEX_5 | 40 |
| 57 | test/FTS_000000000000002e_0000000000000085_INDEX_6 | 41 |
| 47 | test/FTS_000000000000002e_BEING_DELETED | 31 |
| 48 | test/FTS_000000000000002e_BEING_DELETED_CACHE | 32 |
| 49 | test/FTS_000000000000002e_CONFIG | 33 |
| 50 | test/FTS_000000000000002e_DELETED | 34 |
| 51 | test/FTS_000000000000002e_DELETED_CACHE | 35 |
| 46 | test/opening_lines | 30 |
+----------+----------------------------------------------------+-------+
12 rows in set (0.00 sec)
mysql> SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test';
+---------------+
| TABLE_NAME |
+---------------+
| opening_lines |
+---------------+
1 rows in set (0.00 sec)
据我所知,根本没有办法直接查询 FTS 表。它们仅用于 InnoDB 的全文索引的内部实现。