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/10/31 02:55:47 UTC

[GitHub] [incubator-shardingsphere] haetao opened a new issue #3419: Using Sharding-Proxy to insert error when using PreparedStatement in backen database PostgreSQL

haetao opened a new issue #3419: Using Sharding-Proxy to insert error when using PreparedStatement  in backen database  PostgreSQL
URL: https://github.com/apache/incubator-shardingsphere/issues/3419
 
 
   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/incubator-shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response **more than 7 days** and we cannot reproduce it on current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   4.0.0-rc3
   ### Which project did you use? Sharding-JDBC or Sharding-Proxy?
   Sharding-Proxy
   ### Expected behavior
   Successfully inserted a record
   ### Actual behavior
   No this record in table
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
       - use database: postgresql
       - sql to execute: INSERT INTO t_encrypt(pwd,content) VALUES(?,?)
       - Statement: PreparedStatement
       
   config:
   ![微信截图_20191031104012](https://user-images.githubusercontent.com/46469719/67914377-e70f0e80-fbca-11e9-8624-cd743baccbcf.png)
   
   exception:
   ![微信截图_20191031104221](https://user-images.githubusercontent.com/46469719/67914457-24739c00-fbcb-11e9-99d4-bbc5b8cb17bf.png)
   
   ### Example codes for reproduce this issue (such as a github link).
   `DataSource source = DataSourceFactory.newRawJDBCDataSource()
                   .dbType(DatabaseType.POSTGRESQL)
                   .dataSourceName("MyEncrypt")
                   .host("localhost")
                   .port(3307)
                   .userName("root")
                   .password("root")
                   .create();
           Connection connection = source.getConnection();
           PreparedStatement statement = connection.prepareStatement("INSERT INTO t_encrypt(pwd,content) VALUES(?,?)");
           statement.setString(1,"password");
           statement.setString(2,"this is encrypt test");
           statement.executeUpdate();`

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