Skip to content

Support TIDB_VIEWS and TIDB_MLOGS in INFORMATION_SCHEMA#42

Open
xzhangxian1008 wants to merge 12 commits into
windtalker:mv_testfrom
xzhangxian1008:tidb_mviews
Open

Support TIDB_VIEWS and TIDB_MLOGS in INFORMATION_SCHEMA#42
xzhangxian1008 wants to merge 12 commits into
windtalker:mv_testfrom
xzhangxian1008:tidb_mviews

Conversation

@xzhangxian1008
Copy link
Copy Markdown

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary:

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@windtalker windtalker force-pushed the mv_test branch 3 times, most recently from aba8bed to ee7c8a2 Compare April 4, 2026 14:37
@xzhangxian1008 xzhangxian1008 changed the title Support TIDB_VIEWS in INFORMATION_SCHEMA Support TIDB_VIEWS and TIDB_MLOGS in INFORMATION_SCHEMA Apr 30, 2026
err error
)
switch {
case (!hasMLogPredicates && !hasBasePredicates) || (hasMLogPredicates && !hasBasePredicates):
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems the case can be simplified to case !hasBasePredicates, is it the expected behavior?

)
switch {
case (!hasMLogPredicates && !hasBasePredicates) || (hasMLogPredicates && !hasBasePredicates):
schemas, tables, err = ex.ListSchemasAndTables(ctx, e.is)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe construct the baseInfos here, so there is no need to check it in L1739

// NewInfoSchemaTiDBMLogsExtractor creates a new InfoSchemaTiDBMLogsExtractor.
func NewInfoSchemaTiDBMLogsExtractor() *InfoSchemaTiDBMLogsExtractor {
e := &InfoSchemaTiDBMLogsExtractor{}
e.extractableColumns = extractableCols{
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why extractableColumns and colNames is not the same

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants