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 11:55:07 UTC
[GitHub] [shardingsphere] peilinqian commented on issue #21421: Fetch forward is none and returns “ERROR: Index: 0”
peilinqian commented on issue #21421:
URL: https://github.com/apache/shardingsphere/issues/21421#issuecomment-1274564445
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=> start transaction;
START TRANSACTION
test_db=> cursor cur_test_01 for select * from t_ssdb order by 1;
DECLARE CURSOR
test_db=> ----without forward
test_db=> fetch from cur_test_01;
id | c_id | a | b
----+------+----+-------
1 | 1 | 10 | test1
(1 row)
test_db=> ----forward without count
test_db=> fetch forward from cur_test_01;
id | c_id | a | b
----+------+----+--------
1 | 2 | 10 | Test12
(1 row)
test_db=> ----forward with count
test_db=> fetch forward 2 from cur_test_01;
id | c_id | a | b
----+------+----+--------
1 | 2 | | test12
2 | 2 | 20 | test22
(2 rows)
test_db=> ----forward with all
test_db=> fetch forward all from cur_test_01;
id | c_id | a | b
----+------+-----+---------
2 | 1 | 20 | test21
2 | 3 | | Test22
3 | 3 | | test3
3 | 3 | | test3
3 | 1 | | test31
4 | 4 | 40 | test4
5 | 5 | 50 | Test5
6 | 6 | 60 | test6
7 | 4 | 74 | test74
8 | 5 | 85 | test85
9 | 5 | 50 | test95
10 | 6 | 106 | test106
(12 rows)
test_db=> ----forward next is none
test_db=> fetch forward 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