From: Pallavi Sontakke Date: Thu, 28 Jul 2016 06:23:10 +0000 (+0530) Subject: Add test case for Issue #27 X-Git-Tag: XL9_5_R1_3~12 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=181fe29491a80fd96ea7c8a9ed016c3c226714a3;p=postgres-xl.git Add test case for Issue #27 Distribution column can be dropped for MODULO distribution tables. --- diff --git a/src/test/regress/expected/xl_alter_table.out b/src/test/regress/expected/xl_alter_table.out index dcee7dfb56..6d578b898a 100755 --- a/src/test/regress/expected/xl_alter_table.out +++ b/src/test/regress/expected/xl_alter_table.out @@ -78,7 +78,6 @@ ALTER TABLE xl_at3h DELETE NODE (datanode_2); ALTER TABLE xl_at3h ADD NODE (datanode_2); ALTER TABLE xl_at3h DISTRIBUTE BY REPLICATION; -- MODULO Distributed table: --- Distribution column cannot be dropped (BUG: It can be dropped now. Test Fails). CREATE TABLE xl_at2m ( product_no INT8, product_id INT2 @@ -100,7 +99,6 @@ ALTER TABLE xl_at2m RENAME COLUMN product_id TO product_identifier; ALTER TABLE xl_at2m RENAME TO xl_at3m; ALTER TABLE xl_at3m DELETE NODE (datanode_2); ALTER TABLE xl_at3m ADD NODE (datanode_2); -ALTER TABLE xl_at3m DROP COLUMN product_identifier;--bug - distribution column can be dropped. ALTER TABLE xl_at3m DISTRIBUTE BY REPLICATION; DROP TABLE xl_at; DROP TABLE xl_at1; diff --git a/src/test/regress/expected/xl_reported_bugs.out b/src/test/regress/expected/xl_reported_bugs.out index e8b8bd6f2d..d48802d6c9 100644 --- a/src/test/regress/expected/xl_reported_bugs.out +++ b/src/test/regress/expected/xl_reported_bugs.out @@ -1,3 +1,12 @@ +-- #27 +-- Distribution column can be dropped for MODULO distribution tables. +CREATE TABLE xl_at2m ( + product_no INT8, + product_id INT2 +) DISTRIBUTE BY MODULO (product_id); +ALTER TABLE xl_at2m DROP COLUMN product_id; +ERROR: Distribution column cannot be dropped +DROP TABLE xl_at2m; -- #6 -- REFRESH MATERIALISED VIEW CONCURRENTLY gives error CREATE TABLE t (a int, b int); diff --git a/src/test/regress/sql/xl_alter_table.sql b/src/test/regress/sql/xl_alter_table.sql index add68854a5..1f1c112b2b 100755 --- a/src/test/regress/sql/xl_alter_table.sql +++ b/src/test/regress/sql/xl_alter_table.sql @@ -131,7 +131,6 @@ ALTER TABLE xl_at3h ADD NODE (datanode_2); ALTER TABLE xl_at3h DISTRIBUTE BY REPLICATION; -- MODULO Distributed table: --- Distribution column cannot be dropped (BUG: It can be dropped now. Test Fails). CREATE TABLE xl_at2m ( product_no INT8, @@ -172,8 +171,6 @@ ALTER TABLE xl_at3m DELETE NODE (datanode_2); ALTER TABLE xl_at3m ADD NODE (datanode_2); -ALTER TABLE xl_at3m DROP COLUMN product_identifier;--bug - distribution column can be dropped. - ALTER TABLE xl_at3m DISTRIBUTE BY REPLICATION; DROP TABLE xl_at; diff --git a/src/test/regress/sql/xl_reported_bugs.sql b/src/test/regress/sql/xl_reported_bugs.sql index 5114159faa..986c0a860a 100644 --- a/src/test/regress/sql/xl_reported_bugs.sql +++ b/src/test/regress/sql/xl_reported_bugs.sql @@ -1,3 +1,11 @@ +-- #27 +-- Distribution column can be dropped for MODULO distribution tables. +CREATE TABLE xl_at2m ( + product_no INT8, + product_id INT2 +) DISTRIBUTE BY MODULO (product_id); +ALTER TABLE xl_at2m DROP COLUMN product_id; +DROP TABLE xl_at2m; -- #6 -- REFRESH MATERIALISED VIEW CONCURRENTLY gives error CREATE TABLE t (a int, b int);