yufangwu123 opened a new issue, #23920:
URL: https://github.com/apache/shardingsphere/issues/23920

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   4.0.0
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   sharding-jdbc-core
   ### Expected behavior
   It can get the index in the tabel of li_order
   ### Actual behavior
   Caused by: io.seata.common.exception.ShouldNeverHappenException: Could not 
found any index in the table: li_order
   
![1675311505070](https://user-images.githubusercontent.com/28771642/216230524-ad7024e3-616d-4a9f-b90c-ca0fe60a4f01.png)
   ### Reason analyze (If you can)
   I found this line  " String catalogName = rsmd.getCatalogName(1); " in the 
method  of resultSetMetaToSchema of seata,but the rsmd is belong to the 
ShardingResultSetMetaData so I look this code like "    @Override
       public String getCatalogName(final int column) {
           return ShardingConstant.LOGIC_SCHEMA_NAME;
       }"
   in sharding-jdbc . And this value of ShardingConstant.LOGIC_SCHEMA_NAME is 
logic_db ,so this make my sql excute like this "SHOW INDEX FROM `li_order` FROM 
`logic_db `" and at last make the bug that I can't get the index from the table 
 and throw the exception. 
   And I can give the solution which is updating the the code I have listed 
like this "@Override
       public String getCatalogName(final int column) {
           return resultSetMetaData.getCatalogName(column);
       }". And I don't konw why when useing the method of getCatalogName ,I get 
the final value. I think this method is used to get the name of the real name 
of db but not  the confirmed value. If you have free time,please answer my 
question as quickly as possible .  Thank you.
   ### 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: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to