Skip to content

Introduce SystemSchemaProvider SPI for live MySQL system schema loading#37885

Open
linghengqian wants to merge 1 commit intoapache:masterfrom
linghengqian:new-spi
Open

Introduce SystemSchemaProvider SPI for live MySQL system schema loading#37885
linghengqian wants to merge 1 commit intoapache:masterfrom
linghengqian:new-spi

Conversation

@linghengqian
Copy link
Member

@linghengqian linghengqian commented Jan 29, 2026

For #37766 .

Changes proposed in this pull request:

  • Introduce SystemSchemaProvider SPI for live MySQL system schema loading.
  • This SPI can be extended to Postgres, OpenGauss, and Oracle in other PRs.
  • There are many MySQL-compatible databases, including but not limited to ClickHouse, MariaDB, Doris, and H2. Moreover, the content of information_schema is basically different for each database. Otherwise, databases like ClickHouse would not be able to implement geographic information columns. There's no point in keeping hundreds of predefined empty tables; it's better to retrieve a data source from the available data sources and query it.
  • I could actually delete the hundreds of files in the current PR ( https://github.com/apache/shardingsphere/tree/master/database/connector/dialect/mysql/src/main/resources/schema/mysql ). However, to facilitate the review of the new SPI, I want to delete those hundreds of files in a separate PR.

Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.
  • I have updated the Release Notes of the current development version. For more details, see Update Release Note

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant