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 2022/06/23 07:07:36 UTC

[GitHub] [shardingsphere] 924438567 opened a new issue, #18536: java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.] with root cause

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

   mybatis3.5.9 + sharding jdbc5.1.1
   
   
   spring:
     shardingsphere:
       datasource:
         names: ds0
         ds0:
           url: jdbc:mysql://localhost:3306/data_op
           username: root
           password: 9244
           driver-class-name: com.mysql.cj.jdbc.Driver
           type: com.zaxxer.hikari.HikariDataSource
       rules:
         sharding:
           tables:
             qy_barrage: #要分表的名称
               actual-data-nodes: ds0.qy_barrage_$->{['aaa', 'sss111']}_$->{2022..9999}   #表示 从连接名为master的库中的sys_user_0到sys_user_1号表查询
               table-strategy:
                 standard:
                   sharding-column: cus_no,send_time     #用id 这列来取模
                   sharding-algorithm-name: complexDsAlgorithm   #取模的算法名称
               key-generator:
                 # 主键名
                 column: id
                 # 雪花算法生成
                 type: SNOWFLAKE
           sharding-algorithms:
             complexDsAlgorithm:
               props:
                 sharding-columns: cus_no,send_time
                 algorithm-expression: qy_barrage_$->{cus_no}_$->{send_time.split("-")[0]}
               type: COMPLEX_INLINE
       props:
         sql-show: true
   mybatis:
     mapper-locations: classpath:mapper/*.xml


-- 
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] 924438567 commented on issue #18536: java.sql.SQLException: Field 'id' doesn't have a default value

Posted by GitBox <gi...@apache.org>.
924438567 commented on issue #18536:
URL: https://github.com/apache/shardingsphere/issues/18536#issuecomment-1164473265

   > What is your SQL?
   
   and when I change  the  actual-data-nodes from  ds0.qy_barrage_$->{'(。)*'}_$->{2022..9999}  to ds0.qy_barrage_$->{['aaa','bbb']}_$->{2022..9999},  it works correctly!!!   why?


-- 
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] 924438567 commented on issue #18536: java.sql.SQLException: Field 'id' doesn't have a default value

Posted by GitBox <gi...@apache.org>.
924438567 commented on issue #18536:
URL: https://github.com/apache/shardingsphere/issues/18536#issuecomment-1164419473

   > What is your SQL?
   
   I have changed the problem,please。


-- 
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] 924438567 closed issue #18536: java.sql.SQLException: Field 'id' doesn't have a default value

Posted by GitBox <gi...@apache.org>.
924438567 closed issue #18536: java.sql.SQLException: Field 'id' doesn't have a default value
URL: https://github.com/apache/shardingsphere/issues/18536


-- 
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] terrymanu commented on issue #18536: java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.] with root cause

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #18536:
URL: https://github.com/apache/shardingsphere/issues/18536#issuecomment-1164382934

   What is your SQL?


-- 
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] terrymanu commented on issue #18536: java.sql.SQLException: Field 'id' doesn't have a default value

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #18536:
URL: https://github.com/apache/shardingsphere/issues/18536#issuecomment-1164675694

   > > What is your SQL?
   > 
   > I have changed the problem,please。
   
   If the issue is changed, please close this issue with reason, and reopen another issue to represent your question.


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