summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorPavan Deolasee2017-08-25 05:56:38 +0000
committerPavan Deolasee2017-08-25 06:09:22 +0000
commita506209646f89b80e753316faa09474f4d91a8ba (patch)
tree0bc1c1098b3d42e3855b41543a2847422d2b90bb /src/test
parentce04fd56123dacb583f7d0f03b62887e3adce673 (diff)
Accept errors in tidscan regression test
We don't support BACKWARD scan of RemoteSubplan and neither support WHERE CURRENT OF. So accept errors arising out of these limitations. These test case changes are new in XL10 and hence we did not see these failures in the earlier releases of XL.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/tidscan.out54
-rw-r--r--src/test/regress/sql/tidscan.sql4
2 files changed, 17 insertions, 41 deletions
diff --git a/src/test/regress/expected/tidscan.out b/src/test/regress/expected/tidscan.out
index bd1fae084a..3355409f8a 100644
--- a/src/test/regress/expected/tidscan.out
+++ b/src/test/regress/expected/tidscan.out
@@ -118,18 +118,13 @@ FETCH ALL FROM c;
(0,1) | 3
(3 rows)
+-- XL does not support BACKWARD scan of RemoteSubplan/RemoteSubquery and
+-- hence the next statement fails
FETCH BACKWARD 1 FROM c;
- ctid | id
--------+----
- (0,2) | 2
-(1 row)
-
+ERROR: cursor can only scan forward
+HINT: Declare it with SCROLL option to enable backward scan.
FETCH FIRST FROM c;
- ctid | id
--------+----
- (0,1) | 1
-(1 row)
-
+ERROR: current transaction is aborted, commands ignored until end of transaction block
ROLLBACK;
-- tidscan via CURRENT OF
BEGIN;
@@ -148,47 +143,24 @@ FETCH NEXT FROM c;
-- perform update
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF)
+-- XL does not support WHERE CURRENT OF and hence the next
+-- statement fails
UPDATE tidscan SET id = -id WHERE CURRENT OF c RETURNING *;
- QUERY PLAN
----------------------------------------------------
- Update on tidscan (actual rows=1 loops=1)
- -> Tid Scan on tidscan (actual rows=1 loops=1)
- TID Cond: CURRENT OF c
-(3 rows)
-
+ERROR: WHERE CURRENT OF clause not yet supported
FETCH NEXT FROM c;
- ctid | id
--------+----
- (0,3) | 3
-(1 row)
-
+ERROR: current transaction is aborted, commands ignored until end of transaction block
-- perform update
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF)
UPDATE tidscan SET id = -id WHERE CURRENT OF c RETURNING *;
- QUERY PLAN
----------------------------------------------------
- Update on tidscan (actual rows=1 loops=1)
- -> Tid Scan on tidscan (actual rows=1 loops=1)
- TID Cond: CURRENT OF c
-(3 rows)
-
+ERROR: current transaction is aborted, commands ignored until end of transaction block
SELECT * FROM tidscan;
- id
-----
- 1
- -2
- -3
-(3 rows)
-
+ERROR: current transaction is aborted, commands ignored until end of transaction block
-- position cursor past any rows
FETCH NEXT FROM c;
- ctid | id
-------+----
-(0 rows)
-
+ERROR: current transaction is aborted, commands ignored until end of transaction block
-- should error out
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF)
UPDATE tidscan SET id = -id WHERE CURRENT OF c RETURNING *;
-ERROR: cursor "c" is not positioned on a row
+ERROR: current transaction is aborted, commands ignored until end of transaction block
ROLLBACK;
DROP TABLE tidscan;
diff --git a/src/test/regress/sql/tidscan.sql b/src/test/regress/sql/tidscan.sql
index c9d632e49d..16acf2819e 100644
--- a/src/test/regress/sql/tidscan.sql
+++ b/src/test/regress/sql/tidscan.sql
@@ -41,6 +41,8 @@ BEGIN;
DECLARE c CURSOR FOR
SELECT ctid, * FROM tidscan WHERE ctid = ANY(ARRAY['(0,1)', '(0,2)']::tid[]);
FETCH ALL FROM c;
+-- XL does not support BACKWARD scan of RemoteSubplan/RemoteSubquery and
+-- hence the next statement fails
FETCH BACKWARD 1 FROM c;
FETCH FIRST FROM c;
ROLLBACK;
@@ -52,6 +54,8 @@ FETCH NEXT FROM c; -- skip one row
FETCH NEXT FROM c;
-- perform update
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF)
+-- XL does not support WHERE CURRENT OF and hence the next
+-- statement fails
UPDATE tidscan SET id = -id WHERE CURRENT OF c RETURNING *;
FETCH NEXT FROM c;
-- perform update