You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "Imdyh (via GitHub)" <gi...@apache.org> on 2026/04/17 10:01:59 UTC
[I] can not obtain Information_SCHEMA.LUMNS [shardingsphere]
Imdyh opened a new issue, #38635:
URL: https://github.com/apache/shardingsphere/issues/38635
I cannot obtain shard table information from Information_SCHEMA.LUMNS, but I can obtain it from the actual shard table
<img width="1126" height="390" alt="Image" src="https://github.com/user-attachments/assets/433cd339-501c-4b51-8268-efa1902fe5df" />
<img width="967" height="371" alt="Image" src="https://github.com/user-attachments/assets/9c93e811-8a75-446f-9914-eca424429881" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] can not obtain Information_SCHEMA.LUMNS [shardingsphere]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #38635:
URL: https://github.com/apache/shardingsphere/issues/38635#issuecomment-4348209077
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] can not obtain Information_SCHEMA.LUMNS [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #38635:
URL: https://github.com/apache/shardingsphere/issues/38635#issuecomment-4272713387
Problem Understanding
Fast triage:
Reproduction package complete: No. Issue [#38635](https://github.com/apache/shardingsphere/issues/38635) has screenshots, but no ShardingSphere version, topology, DB version, rule config, or logs.
Expected behavior explicitly documented: No. I did not find official docs promising that information_schema.columns must expose logical sharding tables. The official docs instead say Proxy has limited support for system tables like information_schema: [Quick Start](https://shardingsphere.apache.org/document/current/en/quick-start/shardingsphere-proxy-quick-start/).
Code/tests contradict that doc boundary: No clear contradiction found.
Provisional type: Needs More Info, leaning Misunderstanding / Invalid Usage rather than confirmed Bug.
Root Cause
OBS-1: The issue screenshot shows SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'zyhl_ims' AND TABLE_NAME in('test_sharding') returns no rows, while the same query for physical tables test_sharding_0 and test_sharding_1 returns column rows. Source: [issue #38635](https://github.com/apache/shardingsphere/issues/38635).
OBS-2: Official docs state that Proxy provides limited support for system databases / tables such as information_schema. Source: [Quick Start](https://shardingsphere.apache.org/document/current/en/quick-start/shardingsphere-proxy-quick-start/).
OBS-3: Official docs provide logical metadata queries through DistSQL, including [SHOW TABLE METADATA](https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/show-table-metadata/) and [SHOW SHARDING TABLE NODES](https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-nodes/).
OBS-4: The MySQL Proxy system-schema factory only registers a special executor for SCHEMATA; other system tables fall back to a generic metadata executor. Source: MySQLSystemSchemaQueryExecutorFactory.java (line 41), MySQLSchemataQueryExecutorFactory.java (line 29).
OBS-5: The generic executor opens a backend storage-unit connection and executes the original SQL directly; it does not rewrite logical table names for information_schema.columns. Source: DatabaseMetaDataExecutor.java (line 95).
OBS-6: Tests cover the SCHEMATA special case and generic fallback, but I did not find a MySQL Proxy test asserting logical-table exposure via information_schema.columns. Source: MySQLAdminExecutorCreatorTest.java (line 326), MySQLSystemSchemaQueryExecutorFactoryTest.java (line 89), SelectInformationSchemataExecutorTest.java (line 109).
INF-1: From OBS-1, OBS-4, and OBS-5, the empty result for logical table test_sharding is consistent with current Proxy behavior: information_schema.columns is answered from backend MySQL metadata, which knows physical tables but not ShardingSphere logical table names. Confidence: Medium.
INF-2: From OBS-2, OBS-3, OBS-4, and OBS-5, the current behavior appears aligned with documented limited information_schema support, while documented logical metadata access is through DistSQL instead. Confidence: Medium.
INF-3: Because version, mode, DB version, and config are missing, I cannot rule out a version-specific regression or an environment-specific metadata bug. Confidence: Low.
Problem Analysis
The repo already exposes logical-table metadata through native Proxy paths:
SHOW TABLES reads ShardingSphere schema metadata, not just backend physical tables. Source: MySQLShowTablesExecutor.java (line 80).
SHOW TABLE METADATA is the documented table-metadata query API for logical tables. Source: [docs](https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/show-table-metadata/).
SHOW SHARDING TABLE NODES is the documented logical-to-physical mapping query. Source: [docs](https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-nodes/).
So the current evidence shows a gap between a client-style information_schema.columns expectation and the currently documented/supported logical metadata APIs, not a verified doc/code mismatch.
Missing evidence that blocks a definitive conclusion:
ShardingSphere version
Proxy vs JDBC confirmation
Standalone vs Cluster
MySQL version
Minimal sharding rule/config for test_sharding
Exact outputs of SHOW TABLES, SHOW TABLE METADATA test_sharding, and SHOW SHARDING TABLE NODES test_sharding
Whether this was run from mysql CLI or a GUI client
Relevant proxy log lines, if any
Problem Conclusion
Current classification: Needs More Info, with a provisional leaning toward Misunderstanding / Invalid Usage.
Reason: the report is missing the minimum reproduction package, and the verified docs/code point to limited information_schema support plus backend-pass-through behavior for information_schema.columns. This conclusion is supported by OBS-1, OBS-2, OBS-4, OBS-5, INF-1, and INF-2.
Minimum follow-up request to the reporter:
ShardingSphere version
Access mode and governance mode
MySQL version
Sharding rule snippet for test_sharding
Exact outputs of the four SQL statements listed above
Client type: mysql CLI or GUI tool
Follow-up window: 7-14 days. If no extra evidence arrives, closing as status: invalid would be reasonable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] can not obtain Information_SCHEMA.LUMNS [shardingsphere]
Posted by "Imdyh (via GitHub)" <gi...@apache.org>.
Imdyh commented on issue #38635:
URL: https://github.com/apache/shardingsphere/issues/38635#issuecomment-4274007898
ShardingSphere version is 5.5.2,use Standalone mode,mysql version is 8.0.30,tried via mysql CLI and GUI client,no logs were printed, including those for success and exceptions
Configuration as follows:
[database-sharding.yaml](https://github.com/user-attachments/files/26856757/database-sharding.yaml)
Exact output as follows:
<img width="489" height="253" alt="Image" src="https://github.com/user-attachments/assets/aeac3f29-ba64-46ac-899f-a273c0e64aec" />
<img width="1277" height="315" alt="Image" src="https://github.com/user-attachments/assets/da152903-e3f6-4e04-871d-7ef552b6813b" />
<img width="1323" height="241" alt="Image" src="https://github.com/user-attachments/assets/11c4f8ad-9423-40b4-afd0-ae1d3f6a1cba" />
<img width="1029" height="265" alt="Image" src="https://github.com/user-attachments/assets/6b22c623-9bc3-4969-8863-b5f1b52c5c21" />
<img width="1387" height="523" alt="Image" src="https://github.com/user-attachments/assets/4a170046-66b9-4f1b-93d8-bdd1bce495a0" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] can not obtain Information_SCHEMA.LUMNS [shardingsphere]
Posted by "Imdyh (via GitHub)" <gi...@apache.org>.
Imdyh commented on issue #38635:
URL: https://github.com/apache/shardingsphere/issues/38635#issuecomment-4294658160
@terrymanu Please review it again
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] can not obtain Information_SCHEMA.LUMNS [shardingsphere]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #38635:
URL: https://github.com/apache/shardingsphere/issues/38635#issuecomment-4597327593
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] can not obtain Information_SCHEMA.LUMNS [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #38635:
URL: https://github.com/apache/shardingsphere/issues/38635#issuecomment-4531808148
Conclusion: this is not a confirmed bug. It is best classified as Misunderstanding / Invalid Usage: information_schema.columns does not currently promise logical sharding-table metadata in Proxy.
1. Problem Understanding
Fast triage:
Reproducible evidence: mostly yes. The reporter provided ShardingSphere 5.5.2, Standalone mode, MySQL 8.0.30, Proxy YAML, SQL screenshots, and “no logs”.
Documented expectation: no. 5.5.2 docs state Proxy has limited support for system databases/tables such as information_schema ([docs](https://shardingsphere.apache.org/document/5.5.2/en/quick-start/shardingsphere-proxy-quick-start/)).
Code/test mismatch: no clear mismatch found.
Topology:
Access mode: Proxy, inferred from database-sharding.yaml and Proxy DistSQL screenshots.
Governance mode: Standalone.
Registry/config center: N/A.
Database: MySQL 8.0.30.
2. Root Cause
Observations:
OBS-1: Issue #38635 reports information_schema.columns returns rows for physical tables like test_sharding_0, but not logical table test_sharding ([issue](https://github.com/apache/shardingsphere/issues/38635)).
OBS-2: The attached YAML defines logical table test_sharding with actual nodes ds_0.test_sharding_${0..9} and an INLINE sharding algorithm. Source: issue attachment database-sharding.yaml.
OBS-3: Screenshots show SHOW TABLES, SHOW TABLE METADATA test_sharding, and SHOW SHARDING TABLE NODES test_sharding return logical metadata/nodes. Source: issue comment screenshots.
OBS-4: 5.5.2 docs define SHOW TABLE METADATA as the metadata query syntax ([docs](https://shardingsphere.apache.org/document/5.5.2/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/show-table-metadata/)).
OBS-5: 5.5.2 docs define SHOW SHARDING TABLE NODES for sharding node queries ([docs](https://shardingsphere.apache.org/document/5.5.2/en/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-nodes/)).
OBS-6: In tag 5.5.2, MySQLInformationSchemaExecutorFactory special-cases only SCHEMATA; other information_schema system tables use DefaultDatabaseMetaDataExecutor. Path: proxy/backend/type/mysql/src/main/java/.../MySQLInformationSchemaExecutorFactory.java.
OBS-7: DefaultDatabaseMetaDataExecutor directly prepares and executes the original SQL on one backend storage-unit connection. Path: proxy/backend/core/src/main/java/.../AbstractDatabaseMetaDataExecutor.java.
OBS-8: 5.5.2 tests confirm default metadata executor behavior for non-SCHEMATA information-schema tables. Path: proxy/backend/type/mysql/src/test/java/.../MySQLAdminExecutorCreatorTest.java.
Inferences:
INF-1 from OBS-1, OBS-6, OBS-7: information_schema.columns is querying backend MySQL physical metadata, so it can see test_sharding_0...9 but not logical test_sharding. Confidence: High.
INF-2 from OBS-3, OBS-4, OBS-5: ShardingSphere already exposes the requested logical metadata through DistSQL, not through information_schema.columns. Confidence: High.
INF-3 from OBS-2, OBS-6, OBS-7: The YAML sharding rule is not the root cause; the behavior follows the Proxy system-schema query path. Confidence: Medium.
3. Problem Analysis
The reporter’s expectation is understandable, but it is outside the documented guarantee. ShardingSphere defines logical vs actual tables in the sharding concept [docs](https://shardingsphere.apache.org/document/5.5.2/en/features/sharding/concept/) (docs), and Proxy docs explicitly limit system-table support.
Current 5.5.2 behavior is internally consistent:
SHOW TABLES and DistSQL read ShardingSphere metadata.
information_schema.columns falls through to backend MySQL metadata for non-special system tables.
Backend MySQL knows physical tables, not ShardingSphere logical table names.
So the root cause is not a sharding-rule failure. It is an unsupported expectation that MySQL information_schema.columns should be logically projected by Proxy.
4. Problem Conclusion
Classification: Misunderstanding / Invalid Usage, not Bug.
This conclusion is supported by OBS-1, OBS-3, OBS-4, OBS-5, OBS-6, OBS-7, INF-1, and INF-2.
Recommended issue response:
Explain that information_schema.columns logical table projection is not supported in 5.5.2.
Point to SHOW TABLE METADATA test_sharding and SHOW SHARDING TABLE NODES test_sharding as the documented metadata paths.
Close as status: invalid, unless maintainers want to convert it into a separate enhancement for MySQL-compatible logical information_schema.columns projection.
Evidence Confidence: Medium
Impact Scope: Proxy metadata query behavior, MySQL information_schema.columns, sharding logical-table metadata
Topology: Proxy + Standalone
Issue Type: Misunderstanding / Invalid Usage
Recommended Labels: type: question, status: invalid, optionally in: Proxy, db: MySQL
Next Action: close as unsupported usage, or reopen as enhancement only if maintainers want new Proxy compatibility behavior.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] can not obtain Information_SCHEMA.LUMNS [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #38635: can not obtain Information_SCHEMA.LUMNS
URL: https://github.com/apache/shardingsphere/issues/38635
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org