You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/03/05 01:53:28 UTC

[GitHub] [incubator-shardingsphere] linyuliang opened a new issue #1967: Shard table name error when exec select sql in multi thread concurrent

linyuliang opened a new issue #1967: Shard table name error when exec select sql in multi thread concurrent
URL: https://github.com/apache/incubator-shardingsphere/issues/1967
 
 
   ### Which version of ShardingSphere did you use?
   it happened in version3.1.0,  I tested 3.00 && 3.1.0M1, it's ok
   
   ### Which project did you use? Sharding-JDBC or Sharding-Proxy?
   Sharding-JDBC
   
   ### Expected behavior
   for example my sql is:
   select a from test1 where ymd =?
   select b from test2 where ymd =?
   
   expected
   select a from test1_20190305 where ymd =20190305
   select b from test2_20190303 where ymd =20190303
   
   ### Actual behavior
   select a from test2_20190305 where ymd =20190305 --table name error
   select b from test1_20190303 where ymd =20190303 --table name error
   select a from test1_20190305 where ymd =20190305
   select b from test2_20190303 where ymd =20190303
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   just test it in junit test case
   
   ### Example codes for reproduce this issue (such as a github link).
       @Test
       public void test6() {
           int i = 0;
           while (i < 100) {
               new Thread(new Runnable() {
                   @Override
                   public void run() {
                       List<Map<String, Object>> maps1 = appApOfflineEventMapper.getApOfflineReasonList("20190303");
                       System.out.println(maps1);
                   }
               }).start();
   
               new Thread(new Runnable() {
                   @Override
                   public void run() {
                       List<Map> maps = appApOfflineEventHourStatsMapper.getApOfflineStats("20190228");
                       System.out.println(maps);
                   }
   
               }).start();
               ++i;
           }
       }
   

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