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
These test cases assert that the number of rows in the information_schema.columns and information_schema.tidb_index_usage tables match certain hardcoded values. The number of rows reflect all columns and indexes in the database, not just those added by the test cases. Whenever any (unrelated) new column, table, or index is added to the information schema, these hardcoded values no longer match, causing the tests to fail spuriously.
1. Minimal reproduce step (Required)
Add a column to information_schema.statements_summary and run these test cases:
(cat << EOF
diff --git a/pkg/infoschema/tables.go b/pkg/infoschema/tables.go
index 12f295231d..5105aa27aa 100644
--- a/pkg/infoschema/tables.go
+++ b/pkg/infoschema/tables.go
@@ -1403,6 +1403,7 @@ var tableStatementsSummaryCols = []columnInfo{
{name: stmtsummary.ResourceGroupName, tp: mysql.TypeVarchar, size: 64, comment: "Bind resource group name"},
{name: stmtsummary.PlanCacheUnqualifiedStr, tp: mysql.TypeLonglong, size: 20, flag: mysql.NotNullFlag, comment: "The number of times that these statements are not supported by the plan cache"},
{name: stmtsummary.PlanCacheUnqualifiedLastReasonStr, tp: mysql.TypeBlob, size: types.UnspecifiedLength, comment: "The last reason why the statement is not supported by the plan cache"},
+ {name: "new_column", tp: mysql.TypeTiny, size: 1},
}
var tableStorageStatsCols = []columnInfo{
EOF
) | git apply -
go test --tags=intest -run '^TestColumnTable|TestIndexUsageTable$' ./pkg/executor
Bug Report
These test cases assert that the number of rows in the
information_schema.columns
andinformation_schema.tidb_index_usage
tables match certain hardcoded values. The number of rows reflect all columns and indexes in the database, not just those added by the test cases. Whenever any (unrelated) new column, table, or index is added to the information schema, these hardcoded values no longer match, causing the tests to fail spuriously.1. Minimal reproduce step (Required)
Add a column to
information_schema.statements_summary
and run these test cases:2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: