summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAbbas2011-06-24 17:59:57 +0000
committerAbbas2011-06-24 17:59:57 +0000
commitff7be6e332b36fc7aad99876bf107e258264a7f1 (patch)
treee72854c2ad18eade7812ab2146c54512e0a31617 /src/test
parentd56caa5e2ac517b83595586987794337c9dea357 (diff)
This patch adds a system in XC to cancel a running query, and flush network buffers of any results data nodes might have sent before cancelling the query.
This was required to fix certain issues where coordinator encounters an error while processing rows from data nodes and quits row processing. It then issues a new query and finds an old row description in the network buffer. This can and was crashing the server. To cancel a query a new pooler command 'h' is added. This command is sent to the pooler by the coordinator and the pooler issues PQcancel to the respective data nodes. Cancel request is sent every time coordinator raises an error of level more than ERROR. This commit fixes bug 3306801
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/domain_1.out9
-rw-r--r--src/test/regress/expected/xc_distkey.out52
-rw-r--r--src/test/regress/serial_schedule2
3 files changed, 30 insertions, 33 deletions
diff --git a/src/test/regress/expected/domain_1.out b/src/test/regress/expected/domain_1.out
index 07808af958..02f1556462 100644
--- a/src/test/regress/expected/domain_1.out
+++ b/src/test/regress/expected/domain_1.out
@@ -48,8 +48,7 @@ ERROR: value too long for type character varying(5)
INSERT INTO basictest values ('88', 'haha', 'short', '123.1212'); -- Truncate numeric
-- Test copy
COPY basictest (testvarchar) FROM stdin; -- fail
-ERROR: value too long for type character varying(5)
-CONTEXT: COPY basictest, line 1, column testvarchar: "notsoshorttext"
+ERROR: Error while running COPY
COPY basictest (testvarchar) FROM stdin;
select * from basictest order by 1, 2, 3, 4;
testint4 | testtext | testvarchar | testnumeric
@@ -129,8 +128,7 @@ select testint4arr[1], testchar4arr[2:2] from domarrtest order by 1, 2;
COPY domarrtest FROM stdin;
COPY domarrtest FROM stdin; -- fail
-ERROR: value too long for type character varying(4)
-CONTEXT: COPY domarrtest, line 1, column testchar4arr: "{qwerty,w,e}"
+ERROR: Error while running COPY
select * from domarrtest order by 1, 2;
testint4arr | testchar4arr
---------------+---------------------
@@ -174,8 +172,7 @@ INSERT INTO nulltest values ('a', 'b', 'c', NULL, 'd'); -- Good
COPY nulltest FROM stdin; --fail
ERROR: Error while running COPY
COPY nulltest FROM stdin; --fail
-ERROR: domain dcheck does not allow null values
-CONTEXT: COPY nulltest, line 1, column col5: null input
+ERROR: Error while running COPY
-- Last row is bad
COPY nulltest FROM stdin;
ERROR: Error while running COPY
diff --git a/src/test/regress/expected/xc_distkey.out b/src/test/regress/expected/xc_distkey.out
index d050b27c33..819952a266 100644
--- a/src/test/regress/expected/xc_distkey.out
+++ b/src/test/regress/expected/xc_distkey.out
@@ -451,15 +451,15 @@ select * from ts_tab order by a;
(2 rows)
select * from ts_tab where a = 'May 10, 2011 00:01:02.03';
- a
-------------------------
- 2011-05-10 00:01:02.03
+ a
+-----------------------------
+ Tue May 10 00:01:02.03 2011
(1 row)
select * from ts_tab where a = 'August 14, 2001 23:59:59.99';
- a
-------------------------
- 2001-08-14 23:59:59.99
+ a
+-----------------------------
+ Tue Aug 14 23:59:59.99 2001
(1 row)
create table in_tab(a interval) distribute by modulo(a);
@@ -517,15 +517,15 @@ select * from atim_tab order by a;
(2 rows)
select * from atim_tab where a = abstime('May 10, 2011 00:01:02.03');
- a
-------------------------
- 2011-05-10 12:01:02+05
+ a
+------------------------------
+ Tue May 10 00:01:02 2011 PDT
(1 row)
select * from atim_tab where a = abstime('Jun 23, 2001 23:59:59.99');
- a
-------------------------
- 2001-06-24 11:59:59+05
+ a
+------------------------------
+ Sat Jun 23 23:59:59 2001 PDT
(1 row)
create table rtim_tab(a reltime) distribute by modulo(a);
@@ -563,13 +563,13 @@ select * from date_tab order by a;
select * from date_tab where a = 'May 10, 2011';
a
------------
- 2011-05-10
+ 05-10-2011
(1 row)
select * from date_tab where a = 'August 23, 2001';
a
------------
- 2001-08-23
+ 08-23-2001
(1 row)
create table tstz_tab(a timestamp with time zone) distribute by modulo(a);
@@ -583,15 +583,15 @@ select * from tstz_tab order by a;
(2 rows)
select * from tstz_tab where a = 'May 10, 2011 00:01:02.03 PST';
- a
----------------------------
- 2011-05-10 13:01:02.03+05
+ a
+---------------------------------
+ Tue May 10 01:01:02.03 2011 PDT
(1 row)
select * from tstz_tab where a = 'Jun 23, 2001 23:59:59.99 PST';
- a
----------------------------
- 2001-06-24 12:59:59.99+05
+ a
+---------------------------------
+ Sun Jun 24 00:59:59.99 2001 PDT
(1 row)
create table tstz_tab_h(a timestamp with time zone) distribute by hash(a);
@@ -605,14 +605,14 @@ select * from tstz_tab_h order by a;
(2 rows)
select * from tstz_tab_h where a = 'May 10, 2011 00:01:02.03 PST';
- a
----------------------------
- 2011-05-10 13:01:02.03+05
+ a
+---------------------------------
+ Tue May 10 01:01:02.03 2011 PDT
(1 row)
select * from tstz_tab_h where a = 'Jun 23, 2001 23:59:59.99 PST';
- a
----------------------------
- 2001-06-24 12:59:59.99+05
+ a
+---------------------------------
+ Sun Jun 24 00:59:59.99 2001 PDT
(1 row)
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 658f930e22..6b58aa78d0 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -42,7 +42,7 @@ test: comments
test: geometry
#After supporting other data types as distribution key, this test case crashes the server
#Bug ID 3306801 tracks this crash
-#test: horology
+test: horology
test: oidjoins
test: type_sanity
test: opr_sanity