You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/10/23 02:45:18 UTC

[GitHub] [incubator-shardingsphere] ustbyjy commented on issue #2920: When association query,table name of join table is changed to lowercase, but the first is not unchanged

ustbyjy commented on issue #2920: When association query,table name of join table is changed to lowercase, but the first is not unchanged
URL: https://github.com/apache/incubator-shardingsphere/issues/2920#issuecomment-545239663
 
 
   1.I use Sharding-Proxy 4.0.0-RC2, which is downloaded from [https://shardingsphere.apache.org/document/current/en/downloads/](shardingsphere.apache.org).
   
   2.The config-sharding.yaml file is shown below: 
   `
   schemaName: sharding_db
   
   dataSources:
     ds_0:
       url: jdbc:mysql://vhost1:3306/metastore?useSSL=false
       username: root
       password: root123..
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
     ds_1:
       url: jdbc:mysql://vhost1:3306/holmes?useSSL=false
       username: root
       password: root123..
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
   
   shardingRule:
     tables:
       DBS:
         actualDataNodes: ds_0.DBS
       TBLS:
         actualDataNodes: ds_0.TBLS
       TABLE_PARAMS:
         actualDataNodes: ds_0.TABLE_PARAMS 
       SDS:
         actualDataNodes: ds_0.SDS
       COLUMNS_V2:
         actualDataNodes: ds_0.COLUMNS_V2
   
       board:
         actualDataNodes: ds_1.board
       common:
         actualDataNodes: ds_1.common
       event:
         actualDataNodes: ds_1.event
       event_filter:
         actualDataNodes: ds_1.event_filter
       filter:
         actualDataNodes: ds_1.filter
       graph:
         actualDataNodes: ds_1.graph
       graph_group:
         actualDataNodes: ds_1.graph_group
       project_db:
         actualDataNodes: ds_1.project_db
       report:
         actualDataNodes: ds_1.report
       table_info:
         actualDataNodes: ds_1.table_info
     bindingTables:
       - DBS,TBLS,TABLE_PARAMS,SDS,COLUMNS_V2,board,common,event,event_filter,filter,graph,graph_group,project_db,report,table_info
     defaultDataSourceName:
       ds_1
     defaultDatabaseStrategy:
       none:
     defaultTableStrategy:
       none:
   `
   
   3.The SQL is `select COLUMNS_V2.* from COLUMNS_V2 left join SDS ON SDS.CD_ID = COLUMNS_V2.CD_ID left join TBLS ON TBLS.TBL_ID = SDS.SD_ID`
   
   4.The running log is as follows:
   `
   [INFO ] 10:44:38.822 [ShardingSphere-Command-6] ShardingSphere-SQL - Rule Type: sharding
   [INFO ] 10:44:38.823 [ShardingSphere-Command-6] ShardingSphere-SQL - Logic SQL: SET PROFILING = 1
   [INFO ] 10:44:38.823 [ShardingSphere-Command-6] ShardingSphere-SQL - SQLStatement: TransparentOptimizedStatement(tables=Tables(tables=[], schema=Optional.absent()))
   [INFO ] 10:44:38.824 [ShardingSphere-Command-6] ShardingSphere-SQL - Actual SQL: ds_0 ::: SET PROFILING = 1
   [INFO ] 10:44:38.824 [ShardingSphere-Command-6] ShardingSphere-SQL - Actual SQL: ds_1 ::: SET PROFILING = 1
   [INFO ] 10:44:38.858 [ShardingSphere-Command-7] ShardingSphere-SQL - Rule Type: sharding
   [INFO ] 10:44:38.858 [ShardingSphere-Command-7] ShardingSphere-SQL - Logic SQL: SHOW STATUS
   [INFO ] 10:44:38.858 [ShardingSphere-Command-7] ShardingSphere-SQL - SQLStatement: TransparentOptimizedStatement(tables=Tables(tables=[], schema=Optional.absent()))
   [INFO ] 10:44:38.858 [ShardingSphere-Command-7] ShardingSphere-SQL - Actual SQL: ds_0 ::: SHOW STATUS
   [INFO ] 10:44:38.859 [ShardingSphere-Command-7] ShardingSphere-SQL - Actual SQL: ds_1 ::: SHOW STATUS
   [INFO ] 10:44:38.901 [ShardingSphere-Command-8] ShardingSphere-SQL - Rule Type: sharding
   [INFO ] 10:44:38.901 [ShardingSphere-Command-8] ShardingSphere-SQL - Logic SQL: SHOW STATUS
   [INFO ] 10:44:38.901 [ShardingSphere-Command-8] ShardingSphere-SQL - SQLStatement: TransparentOptimizedStatement(tables=Tables(tables=[], schema=Optional.absent()))
   [INFO ] 10:44:38.901 [ShardingSphere-Command-8] ShardingSphere-SQL - Actual SQL: ds_0 ::: SHOW STATUS
   [INFO ] 10:44:38.901 [ShardingSphere-Command-8] ShardingSphere-SQL - Actual SQL: ds_1 ::: SHOW STATUS
   [INFO ] 10:44:38.965 [ShardingSphere-Command-9] ShardingSphere-SQL - Rule Type: sharding
   [INFO ] 10:44:38.965 [ShardingSphere-Command-9] ShardingSphere-SQL - Logic SQL: select COLUMNS_V2.* from COLUMNS_V2 left join SDS ON SDS.CD_ID = COLUMNS_V2.CD_ID left join TBLS ON TBLS.TBL_ID = SDS.SD_ID
   [INFO ] 10:44:38.965 [ShardingSphere-Command-9] ShardingSphere-SQL - SQLStatement: ShardingSelectOptimizedStatement(tables=Tables(tables=[Table(name=COLUMNS_V2, alias=Optional.absent()), Table(name=SDS, alias=Optional.absent()), Table(name=TBLS, alias=Optional.absent())], schema=Optional.absent()), groupBy=org.apache.shardingsphere.core.optimize.sharding.segment.select.groupby.GroupBy@7de19913, orderBy=org.apache.shardingsphere.core.optimize.sharding.segment.select.orderby.OrderBy@732668df, selectItems=SelectItems(startIndex=7, stopIndex=18, distinctRow=false, items=[ShorthandSelectItem(owner=Optional.of(COLUMNS_V2))], tables=[TableSegment(startIndex=25, stopIndex=34, name=COLUMNS_V2, quoteCharacter=NONE, owner=Optional.absent(), alias=Optional.absent()), TableSegment(startIndex=46, stopIndex=48, name=SDS, quoteCharacter=NONE, owner=Optional.absent(), alias=Optional.absent()), TableSegment(startIndex=92, stopIndex=95, name=TBLS, quoteCharacter=NONE, owner=Optional.absent(), alias=Optional.absent())]), pagination=org.apache.shardingsphere.core.optimize.sharding.segment.select.pagination.Pagination@7719f263, containsSubquery=false)
   [INFO ] 10:44:38.966 [ShardingSphere-Command-9] ShardingSphere-SQL - Actual SQL: ds_0 ::: select COLUMNS_V2.* from COLUMNS_V2 left join sds ON sds.CD_ID = COLUMNS_V2.CD_ID left join tbls ON tbls.TBL_ID = sds.SD_ID
   `

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services