[TRAFODION-2853] memory leak of ComDiagsArea in CmpContext Fix for seabase/TEST002 inconsistent behavior due to changes in this PR
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/202d8da3 Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/202d8da3 Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/202d8da3 Branch: refs/heads/master Commit: 202d8da3527ebc4e6462fccde6c3353cafbfd5b5 Parents: 33b2be5 Author: selvaganesang <selva.govindara...@esgyn.com> Authored: Fri Mar 23 22:08:11 2018 +0000 Committer: selvaganesang <selva.govindara...@esgyn.com> Committed: Fri Mar 23 22:08:11 2018 +0000 ---------------------------------------------------------------------- core/sql/cli/Cli.cpp | 2 +- core/sql/executor/ex_ddl.cpp | 7 ------- core/sql/regress/compGeneral/EXPECTED013.SB | 12 ++++++------ core/sql/regress/privs2/EXPECTED129 | 8 ++++---- core/sql/regress/privs2/EXPECTED139 | 4 ++-- core/sql/regress/privs2/EXPECTED140 | 2 +- core/sql/regress/seabase/DIFF002.KNOWN | 3 --- core/sql/regress/seabase/EXPECTED020 | 4 ++-- core/sql/regress/seabase/EXPECTED026 | 2 +- core/sql/regress/seabase/EXPECTED031 | 8 ++++---- core/sql/regress/udr/DIFF101.KNOWN.SB | 3 +++ 11 files changed, 24 insertions(+), 31 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafodion/blob/202d8da3/core/sql/cli/Cli.cpp ---------------------------------------------------------------------- diff --git a/core/sql/cli/Cli.cpp b/core/sql/cli/Cli.cpp index d157eda..a6b5341 100644 --- a/core/sql/cli/Cli.cpp +++ b/core/sql/cli/Cli.cpp @@ -4623,7 +4623,7 @@ Lng32 SQLCLI_GetDiagnosticsStmtInfo2( // Only rowsAffected supported for now, if statement_id is passed in. if ((!stmt) || - (what_to_get != SQLDIAG_ROW_COUNT)) + ((what_to_get != SQLDIAG_NUMBER) && (what_to_get != SQLDIAG_ROW_COUNT))) { return -CLI_STMT_NOT_EXISTS; } http://git-wip-us.apache.org/repos/asf/trafodion/blob/202d8da3/core/sql/executor/ex_ddl.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ex_ddl.cpp b/core/sql/executor/ex_ddl.cpp index 8471e04..f221abd 100644 --- a/core/sql/executor/ex_ddl.cpp +++ b/core/sql/executor/ex_ddl.cpp @@ -378,13 +378,6 @@ short ExDDLTcb::work() diagsArea->mergeAfter (*cpDiagsArea); up_entry->setDiagsArea(diagsArea); - // For now, copy the warnings to currContext diaga area - // because ex_root_tcb::execute returns 0 for warnings - if (cpDiagsArea->getNumber(DgSqlCode::WARNING_) > 0) - { - diagsArea = currContext->getDiagsArea(); - diagsArea->mergeAfter (*cpDiagsArea); - } cpDiagsArea->decrRefCount(); } http://git-wip-us.apache.org/repos/asf/trafodion/blob/202d8da3/core/sql/regress/compGeneral/EXPECTED013.SB ---------------------------------------------------------------------- diff --git a/core/sql/regress/compGeneral/EXPECTED013.SB b/core/sql/regress/compGeneral/EXPECTED013.SB index 13dd0ce..7592226 100644 --- a/core/sql/regress/compGeneral/EXPECTED013.SB +++ b/core/sql/regress/compGeneral/EXPECTED013.SB @@ -53,7 +53,7 @@ SCAN *** WARNING[1313] The referential integrity constraint TRAFODION.SCH.CONS11 has been created with the NOT ENFORCED attribute and will not be enforced during INSERT, UPDATE, OR DELETE statements. ---- SQL operation completed with warnings. +--- SQL operation complete. >>create table orders1 (o_orderkey int not null, o_custkey int, foreign >>key(o_custkey) references customer(c_custkey) enforced, primary >>key(o_orderkey)) no partitions; --- SQL operation complete. @@ -328,28 +328,28 @@ SCAN *** WARNING[1313] The referential integrity constraint TRAFODION.SCH.CONS2 has been created with the NOT ENFORCED attribute and will not be enforced during INSERT, UPDATE, OR DELETE statements. ---- SQL operation completed with warnings. +--- SQL operation complete. >>create table fk1 ( a int not null primary key, b int, c int, constraint >>cons3 foreign key (b) references uk1(a) not enforced) ; *** WARNING[1313] The referential integrity constraint TRAFODION.SCH.CONS3 has been created with the NOT ENFORCED attribute and will not be enforced during INSERT, UPDATE, OR DELETE statements. ---- SQL operation completed with warnings. +--- SQL operation complete. >>create table fk2 ( a int not null primary key, b int, c int, constraint >>cons4 foreign key (a,b) references uk2(a,b) not enforced) ; *** WARNING[1313] The referential integrity constraint TRAFODION.SCH.CONS4 has been created with the NOT ENFORCED attribute and will not be enforced during INSERT, UPDATE, OR DELETE statements. ---- SQL operation completed with warnings. +--- SQL operation complete. >>create table fk3 ( a int not null primary key, b int, c int, constraint >>cons5 foreign key (a,b,c) references uk3(a,b,c) not enforced) ; *** WARNING[1313] The referential integrity constraint TRAFODION.SCH.CONS5 has been created with the NOT ENFORCED attribute and will not be enforced during INSERT, UPDATE, OR DELETE statements. ---- SQL operation completed with warnings. +--- SQL operation complete. >> >>create table ffk0 ( a int not null primary key, b int, c int, constraint >>cons6 foreign key (b) references fk0(a) not enforced) ; *** WARNING[1313] The referential integrity constraint TRAFODION.SCH.CONS6 has been created with the NOT ENFORCED attribute and will not be enforced during INSERT, UPDATE, OR DELETE statements. ---- SQL operation completed with warnings. +--- SQL operation complete. >> >>-- tables for sol: 10-100722-1962 test >>create table t_013 ( a int not null, http://git-wip-us.apache.org/repos/asf/trafodion/blob/202d8da3/core/sql/regress/privs2/EXPECTED129 ---------------------------------------------------------------------- diff --git a/core/sql/regress/privs2/EXPECTED129 b/core/sql/regress/privs2/EXPECTED129 index 5dc8a05..5cc90c4 100644 --- a/core/sql/regress/privs2/EXPECTED129 +++ b/core/sql/regress/privs2/EXPECTED129 @@ -823,7 +823,7 @@ CREATE TABLE TRAFODION.US4.T4 *** WARNING[1018] Grant of role or privilege SELECT WITH GRANT OPTION (columm number 2) on TRAFODION.US4.T3 from SQL_USER4 to SQL_USER3 not found, revoke request ignored. ---- SQL operation completed with warnings. +--- SQL operation complete. >>revoke select (b) on t3 from sql_user3; --- SQL operation complete. @@ -832,7 +832,7 @@ CREATE TABLE TRAFODION.US4.T4 *** WARNING[1018] Grant of role or privilege SELECT WITH GRANT OPTION (columm number 2) on TRAFODION.US4.T3 from SQL_USER4 to SQL_USER3 not found, revoke request ignored. ---- SQL operation completed with warnings. +--- SQL operation complete. >> >>revoke grant option for select (d) on t3 from sql_user3; @@ -842,12 +842,12 @@ CREATE TABLE TRAFODION.US4.T4 *** WARNING[1018] Grant of role or privilege SELECT WITH GRANT OPTION (columm number 1) on TRAFODION.US4.T3 from SQL_USER4 to SQL_USER3 not found, revoke request ignored. ---- SQL operation completed with warnings. +--- SQL operation complete. >>revoke grant option for select (b) on t3 from sql_user3 cascade; *** WARNING[1018] Grant of role or privilege SELECT WITH GRANT OPTION (columm number 1) on TRAFODION.US4.T3 from SQL_USER4 to SQL_USER3 not found, revoke request ignored. ---- SQL operation completed with warnings. +--- SQL operation complete. >>showddl t3; CREATE TABLE TRAFODION.US4.T3 http://git-wip-us.apache.org/repos/asf/trafodion/blob/202d8da3/core/sql/regress/privs2/EXPECTED139 ---------------------------------------------------------------------- diff --git a/core/sql/regress/privs2/EXPECTED139 b/core/sql/regress/privs2/EXPECTED139 index 1c11104..b791810 100644 --- a/core/sql/regress/privs2/EXPECTED139 +++ b/core/sql/regress/privs2/EXPECTED139 @@ -531,7 +531,7 @@ ALTER TABLE TRAFODION.T139SCH.GAMES ADD CONSTRAINT *** WARNING[1018] Grant of role or privilege ALL_DML from DB__ROOT to SQL_USER2 not found, revoke request ignored. ---- SQL operation completed with warnings. +--- SQL operation complete. >>showddl games; CREATE TABLE TRAFODION.T139SCH.GAMES @@ -561,7 +561,7 @@ ALTER TABLE TRAFODION.T139SCH.GAMES ADD CONSTRAINT *** WARNING[1018] Grant of role or privilege ALL_DML from DB__ROOT to SQL_USER3 not found, revoke request ignored. ---- SQL operation completed with warnings. +--- SQL operation complete. >>showddl teams; CREATE TABLE TRAFODION.T139SCH.TEAMS http://git-wip-us.apache.org/repos/asf/trafodion/blob/202d8da3/core/sql/regress/privs2/EXPECTED140 ---------------------------------------------------------------------- diff --git a/core/sql/regress/privs2/EXPECTED140 b/core/sql/regress/privs2/EXPECTED140 index b49bd55..62e0b5b 100644 --- a/core/sql/regress/privs2/EXPECTED140 +++ b/core/sql/regress/privs2/EXPECTED140 @@ -618,7 +618,7 @@ Tom White Socks *** WARNING[1013] Not all privileges were granted. You lack grant option for the INSERT privilege. ---- SQL operation completed with warnings. +--- SQL operation complete. >> >>-- user3 can propagate insert on table players >>grant insert on players to sql_user4; http://git-wip-us.apache.org/repos/asf/trafodion/blob/202d8da3/core/sql/regress/seabase/DIFF002.KNOWN ---------------------------------------------------------------------- diff --git a/core/sql/regress/seabase/DIFF002.KNOWN b/core/sql/regress/seabase/DIFF002.KNOWN deleted file mode 100644 index b323eb2..0000000 --- a/core/sql/regress/seabase/DIFF002.KNOWN +++ /dev/null @@ -1,3 +0,0 @@ -1264,1265d1263 -< *** WARNING[8742] GetMetaDataInfo operation could not be completed. Reason: Datatype array<string> for column 'a' in table hive.hive.thivearr is not supported. This table will be ignored. -< http://git-wip-us.apache.org/repos/asf/trafodion/blob/202d8da3/core/sql/regress/seabase/EXPECTED020 ---------------------------------------------------------------------- diff --git a/core/sql/regress/seabase/EXPECTED020 b/core/sql/regress/seabase/EXPECTED020 index 18dd7a7..15771ce 100644 --- a/core/sql/regress/seabase/EXPECTED020 +++ b/core/sql/regress/seabase/EXPECTED020 @@ -3125,7 +3125,7 @@ VCH15 NINT CH3 NLARGE *** WARNING[1313] The referential integrity constraint TRAFODION.SCH.T34_1 has been created with the NOT ENFORCED attribute and will not be enforced during INSERT, UPDATE, OR DELETE statements. ---- SQL operation completed with warnings. +--- SQL operation complete. >>showddl test020_t34; CREATE TABLE TRAFODION.SCH.TEST020_T34 @@ -3165,7 +3165,7 @@ ALTER TABLE TRAFODION.SCH.TEST020_T34 ADD CONSTRAINT TRAFODION.SCH.T34_1 *** WARNING[1313] The referential integrity constraint TRAFODION.SCH.T34_1 has been created with the NOT ENFORCED attribute and will not be enforced during INSERT, UPDATE, OR DELETE statements. ---- SQL operation completed with warnings. +--- SQL operation complete. >>showddl test020_t34; CREATE TABLE TRAFODION.SCH.TEST020_T34 http://git-wip-us.apache.org/repos/asf/trafodion/blob/202d8da3/core/sql/regress/seabase/EXPECTED026 ---------------------------------------------------------------------- diff --git a/core/sql/regress/seabase/EXPECTED026 b/core/sql/regress/seabase/EXPECTED026 index 05be357..fb16c30 100644 --- a/core/sql/regress/seabase/EXPECTED026 +++ b/core/sql/regress/seabase/EXPECTED026 @@ -269,7 +269,7 @@ *** WARNING[4255] Provided schema name does not exist in metadata. Cleanup will be performed on objects in this schema, if they exist. ---- SQL operation completed with warnings. +--- SQL operation complete. >>create schema sch026; --- SQL operation complete. http://git-wip-us.apache.org/repos/asf/trafodion/blob/202d8da3/core/sql/regress/seabase/EXPECTED031 ---------------------------------------------------------------------- diff --git a/core/sql/regress/seabase/EXPECTED031 b/core/sql/regress/seabase/EXPECTED031 index 41c44e9..2d3a9d4 100644 --- a/core/sql/regress/seabase/EXPECTED031 +++ b/core/sql/regress/seabase/EXPECTED031 @@ -771,7 +771,7 @@ A B C *** WARNING[4493] Stored Descriptor Status: Uptodate and current. ---- SQL operation completed with warnings. +--- SQL operation complete. >> >>alter table t031t1 delete stored descriptor; @@ -800,7 +800,7 @@ A B C *** WARNING[4493] Stored Descriptor Status: Uptodate and current. ---- SQL operation completed with warnings. +--- SQL operation complete. >>invoke t031t1; -- Definition of Trafodion table TRAFODION.SCH.T031T1 @@ -891,7 +891,7 @@ CREATE INDEX T031T1I1 ON TRAFODION.SCH.T031T1 *** WARNING[4493] Stored Descriptor Status: Uptodate and current. ---- SQL operation completed with warnings. +--- SQL operation complete. >>alter table t031t1 delete stored descriptor; --- SQL operation complete. @@ -923,7 +923,7 @@ CREATE INDEX T031T1I1 ON TRAFODION.SCH.T031T1 *** WARNING[4493] Stored Descriptor Status: Uptodate and current. ---- SQL operation completed with warnings. +--- SQL operation complete. >>showddl t031t1; CREATE TABLE TRAFODION.SCH.T031T1 http://git-wip-us.apache.org/repos/asf/trafodion/blob/202d8da3/core/sql/regress/udr/DIFF101.KNOWN.SB ---------------------------------------------------------------------- diff --git a/core/sql/regress/udr/DIFF101.KNOWN.SB b/core/sql/regress/udr/DIFF101.KNOWN.SB new file mode 100644 index 0000000..be1fce4 --- /dev/null +++ b/core/sql/regress/udr/DIFF101.KNOWN.SB @@ -0,0 +1,3 @@ +163a164,165 +> *** WARNING[3250] The specified blocksize is not valid. Blocksize of 32768 is used instead. +>