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 2022/10/11 12:25:05 UTC

[GitHub] [shardingsphere] peilinqian commented on issue #18540: After the "cursor, close, fetch, move" sql is executed successfully. no return information

peilinqian commented on issue #18540:
URL: https://github.com/apache/shardingsphere/issues/18540#issuecomment-1274603894

   we find java version: java8, full_version=1.8.0_282, full_path=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-1.el7_9.x86_64/bin/java
   ShardingSphere-5.2.1-SNAPSHOT
   Commit ID: dirty-bcde6f374c4a3a025173fbc9f6d0e66ed686a042
   Commit Message: Fix fetch forward all error in openGauss(#21421) (#21471)
   Branch: bcde6f374c4a3a025173fbc9f6d0e66ed686a042
   Build time: 2022-10-11T19:13:56+0800
   
   ```
   test_db=> --查询fetch、move功能
   test_db=> start transaction;
   START TRANSACTION
   test_db=> --cursor子句正序功能验证
   test_db=> cursor cur_test_01 for select * from t_broadcast order by 1;
   DECLARE CURSOR
   test_db=> ----默认移动,不指定
   test_db=> move from cur_test_01;
   MOVE 1
   test_db=> move cur_test_01;
   MOVE 1
   test_db=> ----forward方式,不指定count
   test_db=> fetch forward from cur_test_01;
    id | c_id | a  |   b
   ----+------+----+-------
     3 |    3 | 10 | test3
   (1 row)
   
   test_db=> ----forward方式,指定count
   test_db=> fetch forward 2 from cur_test_01;
    id | c_id | a  |   b
   ----+------+----+-------
     4 |    4 | 40 | test4
     5 |    5 | 50 | test5
   (2 rows)
   
   test_db=> ----forward方式,指定all
   test_db=> fetch forward all from cur_test_01;
    id | c_id | a  |   b
   ----+------+----+-------
     6 |    6 | 60 | test6
   (1 row)
   
   test_db=> ----获取结果下一行为空
   test_db=> fetch forward from cur_test_01;
    id | c_id | a | b
   ----+------+---+---
   (0 rows)
   
   test_db=> close cur_test_01;
   CLOSE CURSOR
   test_db=> end;
   COMMIT
   test_db=>
   
   ```


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org