jlovej commented on issue #14550:
URL: 
https://github.com/apache/shardingsphere/issues/14550#issuecomment-1009718329


   > ```sql
   > [INFO ] 2022-01-11 15:34:15.350 [Connection-1-ThreadExecutor] 
ShardingSphere-SQL - Logic SQL: show index from `t_order` from `sharding_db`
   > [INFO ] 2022-01-11 15:34:15.351 [Connection-1-ThreadExecutor] 
ShardingSphere-SQL - SQLStatement: 
MySQLShowIndexStatement(table=SimpleTableSegment(tableName=TableNameSegment(startIndex=16,
 stopIndex=24, identifier=IdentifierValue(value=t_order, 
quoteCharacter=BACK_QUOTE)), owner=Optional.empty, alias=Optional.empty), 
fromSchema=Optional[org.apache.shardingsphere.sql.parser.sql.common.segment.dal.FromSchemaSegment@944aefb])
   > [INFO ] 2022-01-11 15:34:15.351 [Connection-1-ThreadExecutor] 
ShardingSphere-SQL - Actual SQL: ds_0 ::: show index from `t_order_0` 
   > ```
   > 
   > Hi @jlovej I have tested the `show index` statement using the `t_order` 
table and it works fine in version 5.0. Can you provide more information to 
help me reproduce this issue? For example, the configuration of the `t_order` 
table? `hl_mall_order_cluster_0` is the logical database?
   
   `t_order`  is logical table,`hl_mall_order_cluster_0` is the physics 
database;
   sharding config info:
   
   ```
   spring:
     shardingsphere:
       # 展示修改后的SQL语句
       props:
         sql-show: true
       datasource:
         names: ds0,ds1,ds2
         ds0:
           driver-class-name: com.mysql.cj.jdbc.Driver
           type: com.alibaba.druid.pool.DruidDataSource
           url: 
jdbc:mysql://IP:3306/hl_mall_order_cluster_0?useUnicode=true&characterEncoding=utf8&useOldAliasMetadataBehavior=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useInformationSchema=false&serverTimezone=UTC
           username: xxx
           password: xxxx
         ds1:
           driver-class-name: com.mysql.cj.jdbc.Driver
           type: com.alibaba.druid.pool.DruidDataSource
           url: 
jdbc:mysql://IP:3306/hl_mall_order_cluster_1?useUnicode=true&characterEncoding=utf8&useOldAliasMetadataBehavior=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useInformationSchema=false&serverTimezone=UTC
           username: xxx
           password: xxxx
         ds2:
           driver-class-name: com.mysql.cj.jdbc.Driver
           type: com.alibaba.druid.pool.DruidDataSource
           url: 
jdbc:mysql://IP:3306/hl_mall_order_cluster_2?useUnicode=true&characterEncoding=utf8&useOldAliasMetadataBehavior=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useInformationSchema=false&serverTimezone=UTC
           username: xxx
           password: xxxx
       rules:
         sharding:
           default-database-strategy:
             inline:
               sharding-column: order_id
               algorithm-expression: ds$->{order_id % 3}
           key-generators:
             snowflake:
               type: SNOWFLAKE
               props:
                 worker-id: 1
           sharding-algorithms:
             order-inline:
               type: INLINE
               props:
                 algorithm-expression: t_order$->{order_id % 4}
             order-item-inline:
               type: INLINE
               props:
                 algorithm-expression: t_order_item$->{order_id % 4}
             database-inline:
               type: INLINE
               props:
                 algorithm-expression: ds$->{order_id % 3}
           tables:
             t_order_item:
               actual-data-nodes: ds$->{0..2}.t_order_item$->{0..3}
               table-strategy:
                 standard:
                   sharding-column: order_id
                   sharding-algorithm-name: order-item-inline
               database-strategy:
                 standard:
                   sharding-column: order_id
                   sharding-algorithm-name: database-inline
             t_order:
               actual-data-nodes: ds$->{0..2}.t_order$->{0..3}
               table-strategy:
                 standard:
                   sharding-column: order_id
                   sharding-algorithm-name: order-inline
               database-strategy:
                 standard:
                   sharding-column: order_id
                   sharding-algorithm-name: database-inline
       enabled: true
   ```
   
   


-- 
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