Skip to content

session, executor: update mview system table schema#66382

Merged
ti-chi-bot[bot] merged 1 commit intopingcap:feature/release-8.5-materialized-viewfrom
windtalker:tidb-mv-schema
Feb 25, 2026
Merged

session, executor: update mview system table schema#66382
ti-chi-bot[bot] merged 1 commit intopingcap:feature/release-8.5-materialized-viewfrom
windtalker:tidb-mv-schema

Conversation

@windtalker
Copy link
Contributor

What problem does this PR solve?

Issue Number: ref #18023

Problem Summary:
The MV system table schema needs small adjustments:

  1. mysql.tidb_mview_refresh_hist.REFRESH_TIME and REFRESH_ENDTIME should be datetime(6).
  2. mysql.tidb_mlog_purge_hist.PURGE_TIME and PURGE_ENDTIME should be datetime(6).
  3. mysql.tidb_mlog_purge_info should include LAST_PURGED_TSO bigint DEFAULT NULL.

What changed and how does it work?

  • Updated the system table DDL definitions in bootstrap SQL:
    • pkg/session/bootstrap.go
  • Updated bootstrap tests for MV system tables:
    • Added assertions for LAST_PURGED_TSO
    • Added assertions for datetime_precision = 6 on the four time columns
    • pkg/session/bootstraptest/mview_systable_test.go
  • Updated infoschema reader test reference count for information_schema.columns due one newly added system column:
    • pkg/executor/infoschema_reader_test.go

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

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 25, 2026
@tiprow
Copy link

tiprow bot commented Feb 25, 2026

Hi @windtalker. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Feb 25, 2026
@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (feature/release-8.5-materialized-view@a203693). Learn more about missing BASE report.

Additional details and impacted files
@@                            Coverage Diff                             @@
##             feature/release-8.5-materialized-view     #66382   +/-   ##
==========================================================================
  Coverage                                         ?   37.0186%           
==========================================================================
  Files                                            ?       1693           
  Lines                                            ?     624344           
  Branches                                         ?          0           
==========================================================================
  Hits                                             ?     231124           
  Misses                                           ?     370620           
  Partials                                         ?      22600           
Flag Coverage Δ
integration 37.0186% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling ∅ <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 23.0590% <0.0000%> (?)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@xzhangxian1008 xzhangxian1008 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot
Copy link

ti-chi-bot bot commented Feb 25, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wjhuang2016, xzhangxian1008
Once this PR has been reviewed and has the lgtm label, please assign benmeadowcroft for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 25, 2026
@ti-chi-bot
Copy link

ti-chi-bot bot commented Feb 25, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-02-25 07:35:52.496057854 +0000 UTC m=+254025.010852462: ☑️ agreed by wjhuang2016.
  • 2026-02-25 08:26:47.485879839 +0000 UTC m=+257080.000674448: ☑️ agreed by xzhangxian1008.

@windtalker
Copy link
Contributor Author

/test unit-test

@tiprow
Copy link

tiprow bot commented Feb 25, 2026

@windtalker: PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test.

Details

In response to this:

/test unit-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot merged commit d5ca612 into pingcap:feature/release-8.5-materialized-view Feb 25, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants