Repository: incubator-trafodion Updated Branches: refs/heads/master 3fb2f9eb5 -> f5fc8dca4
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp b/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp index d83a9da..c456b01 100644 --- a/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp +++ b/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp @@ -2990,7 +2990,7 @@ void CmpSeabaseDDL::createSeabaseTable( Int64 *retObjUID) { NABoolean xnWasStartedHere = FALSE; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); ComObjectName tableName(createTableNode->getTableName()); @@ -3064,7 +3064,7 @@ void CmpSeabaseDDL::addConstraints( const NAString objectNamePart = tableName.getObjectNamePartAsAnsiString(TRUE); const NAString extTableName = tableName.getExternalName(TRUE); - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); char buf[5000]; @@ -3331,7 +3331,7 @@ void CmpSeabaseDDL::createSeabaseTableCompound( { Lng32 cliRC = 0; Lng32 retcode = 0; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); ComObjectName tableName(createTableNode->getTableName()); @@ -4500,7 +4500,7 @@ void CmpSeabaseDDL::dropSeabaseTable( NAString &currCatName, NAString &currSchName) { NABoolean xnWasStartedHere = FALSE; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); if (beginXnIfNotInProgress(&cliInterface, xnWasStartedHere)) @@ -4559,7 +4559,7 @@ void CmpSeabaseDDL::renameSeabaseTable( Lng32 idPos = 0; NAColumn *col = NULL; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); NAString tabName = renameTableNode->getTableName(); @@ -4866,8 +4866,8 @@ void CmpSeabaseDDL::alterSeabaseTableStoredDesc( const NAString extTableName = tableName.getExternalName(TRUE); const NAString extNameForHbase = catalogNamePart + "." + schemaNamePart + "." + objectNamePart; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, - CmpCommon::context()->sqlSession()->getParentQid()); + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, + CmpCommon::context()->sqlSession()->getParentQid()); ExpHbaseInterface * ehi = allocEHI(); if (ehi == NULL) @@ -5047,7 +5047,7 @@ void CmpSeabaseDDL::alterSeabaseTableHBaseOptions( Lng32 retcode = 0; Lng32 cliRC = 0; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); NAString tabName = hbaseOptionsNode->getTableName(); @@ -5190,7 +5190,7 @@ short CmpSeabaseDDL::createSeabaseTableLike2( // send any user CQDs down Lng32 retCode = sendAllControls(FALSE, FALSE, TRUE); - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Lng32 cliRC = 0; @@ -5344,7 +5344,7 @@ void CmpSeabaseDDL::alterSeabaseTableAddColumn( Lng32 cliRC = 0; Lng32 retcode = 0; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); NAString tabName = alterAddColNode->getTableName(); @@ -5949,7 +5949,7 @@ short CmpSeabaseDDL::alignedFormatTableDropColumn return -1; ExeCliInterface cliInterface - (STMTHEAP, NULL, NULL, + (STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Int64 tableUID = naTable->objectUid().castToInt64(); @@ -6152,7 +6152,7 @@ short CmpSeabaseDDL::hbaseFormatTableDropColumn( (catalogNamePart + "." + schemaNamePart + "." + objectNamePart)); ExeCliInterface cliInterface( - STMTHEAP, NULL, NULL, + STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Lng32 colNumber = nacol->getPosition(); @@ -6264,7 +6264,7 @@ void CmpSeabaseDDL::alterSeabaseTableDropColumn( Lng32 cliRC = 0; Lng32 retcode = 0; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); NAString tabName = alterDropColNode->getTableName(); @@ -6479,7 +6479,7 @@ void CmpSeabaseDDL::alterSeabaseTableAlterIdentityColumn( Lng32 cliRC = 0; Lng32 retcode = 0; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); NAString tabName = alterIdentityColNode->getTableName(); @@ -6830,7 +6830,7 @@ short CmpSeabaseDDL::alignedFormatTableAlterColumnAttr if (ehi == NULL) return -1; ExeCliInterface cliInterface - (STMTHEAP, NULL, NULL, + (STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Int64 tableUID = naTable->objectUid().castToInt64(); @@ -7010,7 +7010,7 @@ short CmpSeabaseDDL::mdOnlyAlterColumnAttr( Lng32 cliRC = 0; ExeCliInterface cliInterface - (STMTHEAP, NULL, NULL, + (STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Int64 objUID = naTable->objectUid().castToInt64(); @@ -7085,7 +7085,7 @@ short CmpSeabaseDDL::hbaseFormatTableAlterColumnAttr( StmtDDLAlterTableAlterColumnDatatype * alterColNode) { ExeCliInterface cliInterface - (STMTHEAP, NULL, NULL, + (STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); CorrName cn(objectNamePart, STMTHEAP, schemaNamePart,catalogNamePart); @@ -7248,7 +7248,7 @@ void CmpSeabaseDDL::alterSeabaseTableAlterColumnDatatype( Lng32 cliRC = 0; Lng32 retcode = 0; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); NAString tabName = alterColNode->getTableName(); @@ -7537,7 +7537,7 @@ void CmpSeabaseDDL::alterSeabaseTableAlterColumnRename( const NAString extTableName = tableName.getExternalName(TRUE); const NAString extNameForHbase = catalogNamePart + "." + schemaNamePart + "." + objectNamePart; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); if ((isSeabaseReservedSchema(tableName)) && @@ -7846,7 +7846,7 @@ void CmpSeabaseDDL::alterSeabaseTableAddPKeyConstraint( Lng32 cliRC = 0; Lng32 retcode = 0; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); ExpHbaseInterface * ehi = allocEHI(); @@ -7935,7 +7935,7 @@ void CmpSeabaseDDL::alterSeabaseTableAddPKeyConstraint( char query[2000]; str_sprintf(query, "select [any 1] cast(1 as int not null) from \"%s\".\"%s\".\"%s\" for read committed access", catalogNamePart.data(), schemaNamePart.data(), objectNamePart.data()); - cliRC = cliInterface.executeImmediate(query, (char*)&rowCount, &len, NULL); + cliRC = cliInterface.executeImmediate(query, (char*)&rowCount, &len, FALSE); if (cliRC < 0) { cliInterface.retrieveSQLDiagnostics(CmpCommon::diags()); @@ -8095,7 +8095,7 @@ void CmpSeabaseDDL::alterSeabaseTableAddUniqueConstraint( Lng32 cliRC = 0; Lng32 retcode = 0; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); ExpHbaseInterface * ehi = allocEHI(); @@ -8298,7 +8298,7 @@ void CmpSeabaseDDL::alterSeabaseTableAddRIConstraint( return; } - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); ExpHbaseInterface * ehi = allocEHI(); @@ -8722,7 +8722,7 @@ void CmpSeabaseDDL::alterSeabaseTableAddRIConstraint( Lng32 len = 0; Int64 rowCount = 0; - cliRC = cliInterface.executeImmediate(validQry, (char*)&rowCount, &len, NULL); + cliRC = cliInterface.executeImmediate(validQry, (char*)&rowCount, &len, FALSE); if (cliRC < 0) { cliInterface.retrieveSQLDiagnostics(CmpCommon::diags()); @@ -9088,7 +9088,7 @@ void CmpSeabaseDDL::alterSeabaseTableAddCheckConstraint( Lng32 cliRC = 0; Lng32 retcode = 0; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); NAString tabName = alterAddConstraint->getTableName(); @@ -9170,7 +9170,7 @@ void CmpSeabaseDDL::alterSeabaseTableAddCheckConstraint( Lng32 len = 0; Int64 rowCount = 0; - cliRC = cliInterface.executeImmediate(validQry, (char*)&rowCount, &len, NULL); + cliRC = cliInterface.executeImmediate(validQry, (char*)&rowCount, &len, FALSE); if (cliRC < 0) { cliInterface.retrieveSQLDiagnostics(CmpCommon::diags()); @@ -9241,7 +9241,7 @@ void CmpSeabaseDDL::alterSeabaseTableDropConstraint( Lng32 cliRC = 0; Lng32 retcode = 0; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); NAString tabName = alterDropConstraint->getTableName(); @@ -9277,7 +9277,7 @@ void CmpSeabaseDDL::alterSeabaseTableDropConstraint( Int64 constrUID = getObjectUID(&cliInterface, constrCatName.data(), constrSchName.data(), constrObjName.data(), NULL, - "object_type = '"COM_PRIMARY_KEY_CONSTRAINT_OBJECT_LIT"' or object_type = '"COM_UNIQUE_CONSTRAINT_OBJECT_LIT"' or object_type = '"COM_REFERENTIAL_CONSTRAINT_OBJECT_LIT"' or object_type = '"COM_CHECK_CONSTRAINT_OBJECT_LIT"' ", + "object_type = '" COM_PRIMARY_KEY_CONSTRAINT_OBJECT_LIT"' or object_type = '" COM_UNIQUE_CONSTRAINT_OBJECT_LIT"' or object_type = '" COM_REFERENTIAL_CONSTRAINT_OBJECT_LIT"' or object_type = '" COM_CHECK_CONSTRAINT_OBJECT_LIT"' ", outObjType); if (constrUID < 0) { @@ -9438,7 +9438,7 @@ void CmpSeabaseDDL::alterSeabaseTableDropConstraint( constrUID); Queue * indexQueue = NULL; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); cliRC = cliInterface.fetchAllRows(indexQueue, query, 0, FALSE, FALSE, TRUE); @@ -9599,7 +9599,7 @@ void CmpSeabaseDDL::seabaseGrantRevoke( ComObjectName origTableName(origTabName, COM_TABLE_NAME); - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); BindWA bindWA(ActiveSchemaDB(), CmpCommon::context(), FALSE/*inDDL*/); @@ -9838,7 +9838,7 @@ void CmpSeabaseDDL::seabaseGrantRevoke( // structure if (objectUID == 0) { - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); objectUID = getObjectInfo(&cliInterface, catalogNamePart.data(), schemaNamePart.data(), @@ -10001,7 +10001,7 @@ void CmpSeabaseDDL::hbaseGrantRevoke( const NAString extTableName = tableName.getExternalName(TRUE); const NAString extNameForHbase = catalogNamePart + "." + schemaNamePart + "." + objectNamePart; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); if (isSeabaseReservedSchema(tableName)) @@ -10669,7 +10669,7 @@ void CmpSeabaseDDL::regOrUnregNativeObject( Lng32 retcode = 0; char errReason[400]; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); NAString catalogNamePart = regOrUnregObject->getObjNameAsQualifiedName(). @@ -11427,7 +11427,7 @@ ComTdbVirtTableSequenceInfo * CmpSeabaseDDL::getSeabaseSequenceInfo( ComObjectName coName(catName, schNameL, seqNameL); extSeqName = coName.getExternalName(TRUE); - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); objectOwner = NA_UserIdDefault; @@ -11551,7 +11551,7 @@ TrafDesc * CmpSeabaseDDL::getSeabaseLibraryDesc( char query[4000]; char buf[4000]; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); if (switchCompiler(CmpContextInfo::CMPCONTEXT_TYPE_META)) @@ -11734,7 +11734,7 @@ TrafDesc * CmpSeabaseDDL::getSeabaseUserTableDesc(const NAString &catName, Lng32 cliRC = 0; char query[4000]; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); TrafDesc * tableDesc = NULL; @@ -12752,7 +12752,7 @@ TrafDesc *CmpSeabaseDDL::getSeabaseRoutineDescInternal(const NAString &catName, char query[4000]; char buf[4000]; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Int64 objectUID = 0; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/CmpSeabaseDDLupgrade.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/CmpSeabaseDDLupgrade.cpp b/core/sql/sqlcomp/CmpSeabaseDDLupgrade.cpp index 94dc0d9..6556d7e 100644 --- a/core/sql/sqlcomp/CmpSeabaseDDLupgrade.cpp +++ b/core/sql/sqlcomp/CmpSeabaseDDLupgrade.cpp @@ -315,7 +315,7 @@ short CmpSeabaseMDupgrade::executeSeabaseMDupgrade(CmpDDLwithStatusInfo *mdui, CmpSeabaseUpgradeRepository upgradeRepository; CmpSeabaseUpgradePrivMgr upgradePrivMgr; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); ExpHbaseInterface * ehi = NULL; @@ -2102,7 +2102,7 @@ short CmpSeabaseMDupgrade::customizeNewMDv23tov30(CmpDDLwithStatusInfo *mdui, case 2: { - str_sprintf(buf, "update %s.\"%s\".%s set sql_data_type = cast( case when fs_data_type = 130 then '"COM_SMALLINT_SIGNED_SDT_LIT"' when fs_data_type = 131 then '"COM_SMALLINT_UNSIGNED_SDT_LIT"' when fs_data_type = 132 then '"COM_INTEGER_SIGNED_SDT_LIT"' when fs_data_type = 133 then '"COM_INTEGER_UNSIGNED_SDT_LIT"' when fs_data_type = 134 then '"COM_LARGEINT_SIGNED_SDT_LIT"' when fs_data_type = 135 then '"COM_SMALLINT_UNSIGNED_SDT_LIT"' when fs_data_type = 140 then '"COM_REAL_SDT_LIT"' when fs_data_type = 141 then '"COM_DOUBLE_SDT_LIT"' when fs_data_type = 150 then '"COM_DECIMAL_UNSIGNED_SDT_LIT"' when fs_data_type = 151 then '"COM_DECIMAL_SIGNED_SDT_LIT"' when fs_data_type = 155 then '"COM_NUMERIC_UNSIGNED_SDT_LIT"' when fs_data_type = 156 then '"COM_NUMERIC_SIGNED_SDT_LIT"' when fs_data_type = 0 then '"COM_CHARACTER_SDT_LIT"' when fs_data_type = 2 then '"COM_CHARACTER_SDT_LIT"' when fs_data_type = 70 then '"COM_LONG_VARCHAR_SDT_LIT"' when fs_data_type = 64 then '"COM_VARCHAR_SDT_LIT"' when fs_data_type = 66 then '"COM_VARCHAR_SDT_LIT"' when fs_data_type = 100 then '"COM_VARCHAR_SDT_LIT"' when fs_data_type = 101 then '"COM_VARCHAR_SDT_LIT"' when fs_data_type = 192 then '"COM_DATETIME_SDT_LIT"' when fs_data_type >= 196 and fs_data_type <= 207 then '"COM_INTERVAL_SDT_LIT"' else '' end as char(24)) ", + str_sprintf(buf, "update %s.\"%s\".%s set sql_data_type = cast( case when fs_data_type = 130 then '" COM_SMALLINT_SIGNED_SDT_LIT"' when fs_data_type = 131 then '" COM_SMALLINT_UNSIGNED_SDT_LIT"' when fs_data_type = 132 then '" COM_INTEGER_SIGNED_SDT_LIT"' when fs_data_type = 133 then '" COM_INTEGER_UNSIGNED_SDT_LIT"' when fs_data_type = 134 then '" COM_LARGEINT_SIGNED_SDT_LIT"' when fs_data_type = 135 then '" COM_SMALLINT_UNSIGNED_SDT_LIT"' when fs_data_type = 140 then '" COM_REAL_SDT_LIT"' when fs_data_type = 141 then '" COM_DOUBLE_SDT_LIT"' when fs_data_type = 150 then '" COM_DECIMAL_UNSIGNED_SDT_LIT"' when fs_data_type = 151 then '" COM_DECIMAL_SIGNED_SDT_LIT"' when fs_data_type = 155 then '" COM_NUMERIC_UNSIGNED_SDT_LIT"' when fs_data_type = 156 then '" COM_NUMERIC_SIGNED_SDT_LIT"' when fs_data_type = 0 then '" COM_CHARACTER_SDT_LIT"' when fs_data_type = 2 then '" COM_CHARACTER_SDT_LIT"' when fs_data_type = 70 then '" COM_LONG_VARCHAR_SDT_LIT"' when fs_data_ty pe = 64 then '" COM_VARCHAR_SDT_LIT"' when fs_data_type = 66 then '" COM_VARCHAR_SDT_LIT"' when fs_data_type = 100 then '" COM_VARCHAR_SDT_LIT"' when fs_data_type = 101 then '" COM_VARCHAR_SDT_LIT"' when fs_data_type = 192 then '" COM_DATETIME_SDT_LIT"' when fs_data_type >= 196 and fs_data_type <= 207 then '" COM_INTERVAL_SDT_LIT"' else '' end as char(24)) ", getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS); cliRC = cliInterface.executeImmediate(buf); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/CmpSeabaseDDLupgrade.h ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/CmpSeabaseDDLupgrade.h b/core/sql/sqlcomp/CmpSeabaseDDLupgrade.h index 4182a3d..549b506 100644 --- a/core/sql/sqlcomp/CmpSeabaseDDLupgrade.h +++ b/core/sql/sqlcomp/CmpSeabaseDDLupgrade.h @@ -449,7 +449,7 @@ static const MDUpgradeInfo allMDv23tov30TablesInfo[] = { NULL, 0, TRUE, "catalog_name, schema_name, object_name, object_type, object_uid, create_time, redef_time, valid_def, droppable, object_owner, schema_owner, flags", - "catalog_name, schema_name, case when schema_name = '_MD_' then object_name || '_OLD_MD' else object_name end, object_type, object_uid, create_time, redef_time, valid_def, 'N', object_owner, "SUPER_USER_LIT", 0 ", + "catalog_name, schema_name, case when schema_name = '_MD_' then object_name || '_OLD_MD' else object_name end, object_type, object_uid, create_time, redef_time, valid_def, 'N', object_owner, " SUPER_USER_LIT", 0 ", NULL, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE}, {SEABASE_OBJECTS_UNIQ_IDX, SEABASE_OBJECTS_UNIQ_IDX_OLD_MD, http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/CmpSeabaseDDLview.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/CmpSeabaseDDLview.cpp b/core/sql/sqlcomp/CmpSeabaseDDLview.cpp index 66a2348..0f2592e 100644 --- a/core/sql/sqlcomp/CmpSeabaseDDLview.cpp +++ b/core/sql/sqlcomp/CmpSeabaseDDLview.cpp @@ -701,7 +701,7 @@ void CmpSeabaseDDL::createSeabaseView( const NAString extViewName = viewName.getExternalName(TRUE); const NAString extNameForHbase = catalogNamePart + "." + schemaNamePart + "." + objectNamePart; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Int32 objectOwnerID = SUPER_USER; Int32 schemaOwnerID = SUPER_USER; @@ -1141,7 +1141,7 @@ void CmpSeabaseDDL::dropSeabaseView( Lng32 cliRC = 0; Lng32 retcode = 0; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); NAString tabName = dropViewNode->getViewName(); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/PrivMgr.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/PrivMgr.cpp b/core/sql/sqlcomp/PrivMgr.cpp index 2c86f40..61e1dad 100644 --- a/core/sql/sqlcomp/PrivMgr.cpp +++ b/core/sql/sqlcomp/PrivMgr.cpp @@ -182,7 +182,7 @@ PrivMgr::PrivMDStatus PrivMgr::authorizationEnabled( sprintf(buf, "get tables in schema %s.%s, no header", catName.c_str(), schName.c_str()); - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Queue * schemaQueue = NULL; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/PrivMgrCommands.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/PrivMgrCommands.cpp b/core/sql/sqlcomp/PrivMgrCommands.cpp index 8b8a1d0..55cf3a6 100644 --- a/core/sql/sqlcomp/PrivMgrCommands.cpp +++ b/core/sql/sqlcomp/PrivMgrCommands.cpp @@ -412,7 +412,7 @@ bool PrivMgrCommands::describeComponents( // returns true if successful // The Trafodion diags area contains any errors that were encountered // ---------------------------------------------------------------------------- -bool PrivMgrCommands::describePrivileges (const PrivMgrObjectInfo &objectInfo, +bool PrivMgrCommands::describePrivileges (PrivMgrObjectInfo &objectInfo, std::string &privilegeText) { PrivMgrPrivileges objectPrivs (objectInfo, metadataLocation_, pDiags_); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/PrivMgrCommands.h ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/PrivMgrCommands.h b/core/sql/sqlcomp/PrivMgrCommands.h index 3ca8510..e1e06b4 100644 --- a/core/sql/sqlcomp/PrivMgrCommands.h +++ b/core/sql/sqlcomp/PrivMgrCommands.h @@ -456,7 +456,7 @@ public: std::vector<std::string> & outlines); bool describePrivileges( - const PrivMgrObjectInfo &objectInfo, + PrivMgrObjectInfo &objectInfo, std::string &privilegeText); PrivStatus dropAuthorizationMetadata(bool doCleanup); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/PrivMgrComponentOperations.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/PrivMgrComponentOperations.cpp b/core/sql/sqlcomp/PrivMgrComponentOperations.cpp index b58d400..bcbfa6b 100644 --- a/core/sql/sqlcomp/PrivMgrComponentOperations.cpp +++ b/core/sql/sqlcomp/PrivMgrComponentOperations.cpp @@ -769,7 +769,7 @@ std::string tempStr; //Operation exists, get the data. std::string operationCode; -bool isSystemOperation; +bool isSystemOperation = FALSE; fetchByName(componentUIDString,operationName,operationCode,isSystemOperation, tempStr); @@ -1306,7 +1306,7 @@ std::string selectStmt ("SELECT COMPONENT_UID, OPERATION_CODE, OPERATION_NAME, I selectStmt += " "; selectStmt += whereClause; -ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, +ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); PrivStatus privStatus = CLIFetch(cliInterface,selectStmt); @@ -1513,7 +1513,7 @@ PrivStatus MyTable::selectWhere( // set pointer in diags area int32_t diagsMark = pDiags_->mark(); - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Queue * tableQueue = NULL; int32_t cliRC = cliInterface.fetchAllRows(tableQueue, http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/PrivMgrComponentPrivileges.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/PrivMgrComponentPrivileges.cpp b/core/sql/sqlcomp/PrivMgrComponentPrivileges.cpp index be013fb..be6de56 100644 --- a/core/sql/sqlcomp/PrivMgrComponentPrivileges.cpp +++ b/core/sql/sqlcomp/PrivMgrComponentPrivileges.cpp @@ -715,7 +715,7 @@ PrivStatus PrivMgrComponentPrivileges::grantPrivilege( } std::string operationCode; - bool isSystemOperation; + bool isSystemOperation = FALSE; std::string operationDescription; componentOperations.fetchByName(componentUIDString, @@ -1025,7 +1025,7 @@ PrivMgrComponentOperations componentOperations(metadataLocation_,pDiags_); } std::string operationCode; -bool isSystemOperation; +bool isSystemOperation = FALSE; std::string operationDescription; componentOperations.fetchByName(componentUIDString, @@ -1621,7 +1621,7 @@ std::vector<std::string> operationCodes; } std::string operationCode; - bool isSystemOperation; + bool isSystemOperation = FALSE; std::string operationDescription; componentOperations.fetchByName(componentUIDString, http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/PrivMgrMD.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/PrivMgrMD.cpp b/core/sql/sqlcomp/PrivMgrMD.cpp index 60ece15..e50ff93 100644 --- a/core/sql/sqlcomp/PrivMgrMD.cpp +++ b/core/sql/sqlcomp/PrivMgrMD.cpp @@ -310,7 +310,7 @@ PrivStatus PrivMgrMDAdmin::initializeMetadata ( } Int32 cliRC = 0; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); // See what tables exist @@ -515,7 +515,7 @@ PrivStatus PrivMgrMDAdmin::dropMetadata ( return STATUS_ERROR; } - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, CmpCommon::context()->sqlSession()->getParentQid()); + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Int32 cliRC = 0; if (doCleanup) cleanupMetadata(cliInterface); @@ -646,7 +646,7 @@ PrivStatus PrivMgrMDAdmin::getColumnReferences (ObjectReference *objectRef) selectStmt += UIDToString(objectRef->objectUID); selectStmt += " order by column_number"; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Queue * objectsQueue = NULL; @@ -708,7 +708,7 @@ PrivStatus PrivMgrMDAdmin::getViewColUsages (ViewUsage &viewUsage) selectStmt += "and t.text_type = 8"; selectStmt += " order by seq_num"; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Queue * objectsQueue = NULL; @@ -797,7 +797,7 @@ PrivStatus PrivMgrMDAdmin::getViewsThatReferenceObject ( selectStmt += ")) order by o.create_time "; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Queue * objectsQueue = NULL; @@ -900,7 +900,7 @@ PrivStatus PrivMgrMDAdmin::getObjectsThatViewReferences ( selectStmt += " and u.used_object_uid = o.object_uid "; selectStmt += " order by o.create_time "; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Queue * objectsQueue = NULL; @@ -991,7 +991,7 @@ PrivStatus PrivMgrMDAdmin::getUdrsThatReferenceLibrary( selectStmt += UIDToString(objectUsage.granteeID); selectStmt += ")) order by o.create_time "; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Queue * objectsQueue = NULL; @@ -1149,7 +1149,7 @@ PrivStatus PrivMgrMDAdmin::getReferencingTablesForConstraints ( selectStmt += " and r.unique_constraint_uid = c.object_uid "; selectStmt += " order by o.object_owner, o.create_time "; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Queue * objectsQueue = NULL; @@ -1324,7 +1324,7 @@ bool PrivMgrMDAdmin::getConstraintName( selectStmt += ") and k.column_number = " + UIDToString(columnNumber); selectStmt += " and unique_constraint_uid = k.object_uid) "; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Queue * objectsQueue = NULL; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/PrivMgrMDTable.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/PrivMgrMDTable.cpp b/core/sql/sqlcomp/PrivMgrMDTable.cpp index 7254aa0..54d492a 100644 --- a/core/sql/sqlcomp/PrivMgrMDTable.cpp +++ b/core/sql/sqlcomp/PrivMgrMDTable.cpp @@ -232,7 +232,7 @@ int32_t cliRC = cliInterface.fetchRowsPrologue(SQLStatement.c_str(),true/*no exe PrivStatus PrivMgrMDTable::CLIImmediate(const std::string & SQLStatement) { -ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, +ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); int32_t cliRC = cliInterface.executeImmediate(SQLStatement.c_str()); @@ -316,7 +316,7 @@ PrivStatus PrivMgrMDTable::executeFetchAll( { -ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, +ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); queue = NULL; @@ -389,12 +389,12 @@ std::string selectStmt ("SELECT COUNT(*) FROM "); selectStmt += whereClause; int32_t length = 0; -ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, +ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); int32_t cliRC = cliInterface.executeImmediate(selectStmt.c_str(), (char*)&rowCount, - &length,NULL); + &length,FALSE); if (cliRC < 0) { @@ -491,7 +491,7 @@ std::string updateStmt("UPDATE "); // set pointer in diags area int32_t diagsMark = pDiags_->mark(); -ExeCliInterface cliInterface(STMTHEAP,NULL,NULL, +ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); int32_t cliRC = cliInterface.executeImmediate(updateStmt.c_str()); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/PrivMgrObjects.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/PrivMgrObjects.cpp b/core/sql/sqlcomp/PrivMgrObjects.cpp index ab7ea5d..3d894d7 100644 --- a/core/sql/sqlcomp/PrivMgrObjects.cpp +++ b/core/sql/sqlcomp/PrivMgrObjects.cpp @@ -802,7 +802,7 @@ std::string selectStmt("SELECT CATALOG_NAME, SCHEMA_NAME, OBJECT_NAME," selectStmt += " "; selectStmt += whereClause; -ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, +ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); PrivStatus privStatus = CLIFetch(cliInterface,selectStmt); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/PrivMgrPrivileges.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/PrivMgrPrivileges.cpp b/core/sql/sqlcomp/PrivMgrPrivileges.cpp index 63f1249..40108d4 100644 --- a/core/sql/sqlcomp/PrivMgrPrivileges.cpp +++ b/core/sql/sqlcomp/PrivMgrPrivileges.cpp @@ -5736,7 +5736,7 @@ PrivStatus ObjectPrivsMDTable::selectWhere( // set pointer in diags area int32_t diagsMark = pDiags_->mark(); - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); Queue * tableQueue = NULL; int32_t cliRC = cliInterface.fetchAllRows(tableQueue, (char *)selectStmt.c_str(), 0, false, false, true); @@ -5895,7 +5895,7 @@ PrivStatus ObjectPrivsMDTable::insert(const PrivMgrMDRow &rowIn) privilegesBitmapLong, grantableBitmapLong); - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); int32_t cliRC = cliInterface.executeImmediate(insertStmt); @@ -5964,7 +5964,7 @@ PrivStatus ObjectPrivsMDTable::deleteWhere(const std::string & whereClause) // set pointer in diags area int32_t diagsMark = pDiags_->mark(); - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); int32_t cliRC = cliInterface.executeImmediate(deleteStmt.c_str()); @@ -6050,7 +6050,7 @@ PrivStatus ObjectPrivsMDTable::updateWhere(const std::string & setClause, // set pointer in diags area int32_t diagsMark = pDiags_->mark(); - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); int32_t cliRC = cliInterface.executeImmediate(updateStmt.c_str()); if (cliRC < 0) @@ -6130,9 +6130,9 @@ PrivStatus ObjectPrivsMDTable::insertSelect( sprintf(buf, "select count(*) from %s", tableName_.c_str()); Int64 rowsSelected = 0; Lng32 theLen = 0; - ExeCliInterface cliInterface(STMTHEAP, NULL, NULL, + ExeCliInterface cliInterface(STMTHEAP, 0, NULL, CmpCommon::context()->sqlSession()->getParentQid()); - int32_t cliRC = cliInterface.executeImmediate(buf, (char*)&rowsSelected, &theLen, NULL); + int32_t cliRC = cliInterface.executeImmediate(buf, (char*)&rowsSelected, &theLen, FALSE); if (cliRC < 0) { cliInterface.retrieveSQLDiagnostics(CmpCommon::diags()); @@ -6222,7 +6222,7 @@ PrivStatus ObjectPrivsMDTable::insertSelect( " and object_owner > 0", objectsLocation.c_str()); Lng32 len = 0; - cliRC = cliInterface.executeImmediate(buf, (char*)&rowsSelected, &len, NULL); + cliRC = cliInterface.executeImmediate(buf, (char*)&rowsSelected, &len, FALSE); if (cliRC < 0) { cliInterface.retrieveSQLDiagnostics(CmpCommon::diags()); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/PrivMgrRoles.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/PrivMgrRoles.cpp b/core/sql/sqlcomp/PrivMgrRoles.cpp index 8bf9023..04f0d87 100644 --- a/core/sql/sqlcomp/PrivMgrRoles.cpp +++ b/core/sql/sqlcomp/PrivMgrRoles.cpp @@ -1456,7 +1456,7 @@ PrivStatus PrivMgrRoles::populateCreatorGrants( int32_t cliRC = cliInterface.executeImmediate(selectStmt.c_str(), (char*)&expectedRows, - &length,NULL); + &length,FALSE); if (cliRC < 0) { http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/QCache.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/QCache.cpp b/core/sql/sqlcomp/QCache.cpp index 36d470f..cf958cd 100644 --- a/core/sql/sqlcomp/QCache.cpp +++ b/core/sql/sqlcomp/QCache.cpp @@ -70,7 +70,6 @@ void logmsg(char* msg, ULong u) } #endif - ULng32 getDefaultInK(const Int32& key) { return (ULng32)1024 * ActiveSchemaDB()->getDefaults().getAsLong(key); @@ -3154,7 +3153,7 @@ void QueryCache::resizeCache(ULng32 maxSize, ULng32 maxVictims, ULng32 avgPlanSz //do the same for Hybrid Query Cache // set HQC HashTable to have same bucket number as CacheKey HashTable - Lng32 numBuckets = cache_->getNumBuckets(); + ULng32 numBuckets = cache_->getNumBuckets(); if (hqc_ != NULL) { hqc_ = hqc_->resizeCache(numBuckets); } @@ -3292,7 +3291,7 @@ void HQCParseKey::bindConstant2SQC(BaseColumn* base, ConstantParameter* cParamet (base->getTableDesc()->tableColStats()). getColStatsPtrForColumn(base->getValueId()); - if (cStatsPtr == NULL) + if (cStatsPtr == 0) return; // if the stats for this column is fake or the number of intervals is 1, there http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sqlcomp/nadefaults.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/nadefaults.cpp b/core/sql/sqlcomp/nadefaults.cpp index 6e9a666..70683c3 100644 --- a/core/sql/sqlcomp/nadefaults.cpp +++ b/core/sql/sqlcomp/nadefaults.cpp @@ -4142,7 +4142,7 @@ NADefaults::NADefaults(NAMemory * h) , currentState_(UNINITIALIZED) , readFromSQDefaultsTable_(FALSE) , SqlParser_NADefaults_(NULL) - , catSchSetToUserID_(NULL) + , catSchSetToUserID_(0) , heap_(h) , resetAll_(FALSE) , defFlags_(0) http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/ustat/hs_globals.cpp ---------------------------------------------------------------------- diff --git a/core/sql/ustat/hs_globals.cpp b/core/sql/ustat/hs_globals.cpp index dbc4b9c..58d2af1 100644 --- a/core/sql/ustat/hs_globals.cpp +++ b/core/sql/ustat/hs_globals.cpp @@ -6897,7 +6897,7 @@ Lng32 HSGlobalsClass::generateSampleI(Int64 currentSampleSize, if (LM->LogNeeded()) { LM->StopTimer(); - sprintf(LM->msg, "the size of data set I is "PF64" rows", xRows); + sprintf(LM->msg, "the size of data set I is " PF64" rows", xRows); LM->Log(LM->msg); } @@ -7577,11 +7577,11 @@ Lng32 HSGlobalsClass::selectIUSBatch(Int64 currentRows, Int64 futureRows, NABool sprintf(LM->msg, "Not enough memory for %s: memLeft=" PF64 " totMemNeeded=", group->colNames->data(), memLeft); formatFixedNumeric((Int64)totMemNeeded, 0, LM->msg+strlen(LM->msg)); LM->Log(LM->msg); - sprintf(LM->msg, "group->memNeeded="PF64"", group->memNeeded); + sprintf(LM->msg, "group->memNeeded=" PF64"", group->memNeeded); LM->Log(LM->msg); - sprintf(LM->msg, "delGroup->memNeeded="PF64"", delGroup->memNeeded); + sprintf(LM->msg, "delGroup->memNeeded=" PF64"", delGroup->memNeeded); LM->Log(LM->msg); - sprintf(LM->msg, "insGroup->memNeeded="PF64"", insGroup->memNeeded); + sprintf(LM->msg, "insGroup->memNeeded=" PF64"", insGroup->memNeeded); LM->Log(LM->msg); sprintf(LM->msg, "memForCBF="); formatFixedNumeric((Int64)memForCBF, 0, LM->msg+strlen(LM->msg)); @@ -7593,7 +7593,7 @@ Lng32 HSGlobalsClass::selectIUSBatch(Int64 currentRows, Int64 futureRows, NABool // Ignore the group if there is no stats for it! if (LM->LogNeeded()) { - sprintf(LM->msg, "No stats: histTableName=%s, tableUid="PF64", colnum=%d", + sprintf(LM->msg, "No stats: histTableName=%s, tableUid=" PF64", colnum=%d", (char*)hstogram_table->data(), tableUID, group->colSet[0].colnum); @@ -7638,7 +7638,7 @@ Lng32 HSGlobalsClass::selectIUSBatch(Int64 currentRows, Int64 futureRows, NABool { if (group->state == PENDING) { - sprintf(LM->msg, " %s ("PF64" bytes)", + sprintf(LM->msg, " %s (" PF64" bytes)", group->colSet[0].colname->data(), group->memNeeded); LM->Log(LM->msg); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/ustat/hs_read.cpp ---------------------------------------------------------------------- diff --git a/core/sql/ustat/hs_read.cpp b/core/sql/ustat/hs_read.cpp index 03160f1..ab53202 100644 --- a/core/sql/ustat/hs_read.cpp +++ b/core/sql/ustat/hs_read.cpp @@ -1462,7 +1462,7 @@ HSHistogrmCursor::HSHistogrmCursor colSecs_(0), samplePercent_(0), cv_(0), - reason_(NULL), + reason_(HS_REASON_EMPTY), v1_(0), avgVarCharCount_(0), // v3_(0),v4_(0),v5_(&buf3_[1]), v6_(&buf4_[1]) @@ -2435,13 +2435,13 @@ void HSColStats::addHistogram totalUec = totalRowCount ; } } - ComUID id(uint32ToInt64(histid)); + ComUID id((long)histid); colStats_ = ColStatsSharedPtr( CMPNEW ColStats(id, totalUec, /* possibly changed by the uniqueness determination above*/ (CostScalar) totalRowCount, // baseRowCount=totalRowCount initially. Added 12/01 RV (CostScalar) totalRowCount, - isUnique, FALSE, NULL, FALSE, + isUnique, FALSE, 0, FALSE, 1.0, 1.0, (csZero <= vCharSize) ? UInt32(vCharSize) : 0, heap_)); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/ustat/hs_util.cpp ---------------------------------------------------------------------- diff --git a/core/sql/ustat/hs_util.cpp b/core/sql/ustat/hs_util.cpp index 1d53855..982403a 100644 --- a/core/sql/ustat/hs_util.cpp +++ b/core/sql/ustat/hs_util.cpp @@ -959,7 +959,7 @@ Int64 hs_getBaseTime() if (baseTs != HS_EPOCH_TIMESTAMP) { sprintf(LM->msg, - "INTERNAL ERROR: wrong baseTS in getEpochTime(): "PF64", HS_EPOCH_TIMESTAMP="PF64"", + "INTERNAL ERROR: wrong baseTS in getEpochTime(): " PF64", HS_EPOCH_TIMESTAMP=" PF64"", baseTs, HS_EPOCH_TIMESTAMP); error = 1; }
