peilinqian opened a new issue, #18939:
URL: https://github.com/apache/shardingsphere/issues/18939

   ## 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/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 anymore 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?
   we find java version: java8, full_version=1.8.0_242
   ShardingSphere-5.1.3-SNAPSHOT
   Commit ID: dirty-7c67365b394d2e3ac562329b550c135c31ea764d
   Commit Message: Avoid overhead of invoking method in Optional.orElse (#18921)
   Branch: dev-0707
   Build time: 2022-07-07T14:29:43+0800
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   "Cursor, close, fetch, move" SQL statements are of DQL type. In 
readwrite-splitting mode, they are excuted in the slave database
   ### Actual behavior
   "Cursor, close, fetch, move" SQL statements are of DQL type. In 
readwrite-splitting mode, they are not excuted in the slave database
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   sql
   
   ```
   drop table if exists cur_test_01;
   create table cur_test_01(c_id int,c_num int,c_name varchar(10),c_city 
varchar(10),c_add varchar(20));
   insert into cur_test_01 
values(1,18,'Allen','Beijing','AAAAABAAAAA'),(2,368,'Bob','Shanghai','AAAAACAAAAA'),
   
(3,59,'Cathy','Shenzhen','AAAAADAAAAA'),(4,96,'David','Suzhou','AAAAAEAAAAA'),
   
(5,17,'Edrwd','Fenghuang','AAAAAFAAAAA'),(6,253,'Fendi','Changsha','AAAAAGAAAAA');
   start transaction;
   cursor cursor1 for select * from cur_test_01 order by 1;   --slave
   fetch from cursor1;    --slave
   insert into cur_test_01 values(7,18,'Allen','Beijing','AAAAABAAAAA'); 
--primary
   select * from cur_test_01 ;   --slave
   close cursor1;   --slave
   end;
   
   ```
   config
   ```
   dataSources:
     write_ds:
       url: 
jdbc:opengauss://xx.xxx.xx.xx:16000/test?serverTimezone=UTC&useSSL=false
       username: test
       password: Test@123
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     read_ds_0:
       url: 
jdbc:opengauss://xx.xxx.xx.xx:16000/test?serverTimezone=UTC&useSSL=false
       username: test
       password: Test@123
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     read_ds_1:
       url: 
jdbc:opengauss://xx.xxx.xx.xx:16000/test?serverTimezone=UTC&useSSL=false
       username: test
       password: Test@123
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
   
   rules:
   - !READWRITE_SPLITTING
     dataSources:
       readwrite_ds:
         staticStrategy:
           writeDataSourceName: write_ds
           readDataSourceNames:
             - read_ds_0
             - read_ds_1
         loadBalancerName: random
     loadBalancers:
       random:
         type: FIXED_REPLICA_WEIGHT
         props:
           read_ds_0: 9
           read_ds_1: 1
   ```
   
   ### 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.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to