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/09/09 19:24:28 UTC

[GitHub] [incubator-shardingsphere] yjjqrqqq opened a new issue #3009: Define variable in sql

yjjqrqqq opened a new issue #3009: Define variable in sql
URL: https://github.com/apache/incubator-shardingsphere/issues/3009
 
 
   ### Which version of ShardingSphere did you use?
   4.0.0-RC2
   ### Which project did you use? Sharding-JDBC or Sharding-Proxy?
   Sharding-JDBC
   ### Expected behavior
   I found that if define variable in my sql, it will throw a exception .  "Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table 'xx.xxxx doesn't exist"
   `<select id="testSelect" resultType="map">
     SET @maxId = 100;
     SELECT * from xxxx where id <@maxId;
   </select>`
   ### Actual behavior
   
   ### Reason analyze (If you can)
   Dose ShardingSphere think  mysql variable should not be define in program 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services