Fixes from review comments. ANd fix for a regression introduced by a previous checkin that caused a problem in executor/TEST130 during drop schema. Fixed the test regression and moved the drop table and schema output into the test log.
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/611b12c9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/611b12c9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/611b12c9 Branch: refs/heads/master Commit: 611b12c9a1520360b500871e4c33508816271c28 Parents: fcab657 Author: Sandhya Sundaresan <[email protected]> Authored: Wed Apr 20 17:45:33 2016 +0000 Committer: Sandhya Sundaresan <[email protected]> Committed: Wed Apr 20 17:45:33 2016 +0000 ---------------------------------------------------------------------- core/sql/executor/ExExeUtilGet.cpp | 20 +++--- core/sql/regress/executor/EXPECTED130 | 98 ++++++++++++++++++++------- core/sql/regress/executor/FILTER130 | 3 + core/sql/regress/executor/TEST130 | 19 ++++++ core/sql/sqlcomp/CmpSeabaseDDLschema.cpp | 16 ++--- 5 files changed, 112 insertions(+), 44 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/611b12c9/core/sql/executor/ExExeUtilGet.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ExExeUtilGet.cpp b/core/sql/executor/ExExeUtilGet.cpp index 94c09bf..f563e97 100644 --- a/core/sql/executor/ExExeUtilGet.cpp +++ b/core/sql/executor/ExExeUtilGet.cpp @@ -6183,7 +6183,7 @@ short ExExeUtilLobInfoTcb::collectAndReturnLobInfo(char * tableName,Int32 currLo char lobDataFilePath[LOBINFO_MAX_FILE_LEN]={'\0'}; Int64 lobEOD=0; - char buf[1000]; + char buf[LOBINFO_MAX_FILE_LEN+500]; short rc = 0; if (isUpQueueFull(5)) { @@ -6197,7 +6197,7 @@ short ExExeUtilLobInfoTcb::collectAndReturnLobInfo(char * tableName,Int32 currLo { return -1; } - str_pad(buf,1000,' '); + str_pad(buf,sizeof(buf),' '); //column name offset = (currLobNum-1)*LOBINFO_MAX_FILE_LEN; strcpy(columnName, &((getLItdb().getLobColList())[offset])); @@ -6214,11 +6214,11 @@ short ExExeUtilLobInfoTcb::collectAndReturnLobInfo(char * tableName,Int32 currLo return rc; // lobDataFile - char tgtLobNameBuf[256]; + char tgtLobNameBuf[LOBINFO_MAX_FILE_LEN]; char *lobDataFile = ExpLOBoper::ExpGetLOBname (getLItdb().objectUID_, currLobNum, - tgtLobNameBuf, 256); + tgtLobNameBuf, LOBINFO_MAX_FILE_LEN); removeTrailingBlanks(lobDataFile, LOBINFO_MAX_FILE_LEN); str_sprintf(buf, " LOB Data File: %s", lobDataFile); @@ -6249,12 +6249,12 @@ short ExExeUtilLobInfoTcb::collectAndReturnLobInfo(char * tableName,Int32 currLo // Sum of all the lobDescChunks for used space - char lobDescChunkFileBuf[512]; + char lobDescChunkFileBuf[LOBINFO_MAX_FILE_LEN*2]; //Get the descriptor chunks table name char *lobDescChunksFile = ExpLOBoper::ExpGetLOBDescChunksName(strlen(schName),schName, getLItdb().objectUID_, currLobNum, - lobDescChunkFileBuf, 512); + lobDescChunkFileBuf, LOBINFO_MAX_FILE_LEN*2); char *query = new(getGlobals()->getDefaultHeap()) char[4096]; str_sprintf (query, "select sum(chunklen) from %s ", lobDescChunksFile); @@ -6502,11 +6502,11 @@ short ExExeUtilLobInfoTableTcb::collectLobInfo(char * tableName,Int32 currLobNum str_cpy_all(lobInfo_->lobLocation, lobLocation, strlen(lobLocation)); // lobDataFile - char tgtLobNameBuf[256]; + char tgtLobNameBuf[LOBINFO_MAX_FILE_LEN]; char *lobDataFile = ExpLOBoper::ExpGetLOBname (getLItdb().objectUID_, currLobNum, - tgtLobNameBuf, 256); + tgtLobNameBuf, LOBINFO_MAX_FILE_LEN); str_cpy_all(lobInfo_->lobDataFile, lobDataFile,strlen(lobDataFile)); //EOD of LOB data file hdfsFS fs = hdfsConnect(getLItdb().getHdfsServer(),getLItdb().getHdfsPort()); @@ -6527,12 +6527,12 @@ short ExExeUtilLobInfoTableTcb::collectLobInfo(char * tableName,Int32 currLobNum lobInfo_->lobDataFileSizeEod=lobEOD; // Sum of all the lobDescChunks for used space - char lobDescChunkFileBuf[52]; + char lobDescChunkFileBuf[LOBINFO_MAX_FILE_LEN*2]; //Get the descriptor chunks table name char *lobDescChunksFile = ExpLOBoper::ExpGetLOBDescChunksName(strlen(schName),schName, getLItdb().objectUID_, currLobNum, - lobDescChunkFileBuf, 512); + lobDescChunkFileBuf, LOBINFO_MAX_FILE_LEN*2); char query[4096]; str_sprintf (query, "select sum(chunklen) from %s ", lobDescChunksFile); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/611b12c9/core/sql/regress/executor/EXPECTED130 ---------------------------------------------------------------------- diff --git a/core/sql/regress/executor/EXPECTED130 b/core/sql/regress/executor/EXPECTED130 index 30aa4f3..635bf3f 100644 --- a/core/sql/regress/executor/EXPECTED130 +++ b/core/sql/regress/executor/EXPECTED130 @@ -1,7 +1,9 @@ >>obey TEST130(setup); >>create schema trafodion.lob130; ---- SQL operation complete. +*** ERROR[1022] Schema TRAFODION.LOB130 already exists. + +--- SQL operation failed with errors. >>set schema trafodion.lob130; --- SQL operation complete. @@ -53,9 +55,9 @@ C1 C1 C2 ----------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ---------------------------------------- - 1 LOBH00000200010444402145197519166819444402145202457707718212326652155751339020"TRAFODION"."LOB130" - 2 LOBH00000200010444402145197519166819444402145203073038718212326652161912736020"TRAFODION"."LOB130" - 3 LOBH00000200010444402145197519166819444402145203621256818212326652167409965020"TRAFODION"."LOB130" + 1 LOBH00000200010160506607748957717919160506607754184039318212327892776672766020"TRAFODION"."LOB130" + 2 LOBH00000200010160506607748957717919160506607754838939218212327892783226774020"TRAFODION"."LOB130" + 3 LOBH00000200010160506607748957717919160506607755439166918212327892789099037020"TRAFODION"."LOB130" --- 3 row(s) selected. >> @@ -333,7 +335,7 @@ And the dish ran away with the fork ! >>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , >>'tlob130_txt1.txt');/g" >> t130_extract_command; >> >>obey t130_extract_command; ->>extract lobtofile(LOB 'LOBH00000200010444402145197522607519444402145235286469818212326652484124570020"TRAFODION"."LOB130" ' , 'tlob130_txt1.txt'); +>>extract lobtofile(LOB 'LOBH00000200010160506607748961807619160506607793556765718212327893170320466020"TRAFODION"."LOB130" ' , 'tlob130_txt1.txt'); Success. Targetfile :tlob130_txt1.txt Length : 19 --- SQL operation complete. @@ -349,7 +351,7 @@ Success. Targetfile :tlob130_txt1.txt Length : 19 >>sh rm t130_extract_command; >>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , >>'tlob130_deep.jpg');/g" >> t130_extract_command; >>obey t130_extract_command; ->>extract lobtofile(LOB 'LOBH00000200010444402145197522655619444402145240700183218212326652538314587020"TRAFODION"."LOB130" ' , 'tlob130_deep.jpg'); +>>extract lobtofile(LOB 'LOBH00000200010160506607748961871319160506607799384142018212327893228622566020"TRAFODION"."LOB130" ' , 'tlob130_deep.jpg'); Success. Targetfile :tlob130_deep.jpg Length : 159018 --- SQL operation complete. @@ -365,7 +367,7 @@ Success. Targetfile :tlob130_deep.jpg Length : 159018 >>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , >>'tlob130_anoush.jpg');/g" >> t130_extract_command; >> >>obey t130_extract_command; ->>extract lobtofile(LOB 'LOBH00000200010444402145197522655619444402145240700183218212326652538314587020"TRAFODION"."LOB130" ' , 'tlob130_anoush.jpg'); +>>extract lobtofile(LOB 'LOBH00000200010160506607748961871319160506607799384142018212327893228622566020"TRAFODION"."LOB130" ' , 'tlob130_anoush.jpg'); Success. Targetfile :tlob130_anoush.jpg Length : 230150 --- SQL operation complete. @@ -484,7 +486,7 @@ And the dish ran away with the fork ! >>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , >>'hdfs:\/\/\/lobs\/tlob130_txt2.txt');/g" >> t130_extract_command; >> >>obey t130_extract_command; ->>extract lobtofile(LOB 'LOBH00000200010444402145197523568819444402145246831407218212326652599562054020"TRAFODION"."LOB130" ' , 'hdfs:///lobs/tlob130_txt2.txt'); +>>extract lobtofile(LOB 'LOBH00000200010160506607748963384219160506607810848333618212327893343345213020"TRAFODION"."LOB130" ' , 'hdfs:///lobs/tlob130_txt2.txt'); Success. Targetfile :hdfs:///lobs/tlob130_txt2.txt Length : 19 --- SQL operation complete. @@ -500,7 +502,7 @@ Success. Targetfile :hdfs:///lobs/tlob130_txt2.txt Length : 19 >>sh rm t130_extract_command; >>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , >>'hdfs:\/\/\/lobs\/tlob130_deep.jpg');/g" >> t130_extract_command; >>obey t130_extract_command; ->>extract lobtofile(LOB 'LOBH00000200010444402145197523627219444402145252365230918212326652654921590020"TRAFODION"."LOB130" ' , 'hdfs:///lobs/tlob130_deep.jpg'); +>>extract lobtofile(LOB 'LOBH00000200010160506607748963441819160506607816983409518212327893404603891020"TRAFODION"."LOB130" ' , 'hdfs:///lobs/tlob130_deep.jpg'); Success. Targetfile :hdfs:///lobs/tlob130_deep.jpg Length : 159018 --- SQL operation complete. @@ -516,7 +518,7 @@ Success. Targetfile :hdfs:///lobs/tlob130_deep.jpg Length : 159018 >>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , >>'hdfs:\/\/\/lobs\/tlob130_anoush.jpg');/g" >> t130_extract_command; >> >>obey t130_extract_command; ->>extract lobtofile(LOB 'LOBH00000200010444402145197522655619444402145240700183218212326652538314587020"TRAFODION"."LOB130" ' , 'hdfs:///lobs/tlob130_anoush.jpg'); +>>extract lobtofile(LOB 'LOBH00000200010160506607748961871319160506607799384142018212327893228622566020"TRAFODION"."LOB130" ' , 'hdfs:///lobs/tlob130_anoush.jpg'); Success. Targetfile :hdfs:///lobs/tlob130_anoush.jpg Length : 230150 --- SQL operation complete. @@ -535,7 +537,7 @@ Column Name : c2 Input a filename to extract to : Output File Name : lobc2out.jpg Extracting lob handle for column c2... -LOB handle for c2: LOBH00000200010444402145197522655619444402145240700183218212326652538314587020"TRAFODION"."LOB130" +LOB handle for c2: LOBH00000200010160506607748961871319160506607799384142018212327893228622566020"TRAFODION"."LOB130" Extracting LOB data length for the above handle... LOB data length :230150 Extracting lob data into file in chunks of 1000 ... @@ -813,7 +815,7 @@ And the dish ran away with the spoon. >>sh rm t130_extract_command; >>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , >>'tlob130_deep2.jpg');/g" >> t130_extract_command; >>obey t130_extract_command; ->>extract lobtofile(LOB 'LOBH00000200020444402145197525338319444402145262596729118212326652757023101020"TRAFODION"."LOB130" ' , 'tlob130_deep2.jpg'); +>>extract lobtofile(LOB 'LOBH00000200020160506607748966408219160506607839495747018212327893629846746020"TRAFODION"."LOB130" ' , 'tlob130_deep2.jpg'); Success. Targetfile :tlob130_deep2.jpg Length : 159018 --- SQL operation complete. @@ -822,7 +824,7 @@ Success. Targetfile :tlob130_deep2.jpg Length : 159018 >>sh rm t130_extract_command; >>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , >>'hdfs:\/\/\/lobs\/tlob130_anoush2.jpg');/g" >> t130_extract_command; >>obey t130_extract_command; ->>extract lobtofile(LOB 'LOBH00000200030444402145197525338319444402145263067935718212326652761934499020"TRAFODION"."LOB130" ' , 'hdfs:///lobs/tlob130_anoush2.jpg'); +>>extract lobtofile(LOB 'LOBH00000200030160506607748966408219160506607840033733218212327893635194706020"TRAFODION"."LOB130" ' , 'hdfs:///lobs/tlob130_anoush2.jpg'); Success. Targetfile :hdfs:///lobs/tlob130_anoush2.jpg Length : 230150 --- SQL operation complete. @@ -849,7 +851,7 @@ Hey diddle diddle, >>sh rm t130_extract_command; >>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , >>'tlob130_anoush3.jpg',create,truncate);/g" >> t130_extract_command; >>obey t130_extract_command; ->>extract lobtofile(LOB 'LOBH00000200030444402145197525709919444402145266700537718212326652798213124020"TRAFODION"."LOB130" ' , 'tlob130_anoush3.jpg',create,truncate); +>>extract lobtofile(LOB 'LOBH00000200030160506607748966808919160506607844025980618212327893675073401020"TRAFODION"."LOB130" ' , 'tlob130_anoush3.jpg',create,truncate); Success. Targetfile :tlob130_anoush3.jpg Length : 230150 --- SQL operation complete. @@ -956,17 +958,17 @@ Lob Information for table: "TRAFODION".LOB130.TLOB130GT ColumnName : C2 Lob Location : /lobs - LOB Data File: LOBP_04444021451975282701_0001 + LOB Data File: LOBP_01605066077489701952_0001 LOB EOD : 15 LOB Used Len : 15 ColumnName : C3 Lob Location : /lobs - LOB Data File: LOBP_04444021451975282701_0002 + LOB Data File: LOBP_01605066077489701952_0002 LOB EOD : 15 LOB Used Len : 15 ColumnName : C4 Lob Location : /lobs - LOB Data File: LOBP_04444021451975282701_0003 + LOB Data File: LOBP_01605066077489701952_0003 LOB EOD : 45 LOB Used Len : 45 @@ -976,9 +978,9 @@ Lob Information for table: "TRAFODION".LOB130.TLOB130GT CATALOG_NAME SCHEMA_NAME OBJECT_NAME COLUMN_NAME LOB_LOCATION LOB_DATA_FILE LOB_DATA_FILE_SIZE_EOD LOB_DATA_FILE_SIZE_USED ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- ----------------------- -TRAFODION LOB130 TLOB130GT C2 /lobs LOBP_04444021451975282701_0001 15 15 -TRAFODION LOB130 TLOB130GT C3 /lobs LOBP_04444021451975282701_0002 15 15 -TRAFODION LOB130 TLOB130GT C4 /lobs LOBP_04444021451975282701_0003 45 45 +TRAFODION LOB130 TLOB130GT C2 /lobs LOBP_01605066077489701952_0001 15 15 +TRAFODION LOB130 TLOB130GT C3 /lobs LOBP_01605066077489701952_0002 15 15 +TRAFODION LOB130 TLOB130GT C4 /lobs LOBP_01605066077489701952_0003 45 45 --- 3 row(s) selected. >>delete from tlob130gt where c1=2; @@ -995,17 +997,17 @@ Lob Information for table: "TRAFODION".LOB130.TLOB130GT ColumnName : C2 Lob Location : /lobs - LOB Data File: LOBP_04444021451975282701_0001 + LOB Data File: LOBP_01605066077489701952_0001 LOB EOD : 30 LOB Used Len : 25 ColumnName : C3 Lob Location : /lobs - LOB Data File: LOBP_04444021451975282701_0002 + LOB Data File: LOBP_01605066077489701952_0002 LOB EOD : 31 LOB Used Len : 26 ColumnName : C4 Lob Location : /lobs - LOB Data File: LOBP_04444021451975282701_0003 + LOB Data File: LOBP_01605066077489701952_0003 LOB EOD : 71 LOB Used Len : 56 @@ -1015,11 +1017,55 @@ Lob Information for table: "TRAFODION".LOB130.TLOB130GT CATALOG_NAME SCHEMA_NAME OBJECT_NAME COLUMN_NAME LOB_LOCATION LOB_DATA_FILE LOB_DATA_FILE_SIZE_EOD LOB_DATA_FILE_SIZE_USED ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- ----------------------- -TRAFODION LOB130 TLOB130GT C2 /lobs LOBP_04444021451975282701_0001 30 25 -TRAFODION LOB130 TLOB130GT C3 /lobs LOBP_04444021451975282701_0002 31 26 -TRAFODION LOB130 TLOB130GT C4 /lobs LOBP_04444021451975282701_0003 71 56 +TRAFODION LOB130 TLOB130GT C2 /lobs LOBP_01605066077489701952_0001 30 25 +TRAFODION LOB130 TLOB130GT C3 /lobs LOBP_01605066077489701952_0002 31 26 +TRAFODION LOB130 TLOB130GT C4 /lobs LOBP_01605066077489701952_0003 71 56 --- 3 row(s) selected. >> +>>-- test to snsure all lob delpendent tables and schemas containing lob tables +>>-- get dropped cleanly. +>>obey TEST130(lob_drop_table_schema); +>>log; +>>create schema trafodion.lobsch; + +--- SQL operation complete. +>>set schema trafodion.lobsch; + +--- SQL operation complete. +>>create table tlob130ts1 (c1 int not null, c2 blob, primary key (c1)); + +--- SQL operation complete. +>>create table tlob130ts2 (c1 int not null, c2 blob, primary key (c1)); + +--- SQL operation complete. +>>drop table tlob130ts1; + +--- SQL operation complete. +>>get tables; + +Tables in Schema TRAFODION.LOBSCH +================================= + +LOBDescChunks__01605066077489712291_0001 +LOBDescHandle__01605066077489712291_0001 +LOBMD__01605066077489712291 +SB_HISTOGRAMS +SB_HISTOGRAM_INTERVALS +TLOB130TS2 + +--- SQL operation complete. +>>drop schema trafodion.lobsch cascade; + +--- SQL operation complete. +>>select OBJECT_NAME,OBJECT_TYPE from TRAFODION."_MD_".OBJECTS where catalog_name='TRAFODION' AND schema_name='LOBSCH'; + +--- 0 row(s) selected. +>>--go back to the schema used for the rest of the tests. +>>set schema trafodion.lob130; + +--- SQL operation complete. +>> +>> >>obey TEST130(lob_general_cleanup); >>log; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/611b12c9/core/sql/regress/executor/FILTER130 ---------------------------------------------------------------------- diff --git a/core/sql/regress/executor/FILTER130 b/core/sql/regress/executor/FILTER130 index c19e884..ec0ab5c 100755 --- a/core/sql/regress/executor/FILTER130 +++ b/core/sql/regress/executor/FILTER130 @@ -28,4 +28,7 @@ fi sed " s/LOBH[0-9]*/@LOBHANDLE@/ s/LOBP_[0-9]*/@LOBP@/ +s/LOBDescChunks__[0-9]*/@LOBDescChunks@ +s/LOBDescHandle__[0-9]*/@LOBDescHandle@ +s/LOBMD__[0-9]*/@LOBMD@ " $fil http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/611b12c9/core/sql/regress/executor/TEST130 ---------------------------------------------------------------------- diff --git a/core/sql/regress/executor/TEST130 b/core/sql/regress/executor/TEST130 index ec98b6f..96b75b7 100755 --- a/core/sql/regress/executor/TEST130 +++ b/core/sql/regress/executor/TEST130 @@ -453,6 +453,25 @@ insert into tlob130gt values (2, stringtolob('xxxxxxxxxxxxxxx'), stringtolob('yy get lob stats for table tlob130gt; select * from table(lob stats(tlob130gt)); +-- test to snsure all lob delpendent tables and schemas containing lob tables +-- get dropped cleanly. +obey TEST130(lob_drop_table_schema); +?section lob_drop_table_schema +log; +cleanup schema trafodion.lobsch; +log LOG130; +create schema trafodion.lobsch; +set schema trafodion.lobsch; +create table tlob130ts1 (c1 int not null, c2 blob, primary key (c1)); +create table tlob130ts2 (c1 int not null, c2 blob, primary key (c1)); +drop table tlob130ts1; +get tables; +drop schema trafodion.lobsch cascade; +select OBJECT_NAME,OBJECT_TYPE from TRAFODION."_MD_".OBJECTS where catalog_name='TRAFODION' AND schema_name='LOBSCH'; +--go back to the schema used for the rest of the tests. +set schema trafodion.lob130; + + obey TEST130(lob_general_cleanup); -- cleanup ?section lob_general_cleanup http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/611b12c9/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp b/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp index 88832f2..d37306b 100644 --- a/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp +++ b/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp @@ -61,7 +61,7 @@ static bool dropOneTable( const char * schemaName, const char * objectName, bool isVolatile, -// bool ifExists, + bool ifExists, bool ddlXns); static bool transferObjectPrivs( @@ -553,7 +553,7 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode) dirtiedMetadata = TRUE; if (dropOneTable(cliInterface,(char*)catName.data(), (char*)schName.data(),(char*)objName.data(), - isVolatile ,dropSchemaNode->ddlXns())) + isVolatile , FALSE,dropSchemaNode->ddlXns())) someObjectsCouldNotBeDropped = true; } } @@ -679,7 +679,7 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode) dirtiedMetadata = TRUE; if (dropOneTable(cliInterface,(char*)catName.data(), (char*)schName.data(),(char*)objName.data(), - isVolatile, dropSchemaNode->ddlXns())) + isVolatile, FALSE,dropSchemaNode->ddlXns())) someObjectsCouldNotBeDropped = true; } } @@ -709,7 +709,7 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode) // happen to have the same name patterns. if (dropOneTable(cliInterface,(char*)catName.data(), (char*)schName.data(),(char*)objName.data(), - isVolatile, dropSchemaNode->ddlXns())) + isVolatile,TRUE, dropSchemaNode->ddlXns())) someObjectsCouldNotBeDropped = true; } } @@ -806,7 +806,7 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode) dirtiedMetadata = TRUE; if (dropOneTable(cliInterface,(char*)catName.data(), (char*)schName.data(),(char*)objName.data(), - isVolatile, dropSchemaNode->ddlXns())) + isVolatile, FALSE, dropSchemaNode->ddlXns())) someObjectsCouldNotBeDropped = true; } } @@ -1314,7 +1314,7 @@ static bool dropOneTable( const char * schemaName, const char * objectName, bool isVolatile, -// bool ifExists, + bool ifExists, bool ddlXns) { @@ -1332,8 +1332,8 @@ Lng32 cliRC = 0; if (isVolatile) strcpy(volatileString,"VOLATILE"); -// if (ifExists) -// strcpy(ifExistsString,"IF EXISTS"); + if (ifExists) + strcpy(ifExistsString,"IF EXISTS"); if (ComIsTrafodionExternalSchemaName(schemaName)) str_sprintf(buf,"DROP EXTERNAL TABLE \"%s\" FOR \"%s\".\"%s\".\"%s\" CASCADE",
