Add test for complex-update issue #38
authorPallavi Sontakke <[email protected]>
Fri, 17 Jun 2016 09:09:21 +0000 (14:39 +0530)
committerPallavi Sontakke <[email protected]>
Fri, 17 Jun 2016 09:09:21 +0000 (14:39 +0530)
src/test/regress/expected/xl_known_bugs.out
src/test/regress/sql/xl_known_bugs.sql

index bd210881a20f9f753cdb7173c6fc8396518d7320..064390e2a0e315d4bbe1d052a9a1b6c6705b26c1 100644 (file)
@@ -751,3 +751,45 @@ FETCH FIRST xl_ins_cur;
 COMMIT;
 drop table xl_PLine;
 ------------------------------------------
+-- Issue #38 - complex update
+-- In complex update using FROM list with explicit join, equation clause ‘=’ for integer is not supported
+-- distributed by default by HASH(tmpunique1)
+CREATE TABLE xl_tmp (
+tmpunique1 int4,
+stringu1 name,
+stringu2 name,
+string4 name
+);
+-- distributed by default by HASH(unique1)
+CREATE TABLE xl_onek (
+unique1 int4,
+unique2 int4,
+two int4,
+four int4,
+stringu1 name,
+stringu2 name,
+string4 name
+);
+UPDATE xl_tmp
+   SET stringu1 = xl_onek.stringu1
+   FROM xl_onek
+   WHERE xl_onek.unique1 <= 3 and
+         xl_onek.unique1 = xl_tmp.tmpunique1;
+UPDATE xl_tmp
+   SET stringu1 = xl_onek.stringu1
+   FROM xl_onek
+   WHERE xl_onek.unique1 = 3 and
+         xl_onek.unique1 = xl_tmp.tmpunique1;
+UPDATE xl_tmp
+   SET stringu1 = xl_onek.stringu1
+   FROM xl_onek
+   WHERE xl_tmp.tmpunique1 <= 3 and
+         xl_onek.unique1 = xl_tmp.tmpunique1;
+UPDATE xl_tmp
+   SET stringu1 = xl_onek.stringu1
+   FROM xl_onek
+   WHERE xl_tmp.tmpunique1 = 3 and
+         xl_onek.unique1 = xl_tmp.tmpunique1;
+drop table xl_tmp;
+drop table xl_onek;
+------------------------------------------
index 093e0419e93217cc34cd8b4e0537cb22b2ce128a..38803c98868d0b700e2ad7a02d5a523a7db395f7 100644 (file)
@@ -302,3 +302,54 @@ COMMIT;
 drop table xl_PLine;
 
 ------------------------------------------
+
+-- Issue #38 - complex update
+
+-- In complex update using FROM list with explicit join, equation clause ‘=’ for integer is not supported
+
+-- distributed by default by HASH(tmpunique1)
+CREATE TABLE xl_tmp (
+tmpunique1 int4,
+stringu1 name,
+stringu2 name,
+string4 name
+);
+-- distributed by default by HASH(unique1)
+CREATE TABLE xl_onek (
+unique1 int4,
+unique2 int4,
+two int4,
+four int4,
+stringu1 name,
+stringu2 name,
+string4 name
+);
+
+UPDATE xl_tmp
+   SET stringu1 = xl_onek.stringu1
+   FROM xl_onek
+   WHERE xl_onek.unique1 <= 3 and
+         xl_onek.unique1 = xl_tmp.tmpunique1;
+
+UPDATE xl_tmp
+   SET stringu1 = xl_onek.stringu1
+   FROM xl_onek
+   WHERE xl_onek.unique1 = 3 and
+         xl_onek.unique1 = xl_tmp.tmpunique1;
+
+UPDATE xl_tmp
+   SET stringu1 = xl_onek.stringu1
+   FROM xl_onek
+   WHERE xl_tmp.tmpunique1 <= 3 and
+         xl_onek.unique1 = xl_tmp.tmpunique1;
+
+UPDATE xl_tmp
+   SET stringu1 = xl_onek.stringu1
+   FROM xl_onek
+   WHERE xl_tmp.tmpunique1 = 3 and
+         xl_onek.unique1 = xl_tmp.tmpunique1;
+
+drop table xl_tmp;
+drop table xl_onek;
+
+------------------------------------------