summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbbas2011-09-06 14:55:00 +0000
committerAbbas2011-09-06 14:55:00 +0000
commit94d506c20f962b2a3e5097f87510994de5f358be (patch)
treec69dc3ca00a2f4608bebca0703b1243f8b715e21
parent1d2801f818da73e0c73be4db281ab96beb628c9d (diff)
A few fixes for regression test cases and a variable name change
-rw-r--r--src/backend/pgxc/plan/planner.c8
-rw-r--r--src/test/regress/expected/transactions_1.out4
-rw-r--r--src/test/regress/output/create_misc_1.source (renamed from src/test/regress/expected/create_misc_1.out)4
-rw-r--r--src/test/regress/sql/transactions.sql4
4 files changed, 10 insertions, 10 deletions
diff --git a/src/backend/pgxc/plan/planner.c b/src/backend/pgxc/plan/planner.c
index 2515e3fd77..9f4b885d97 100644
--- a/src/backend/pgxc/plan/planner.c
+++ b/src/backend/pgxc/plan/planner.c
@@ -531,7 +531,7 @@ get_plan_nodes_insert(PlannerInfo *root, RemoteQuery *step)
Query *query = root->parse;
RangeTblEntry *rte;
RelationLocInfo *rel_loc_info;
- Const *constant = NULL;
+ Const *constExpr = NULL;
ListCell *lc;
Expr *eval_expr = NULL;
@@ -703,14 +703,14 @@ get_plan_nodes_insert(PlannerInfo *root, RemoteQuery *step)
return;
}
- constant = (Const *) checkexpr;
+ constExpr = (Const *) checkexpr;
}
}
- if (constant == NULL)
+ if (constExpr == NULL)
step->exec_nodes = GetRelationNodes(rel_loc_info, 0, InvalidOid, RELATION_ACCESS_INSERT);
else
- step->exec_nodes = GetRelationNodes(rel_loc_info, constant->constvalue, constant->consttype, RELATION_ACCESS_INSERT);
+ step->exec_nodes = GetRelationNodes(rel_loc_info, constExpr->constvalue, constExpr->consttype, RELATION_ACCESS_INSERT);
if (eval_expr)
pfree(eval_expr);
diff --git a/src/test/regress/expected/transactions_1.out b/src/test/regress/expected/transactions_1.out
index 3cf5273814..cfbd1f13f1 100644
--- a/src/test/regress/expected/transactions_1.out
+++ b/src/test/regress/expected/transactions_1.out
@@ -564,7 +564,7 @@ insert into abc values (5);
ERROR: current transaction is aborted, commands ignored until end of transaction block
insert into abc values (10);
ERROR: current transaction is aborted, commands ignored until end of transaction block
-declare foo cursor for select * from abc;
+declare foo cursor for select * from abc order by a;
ERROR: current transaction is aborted, commands ignored until end of transaction block
fetch from foo;
ERROR: current transaction is aborted, commands ignored until end of transaction block
@@ -579,7 +579,7 @@ create table abc (a int);
insert into abc values (5);
insert into abc values (10);
insert into abc values (15);
-declare foo cursor for select * from abc;
+declare foo cursor for select * from abc order by a;
fetch from foo;
a
---
diff --git a/src/test/regress/expected/create_misc_1.out b/src/test/regress/output/create_misc_1.source
index 3706e5aff2..3e827fb2a4 100644
--- a/src/test/regress/expected/create_misc_1.out
+++ b/src/test/regress/output/create_misc_1.source
@@ -5,7 +5,7 @@
-- (any resemblance to real life is purely coincidental)
--
INSERT INTO tenk2 SELECT * FROM tenk1;
-COPY tenk2 FROM '/home/michael/bin/regress/data/tenk.data';
+COPY tenk2 FROM '@abs_srcdir@/data/tenk.data';
SELECT * INTO TABLE onek2 FROM onek;
ERROR: INTO clause not yet supported
CREATE TABLE onek2 (
@@ -26,7 +26,7 @@ CREATE TABLE onek2 (
stringu2 name,
string4 name
);
-COPY onek2 FROM '/home/michael/bin/regress/data/onek.data';
+COPY onek2 FROM '@abs_srcdir@/data/onek.data';
INSERT INTO fast_emp4000 SELECT * FROM slow_emp4000;
SELECT *
INTO TABLE Bprime
diff --git a/src/test/regress/sql/transactions.sql b/src/test/regress/sql/transactions.sql
index 2788308e9c..dc33e7b694 100644
--- a/src/test/regress/sql/transactions.sql
+++ b/src/test/regress/sql/transactions.sql
@@ -342,7 +342,7 @@ savepoint x;
create table abc (a int);
insert into abc values (5);
insert into abc values (10);
-declare foo cursor for select * from abc;
+declare foo cursor for select * from abc order by a;
fetch from foo;
rollback to x;
@@ -356,7 +356,7 @@ create table abc (a int);
insert into abc values (5);
insert into abc values (10);
insert into abc values (15);
-declare foo cursor for select * from abc;
+declare foo cursor for select * from abc order by a;
fetch from foo;