terrymanu commented on issue #24395:
URL:
https://github.com/apache/shardingsphere/issues/24395#issuecomment-3539947496
## Problem Understanding
You're experiencing issues with ShardingSphere-Proxy when executing these
queries:
1. SELECT * FROM information_schema.tables; - Returns empty results +
NullPointerException
2. SELECT * FROM information_schema.columns; - IndexOutOfBoundsException:
"Index 20 out of bounds for length 20"
## Root Cause Analysis
After code analysis, the core reasons for this issue are:
🔍 Current Implementation Status
- ✅ information_schema.SCHEMATA table is fully implemented (related bugs
fixed in August 2024)
- ❌ TABLES and COLUMNS tables lack dedicated implementation, relying on
generic DatabaseMetaDataExecutor
🎯 Root Causes
1. Experimental Feature Limitation: information_schema in ShardingSphere
is still marked as experimental
2. Incomplete Implementation: Only SCHEMATA has dedicated handlers, other
tables use generic processing logic
3. Insufficient Edge Case Handling: DatabaseMetaDataExecutor doesn't
handle all edge cases properly in certain metadata scenarios
📊 Current Status
- Issue remains in "status: volunteer wanted" state
- Master branch doesn't yet include complete fixes for TABLES/COLUMNS
- Community contribution needed for full implementation
## Solutions
🚀 Workaround Solutions (Recommended)
1. Bypass ShardingSphere: Use direct database connection for Laravel
migrate operations
2. Version Upgrade: Use latest ShardingSphere version (though issues may
persist)
3. Configuration Adjustment: Configure Laravel to skip information_schema
related queries
🔧 Long-term Solution
Requires community contribution to implement:
- Dedicated SelectInformationTablesExecutor and
SelectInformationColumnsExecutor
- Improved exception handling and boundary checks
- Complete unit test coverage
## Recommendation: Given this is an experimental feature, it's advisable to
avoid information_schema related queries in production environments or connect
directly to the native database for schema-related operations.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]