You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2016/06/21 15:37:30 UTC
[2/6] incubator-trafodion git commit: [TRAFODION-2074] Create index
should avoid populating the index within the transaction
[TRAFODION-2074] Create index should avoid populating the index within the
transaction
Fix for failure in core/TEST116
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/7bc7d618
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/7bc7d618
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/7bc7d618
Branch: refs/heads/master
Commit: 7bc7d618f454a60dd981bf6760bee1b1eded46f3
Parents: bcdbfbc
Author: selvaganesang <se...@esgyn.com>
Authored: Sat Jun 18 05:42:37 2016 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Sat Jun 18 05:42:37 2016 +0000
----------------------------------------------------------------------
core/sql/regress/core/EXPECTED116 | 56 ++++++++++++++++++----------------
core/sql/regress/core/TEST116 | 18 +++++------
2 files changed, 38 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7bc7d618/core/sql/regress/core/EXPECTED116
----------------------------------------------------------------------
diff --git a/core/sql/regress/core/EXPECTED116 b/core/sql/regress/core/EXPECTED116
index 3fd3c8f..be139a8 100644
--- a/core/sql/regress/core/EXPECTED116
+++ b/core/sql/regress/core/EXPECTED116
@@ -341,7 +341,7 @@ A1 C1 B1
>>invoke t116t1;
-- Definition of Trafodion table TRAFODION.SCH.T116T1
--- Definition current Fri Jun 17 21:52:28 2016
+-- Definition current Sat Jun 18 04:40:10 2016
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -359,7 +359,7 @@ A1 C1 B1
>>invoke t116t1;
-- Definition of Trafodion table TRAFODION.SCH.T116T1
--- Definition current Fri Jun 17 21:52:28 2016
+-- Definition current Sat Jun 18 04:40:10 2016
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -374,7 +374,7 @@ A1 C1 B1
>>invoke t116v1;
-- Definition of Trafodion view TRAFODION.SCH.T116V1
--- Definition current Fri Jun 17 21:52:29 2016
+-- Definition current Sat Jun 18 04:40:10 2016
(
A INT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -391,7 +391,7 @@ A1 C1 B1
>>invoke t116t1;
-- Definition of Trafodion table TRAFODION.SCH.T116T1
--- Definition current Fri Jun 17 21:52:37 2016
+-- Definition current Sat Jun 18 04:40:15 2016
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -406,7 +406,7 @@ A1 C1 B1
>>invoke t116v1;
-- Definition of Trafodion view TRAFODION.SCH.T116V1
--- Definition current Fri Jun 17 21:52:37 2016
+-- Definition current Sat Jun 18 04:40:15 2016
(
A INT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -423,7 +423,7 @@ A1 C1 B1
>>invoke t116t1;
-- Definition of Trafodion table TRAFODION.SCH.T116T1
--- Definition current Fri Jun 17 21:52:40 2016
+-- Definition current Sat Jun 18 04:40:18 2016
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -438,7 +438,7 @@ A1 C1 B1
>>invoke t116v1;
-- Definition of Trafodion view TRAFODION.SCH.T116V1
--- Definition current Fri Jun 17 21:52:40 2016
+-- Definition current Sat Jun 18 04:40:18 2016
(
A INT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -456,7 +456,7 @@ A1 C1 B1
>>invoke t116t1;
-- Definition of Trafodion table TRAFODION.SCH.T116T1
--- Definition current Fri Jun 17 21:52:40 2016
+-- Definition current Sat Jun 18 04:40:18 2016
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -471,7 +471,7 @@ A1 C1 B1
>>invoke t116v1;
-- Definition of Trafodion view TRAFODION.SCH.T116V1
--- Definition current Fri Jun 17 21:52:40 2016
+-- Definition current Sat Jun 18 04:40:18 2016
(
A INT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -488,7 +488,7 @@ A1 C1 B1
>>invoke t116t1;
-- Definition of Trafodion table TRAFODION.SCH.T116T1
--- Definition current Fri Jun 17 21:52:45 2016
+-- Definition current Sat Jun 18 04:40:23 2016
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -503,7 +503,7 @@ A1 C1 B1
>>invoke t116v1;
-- Definition of Trafodion view TRAFODION.SCH.T116V1
--- Definition current Fri Jun 17 21:52:45 2016
+-- Definition current Sat Jun 18 04:40:23 2016
(
A INT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -521,7 +521,7 @@ A1 C1 B1
>>invoke t116t1;
-- Definition of Trafodion table TRAFODION.SCH.T116T1
--- Definition current Fri Jun 17 21:52:49 2016
+-- Definition current Sat Jun 18 04:40:27 2016
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -536,7 +536,7 @@ A1 C1 B1
>>invoke t116v1;
-- Definition of Trafodion view TRAFODION.SCH.T116V1
--- Definition current Fri Jun 17 21:52:49 2016
+-- Definition current Sat Jun 18 04:40:27 2016
(
A INT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -594,7 +594,7 @@ End of MXCI Session
>>invoke t116t1;
-- Definition of Trafodion table TRAFODION.SCH.T116T1
--- Definition current Fri Jun 17 21:53:03 2016
+-- Definition current Sat Jun 18 04:40:40 2016
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -712,7 +712,7 @@ T116T4
>>invoke t116t2;
-- Definition of Trafodion table TRAFODION.T116SCH1.T116T2
--- Definition current Fri Jun 17 21:54:26 2016
+-- Definition current Sat Jun 18 04:41:56 2016
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -737,7 +737,7 @@ T116T4
>>invoke t116t2;
-- Definition of Trafodion table TRAFODION.T116SCH1.T116T2
--- Definition current Fri Jun 17 21:54:32 2016
+-- Definition current Sat Jun 18 04:41:59 2016
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -771,22 +771,22 @@ T116T4
>>-- index creation checking
>>-- index creation is done with multiple transactions
>>-- to avoid populating the index within the transaction
->>drop table if exists t116t4;
+>>drop table if exists t116t5;
--- SQL operation complete.
->>create table t116t4 (c1 int not null primary key, c2 int, c3 int) ;
+>>create table t116t5 (c1 int not null primary key, c2 int, c3 int) ;
--- SQL operation complete.
->>insert into t116t4 values (1,1,1), (2,2,2), (3,3,2);
+>>insert into t116t5 values (1,1,1), (2,2,2), (3,3,2);
--- 3 row(s) inserted.
>>-- create index - Second attempt should fail
->>create index t116t4_i1 on t116t4(c2);
+>>create index t116t5_i1 on t116t5(c2);
--- SQL operation complete.
->>create index t116t4_i1 on t116t4(c2);
+>>create index t116t5_i1 on t116t5(c2);
-*** ERROR[1390] Object TRAFODION.T116SCH1.T116T4_I1 already exists in Trafodion.
+*** ERROR[1390] Object TRAFODION.T116SCH1.T116T5_I1 already exists in Trafodion.
--- SQL operation failed with errors.
>>set parserflags 1;
@@ -801,19 +801,21 @@ T116T4
--- 1 row(s) selected.
>>-- create unique index - Both attempts should fail with the same error
->>create unique index t116t4_i2 on t116t4(c3);
+>>create unique index t116t5_i2 on t116t5(c3);
*** ERROR[8110] Duplicate rows detected.
-*** ERROR[1053] Unique index TRAFODION.T116SCH1.T116T4_I2 could not be created because the specified column(s) contain duplicate data.
+*** ERROR[1053] Unique index TRAFODION.T116SCH1.T116T5_I2 could not be created because the specified column(s) contain duplicate data.
--- SQL operation failed with errors.
->>create unique index t116t4_i2 on t116t4(c3);
+>>create unique index t116t5_i2 on t116t5(c3);
*** ERROR[8110] Duplicate rows detected.
-*** ERROR[1053] Unique index TRAFODION.T116SCH1.T116T4_I2 could not be created because the specified column(s) contain duplicate data.
+*** ERROR[1053] Unique index TRAFODION.T116SCH1.T116T5_I2 could not be created because the specified column(s) contain duplicate data.
--- SQL operation failed with errors.
->>
+>>drop table t116t5 ;
+
+--- SQL operation complete.
>>log;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7bc7d618/core/sql/regress/core/TEST116
----------------------------------------------------------------------
diff --git a/core/sql/regress/core/TEST116 b/core/sql/regress/core/TEST116
index 55954da..91174bc 100755
--- a/core/sql/regress/core/TEST116
+++ b/core/sql/regress/core/TEST116
@@ -34,7 +34,7 @@ drop table t116t2;
drop table t116t3;
drop table t116t3;
drop table t116t4;
-
+drop table t116t5;
log LOG116 clear;
control query default DDL_TRANSACTIONS 'ON';
@@ -220,18 +220,18 @@ set transaction autocommit on;
-- index creation checking
-- index creation is done with multiple transactions
-- to avoid populating the index within the transaction
-drop table if exists t116t4;
-create table t116t4 (c1 int not null primary key, c2 int, c3 int) ;
-insert into t116t4 values (1,1,1), (2,2,2), (3,3,2);
+drop table if exists t116t5;
+create table t116t5 (c1 int not null primary key, c2 int, c3 int) ;
+insert into t116t5 values (1,1,1), (2,2,2), (3,3,2);
-- create index - Second attempt should fail
-create index t116t4_i1 on t116t4(c2);
-create index t116t4_i1 on t116t4(c2);
+create index t116t5_i1 on t116t5(c2);
+create index t116t5_i1 on t116t5(c2);
set parserflags 1;
select count(*) from table(index_table t116t4_i1);
-- create unique index - Both attempts should fail with the same error
-create unique index t116t4_i2 on t116t4(c3);
-create unique index t116t4_i2 on t116t4(c3);
-
+create unique index t116t5_i2 on t116t5(c3);
+create unique index t116t5_i2 on t116t5(c3);
+drop table t116t5 ;
log;
exit;