wenweibin opened a new issue #2379: delete from user where id=“xx” parse error 
in shading-jdbc 4.0.0-RC1
URL: https://github.com/apache/incubator-shardingsphere/issues/2379
 
 
   When I upgrade sharding-jdbc version to 4.0.0-RC1, the SQL: `delete from 
user where id=“xx” `cannot execute correctly, but it is ok in sharding-jdbc 
3.0.0.
   The log is:
   > line 1:12 no viable alternativeat in input 'fromuser'
   Actual SQL : ds_0 ::: delete from user where id=’xx‘ .
   
   The SQL should be written to `delete from user_5 where id=“xx” .`
   
   I debug this problem and found that AntlrSQLParser can't parse table-names 
accurately when parsing. I try to delete  USER kerword definition  in 
Keyword.g4`  and rebuild , then the SQL can execute  correctly.
   
   > USER 
              : U S E R
              ;
   
   So I think there may be some mistakes in the antlr .g4 files when SQL table 
name is 'user'.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to