You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "git-chenhao (via GitHub)" <gi...@apache.org> on 2023/07/26 08:39:45 UTC
[GitHub] [shardingsphere] git-chenhao opened a new issue, #27479: When Proxy metadata info and backend jdbc connecntion metadata info has diff, execute sql throws "Column index out of range"
git-chenhao opened a new issue, #27479:
URL: https://github.com/apache/shardingsphere/issues/27479
## Bug Report
### Which version of ShardingSphere did you use?
master
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
Normal execution
### Actual behavior
execute sql throws "Column index out of range"
When Proxy metadata info and backend jdbc connecntion metadata info has diff
eg :
logic_table: table_a
actual_table: table_a_0~table_a_9
route rule: table_a_${id%10}
logic sql:select * from table_a where id =8
actual sql:select * from table_a_9 where id =8
where sql execute
table_a_0 - table_5 has 10 column
table_a_6 - table_9 has 9 column
Proxy metadata: has 10 column
backend jdbc connection metadata: has 9 column
execute sql throws "Column index out of range"
### Reason analyze (If you can)
https://github.com/apache/shardingsphere/blob/master/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/DatabaseConnector.java#L315
<img width="1134" alt="image" src="https://github.com/apache/shardingsphere/assets/20919316/f6d07357-bbbc-4633-9911-16d77dcdb032">
getColumnCount from proxy metadata, is 10, but backend jdbc connection metadata only have 9 column
https://github.com/apache/shardingsphere/blob/master/proxy/backend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/backend/mysql/response/header/query/MySQLQueryHeaderBuilder.java#L40
<img width="1088" alt="image" src="https://github.com/apache/shardingsphere/assets/20919316/0960d54f-f43f-405e-9e40-ba01b17b7551">
this line throws "Column index out of range"
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
### Example codes for reproduce this issue (such as a github link).
--
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
[GitHub] [shardingsphere] github-actions[bot] commented on issue #27479: When Proxy metadata info and backend jdbc connecntion metadata info has diff, execute sql throws "Column index out of range"
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #27479:
URL: https://github.com/apache/shardingsphere/issues/27479#issuecomment-1712590968
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
[GitHub] [shardingsphere] RaigorJiang commented on issue #27479: When Proxy metadata info and backend jdbc connecntion metadata info has diff, execute sql throws "Column index out of range"
Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #27479:
URL: https://github.com/apache/shardingsphere/issues/27479#issuecomment-1713079289
Since the issue has been inactive for a long time, I will close it first. If you still have questions, please reopen it or submit a new one
--
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
[GitHub] [shardingsphere] git-chenhao commented on issue #27479: When Proxy metadata info and backend jdbc connecntion metadata info has diff, execute sql throws "Column index out of range"
Posted by "git-chenhao (via GitHub)" <gi...@apache.org>.
git-chenhao commented on issue #27479:
URL: https://github.com/apache/shardingsphere/issues/27479#issuecomment-1672475574
> Hi @git-chenhao Why the metadata has difference? JDBC & Proxy are not in a cluster?
@RaigorJiang The DDL execution is not in the proxy, and it cannot be guaranteed that the DDL is consistent when the proxy refreshes the metadata. Is there any way to make compatibility at the code level?
--
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
[GitHub] [shardingsphere] git-chenhao commented on issue #27479: When Proxy metadata info and backend jdbc connecntion metadata info has diff, execute sql throws "Column index out of range"
Posted by "git-chenhao (via GitHub)" <gi...@apache.org>.
git-chenhao commented on issue #27479:
URL: https://github.com/apache/shardingsphere/issues/27479#issuecomment-1651247403
@zhaojinchao95 Can you help me?😭
--
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
[GitHub] [shardingsphere] git-chenhao commented on issue #27479: When Proxy metadata info and backend jdbc connecntion metadata info has diff, execute sql throws "Column index out of range"
Posted by "git-chenhao (via GitHub)" <gi...@apache.org>.
git-chenhao commented on issue #27479:
URL: https://github.com/apache/shardingsphere/issues/27479#issuecomment-1651348026
@strongduanmu Can you help me?😭
--
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
[GitHub] [shardingsphere] RaigorJiang commented on issue #27479: When Proxy metadata info and backend jdbc connecntion metadata info has diff, execute sql throws "Column index out of range"
Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #27479:
URL: https://github.com/apache/shardingsphere/issues/27479#issuecomment-1657918483
Hi @git-chenhao
Why the metadata has difference? JDBC & Proxy are not in a cluster?
--
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
[GitHub] [shardingsphere] RaigorJiang closed issue #27479: When Proxy metadata info and backend jdbc connecntion metadata info has diff, execute sql throws "Column index out of range"
Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang closed issue #27479: When Proxy metadata info and backend jdbc connecntion metadata info has diff, execute sql throws "Column index out of range"
URL: https://github.com/apache/shardingsphere/issues/27479
--
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
[GitHub] [shardingsphere] RaigorJiang commented on issue #27479: When Proxy metadata info and backend jdbc connecntion metadata info has diff, execute sql throws "Column index out of range"
Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #27479:
URL: https://github.com/apache/shardingsphere/issues/27479#issuecomment-1713078126
@git-chenhao
Sorry for the late reply, there is a DistSQL that can trigger Proxy to refresh metadata:
https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/refresh-table-metadata/
--
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