You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dropdatabase if exists mysql_compat_model12_temp_min;
createdatabasemysql_compat_model12_temp_min;
use mysql_compat_model12_temp_min;
createtablet_shadow (id intprimary key, v varchar(20));
create temporary table t_tmp_meta (
id intprimary key,
v varchar(20),
key idx_v(v)
);
select table_name, table_type
frominformation_schema.tableswhere table_schema = database()
order by table_name;
MySQL result
TABLE_NAME TABLE_TYPE
t_shadow BASE TABLE
MO result
table_name table_type
__mo_tmp_019f25c5a66f7178a8ab327288a5618f_mysql_compat_model12_temp_min___mo_index_secondary_019f25c5-a69d-70c3-b447-aaa76a159546 INTERNAL TABLE
__mo_tmp_019f25c5a66f7178a8ab327288a5618f_mysql_compat_model12_temp_min_t_shadow BASE TABLE
__mo_tmp_019f25c5a66f7178a8ab327288a5618f_mysql_compat_model12_temp_min_t_tmp_meta BASE TABLE
t_shadow BASE TABLE
Expected
User-visible information_schema.tables should not expose internal temporary-table storage tables such as __mo_tmp_... or temporary secondary-index storage objects.
Activity
fix(sysview): hide temporary tables from information schema (#26298)
Ariznawlll commentedon Aug 5, 2026
测试版本
maine31ee06042bc708ac5620a579715e07ec31c21b6原问题验证
创建带主键、唯一键和二级索引的临时表后,
information_schema.tables连续 3/3 仅显示两个合法永久表,没有暴露临时基表或其内部索引物理对象。Happy Path 覆盖
(1,10)。__mo_tmp_customer永久表仍显示,未被宽前缀过滤误伤。Unhappy Path 覆盖
白盒验证
修复 PR #26298 已覆盖 catalog 标记、系统 view 过滤和 legacy temporary table 判定;本轮重点验证用户可见元数据和正常前缀表控制。
回归测试
MatrixOne 已有扩展 BVT:temporary_table_basic.sql,覆盖四个 metadata view、临时索引和合法前缀永久表,无需重复加入 motr。
测试证据
三轮 TABLES 结果仅为
__mo_tmp_customer和permanent_table,临时物理对象计数为 0,临时表读回(1,10),session_usable=1。测试结论
测试通过。
Ariznawlll commentedon Aug 9, 2026
测试版本
main08770e1beeb23239c91165492f2fe85243a3c66a原问题验证
永久表
t_shadow与带二级索引的临时表t_tmp_meta并存时,information_schema.tables连续 3/3 仅返回t_shadow / BASE TABLE,不再暴露__mo_tmp_...或临时二级索引内部对象。Happy Path 覆盖
Unhappy Path 覆盖
临时对象创建后立即查询 catalog,三轮内部对象计数均为 0;数据库删除后无残留对象。
白盒验证
不适用:问题是用户可见 information_schema 投影,公共 SQL 已直接验证。
回归测试
已加入 motr PR #85:
suites/14_issue_regression/t/issue_25405_information_schema_temp_tables.test。result 由 MySQL 录制,MO 3 轮通过。测试证据
24/24case 成功。测试结论
测试通过。
fix(sysview): hide temporary tables from information schema (matrixor…
fix(sysview): hide temporary tables from information schema (matrixor…
fix(sysview): hide temporary tables from information schema (matrixor…