branch-4.1: [bug](jdbc) fix sqlserver couldn't get schema with higher version driver jar (#63626)#63994
Merged
Merged
Conversation
…ver jar (apache#63626) Problem Summary: https://github.com/microsoft/mssql-jdbc/blob/v13.4.0/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDatabaseMetaData.java#L1887-L1934 ``` SQLServer JDBC catalog lists schemas through DatabaseMetaData.getSchemas(conn.getCatalog(), null). With mssql-jdbc 13.4.x, when catalog is non-empty and schemaPattern is null, the driver filters built-in schemas such as dbo, guest, sys, INFORMATION_SCHEMA, and db_*. As a result, SHOW DATABASES on a SQLServer JDBC catalog may miss schemas that were visible with older mssql-jdbc versions. Now SQLServer-specific override for schema discovery and passes schemaPattern % to getSchemas. % is the JDBC wildcard pattern for matching all schemas, so mssql-jdbc 13.4.x returns the expected schemas without the driver-side built-in schema filtering. Older mssql-jdbc versions are also compatible with this behavior. ```
Contributor
Author
|
run buildall |
Contributor
FE UT Coverage ReportIncrement line coverage |
Contributor
FE Regression Coverage ReportIncrement line coverage |
Contributor
FE Regression Coverage ReportIncrement line coverage |
yiguolei
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cherry-pick from master (#63626)