CrackerSuperior opened a new issue #13574:
URL: https://github.com/apache/shardingsphere/issues/13574


   version:
     master
   
   config:
   ``` yaml
   schemaName: zeus
   
   dataSources:
     ds_0:
       url: 
jdbc:mysql://127.0.0.1:3306/zeustest_0?serverTimezone=UTC&useSSL=false&characterEncoding=utf-8
       username: pcloud
       password: pcloud
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_1:
       url: 
jdbc:mysql://127.0.0.1:3306/zeustest_1?serverTimezone=UTC&useSSL=false&characterEncoding=utf-8
       username: pcloud
       password: pcloud
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
   
   rules:
     - !SHARDING
       tables:
         cloud_node_service:
           actualDataNodes: ds_${0..1}.cloud_node_service
         cloud_service:
           actualDataNodes: ds_${0..1}.cloud_service
       bindingTables:
         - cloud_node_service,cloud_service
       defaultDatabaseStrategy:
         standard:
           shardingColumn: service_uuid
           shardingAlgorithmName: database_inline_service
       defaultTableStrategy:
         none:
       shardingAlgorithms:
         database_inline_service:
           type: HASH_MOD
           props:
             sharding-count: 2
   ```
   
   error:
   ``` sql
   mysql> insert into cloud_node_service 
(node_id,service_uuid,version,version_time,metadata) values('teststr',(select 
service_uuid from cloud_service wher
   e app_name ='powercloud' and service_name = 
'vesta_server-basHostProductService'),'1.0',localtimestamp(0),'testtest') ON 
DUPLICATE KEY UPDATE version_ti
   me = VALUES(version_time);
   ERROR 1997 (C1997): Runtime exception: 
[org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.subquery.SubqueryExpressionSegment
 cannot be ca
   st to 
org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.LiteralExpressionSegment]
   ```


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