summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAbbas2011-09-05 15:46:19 +0000
committerAbbas2011-09-05 15:46:19 +0000
commit1d2801f818da73e0c73be4db281ab96beb628c9d (patch)
tree97a9ccc5ae6039ffcbd87a2abec04a3de7f09997 /src/test
parent76fb1e06d9eef7d0cdb9870b720c8eec10b38865 (diff)
In case of tables created with round robin distribution the function get_plan_nodes_insert was trying to use an un-initialized local variable named constant.
Added a test case and changed the expected output too
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/xc_distkey.out12
-rw-r--r--src/test/regress/sql/xc_distkey.sql7
2 files changed, 18 insertions, 1 deletions
diff --git a/src/test/regress/expected/xc_distkey.out b/src/test/regress/expected/xc_distkey.out
index e05fe7eb89..461f779e2b 100644
--- a/src/test/regress/expected/xc_distkey.out
+++ b/src/test/regress/expected/xc_distkey.out
@@ -103,8 +103,8 @@ insert into vc_tab values(NULL);
select * from vc_tab order by a;
a
----------------------------
- A quick brown fox
abcdefghijklmnopqrstuvwxyz
+ A quick brown fox
(3 rows)
@@ -616,3 +616,13 @@ select * from tstz_tab_h where a = 'Jun 23, 2001 23:59:59.99 PST';
Sun Jun 24 00:59:59.99 2001 PDT
(1 row)
+create table my_rr_tab(a integer, b varchar(100)) distribute by round robin;
+insert into my_rr_tab values(1 , 'One');
+insert into my_rr_tab values(2, 'Two');
+select * from my_rr_tab order by a;
+ a | b
+---+-----
+ 1 | One
+ 2 | Two
+(2 rows)
+
diff --git a/src/test/regress/sql/xc_distkey.sql b/src/test/regress/sql/xc_distkey.sql
index 8650718d32..b57502d26f 100644
--- a/src/test/regress/sql/xc_distkey.sql
+++ b/src/test/regress/sql/xc_distkey.sql
@@ -243,3 +243,10 @@ select * from tstz_tab_h order by a;
select * from tstz_tab_h where a = 'May 10, 2011 00:01:02.03 PST';
select * from tstz_tab_h where a = 'Jun 23, 2001 23:59:59.99 PST';
+
+create table my_rr_tab(a integer, b varchar(100)) distribute by round robin;
+insert into my_rr_tab values(1 , 'One');
+insert into my_rr_tab values(2, 'Two');
+
+select * from my_rr_tab order by a;
+