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/06/13 04:18:37 UTC

[GitHub] [incubator-shardingsphere] cherrylzhao opened a new issue #2549: parse insert statement error while containing curate() function

cherrylzhao opened a new issue #2549: parse insert statement error while containing curate() function
URL: https://github.com/apache/incubator-shardingsphere/issues/2549
 
 
   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   4.0.0-RC2-SNAPSHOT
   
   ### Which project did you use? Sharding-JDBC or Sharding-Proxy?
   Sharding-JDBC & Sharding-Proxy
   
   ### Expected behavior
   sharding-column: debitacc
   `insert into journal (flowdate,amount,state,debitacc,creditacc) values (curdate(),1,'0', ?, ?)"`
   should be parsed succeed
   
   ### Actual behavior
   parsed insert statement contains wrong positionIndexMap, it resolve to sharding-value is wrong
   
   ![image](https://user-images.githubusercontent.com/8317649/59403370-f84eae80-8dd4-11e9-95cc-a882bd188f58.png)
   
   and this sql `insert into bill (flowno, flowdate, account_no, debitamount, credityield, customer_no) values (?, curdate(), ?, 1, 0, ?)` will be routed to all datanode, sharding-column is customer_no
   
   ### Reason analyze (If you can)
   
   ### 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services