trafodion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Birdsall <dave.birds...@esgyn.com>
Subject RE: How to fix this InvalidVarArgs problem, remove parameters or add print format?
Date Tue, 09 Jan 2018 17:22:03 GMT
This looks like dead code to me. The NEO.HP_DEFINITION_SCHEMA stuff is from the predecessor
Neoview product.

Perhaps this should simply be removed?

-----Original Message-----
From: Wang, Xiao-Zhong [mailto:xiaozhong.wang@esgyn.cn] 
Sent: Tuesday, January 9, 2018 12:15 AM
To: dev@trafodion.apache.org
Subject: How to fix this InvalidVarArgs problem, remove parameters or add print format?

file="/home/wangxz/code/trafodion/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp" line="6289"
id="logic" subid="InvalidVarArgs" severity="error"
msg="The count of parameters mismatches the format string in sprintf" web_identify="{&quot;identify&quot;:&quot;sprintf&quot;}"
func_info="bool GetHashInfo ( char * sqlString , char * genRequestError , char * HashTableInfo
)"
6279:                 break;
6280:             case 5:
6281:                 if(syskeysPresent)
6282:                     sprintf(ControlQuery,"select concat(cast(ac.COLUMN_NUMBER as varchar(10)
character set ISO88591),',') from %s.SYSTEM_SCHEMA.SCHEMATA sc, NEO.HP_DEFINITION_SCHEMA.OBJECTS
ob, NEO.HP_DEFINITION_SCHEMA.ACCESS_PATH_COLS ac where sc.SCHEMA_NAME = '%s' and ob.OBJECT_NAME
= '%s'    and ac.PART_KEY_SEQ_NUM > 0    and sc.SCHEMA_UID = ob.SCHEMA_UID and ob.OBJECT_UID
= ac.ACCESS_PATH_UID ORDER BY ac.POSITION_IN_ROW FOR READ UNCOMMITTED ACCESS", srvrGlobal->SystemCatalog,
schemaToken, tableName);
6283:                 else
6284:                     sprintf(ControlQuery,"select concat(cast(ac.COLUMN_NUMBER+1 as varchar(10)
character set ISO88591),',') from %s.SYSTEM_SCHEMA.SCHEMATA sc, NEO.HP_DEFINITION_SCHEMA.OBJECTS
ob, NEO.HP_DEFINITION_SCHEMA.ACCESS_PATH_COLS ac where sc.SCHEMA_NAME = '%s' and ob.OBJECT_NAME
= '%s'    and ac.PART_KEY_SEQ_NUM > 0    and sc.SCHEMA_UID = ob.SCHEMA_UID and ob.OBJECT_UID
= ac.ACCESS_PATH_UID ORDER BY ac.POSITION_IN_ROW FOR READ UNCOMMITTED ACCESS", srvrGlobal->SystemCatalog,
schemaToken, tableName);
6285:                 strcpy(HashTableInfo+ControlQueryLen, ";HC="); // HC means HASH COLUMNS
in the TABLE.
6286:                 ControlQueryLen = ControlQueryLen + 4;
6287:                 break;
6288:             case 6:
6289:                 sprintf(ControlQuery,"select cast(cast((52 * 1024 * 128) / (sum(co.column_size))
as integer) as varchar(10) character set ISO88591) from  %s.SYSTEM_SCHEMA.SCHEMATA sc, NEO.HP_DEFINITION_SCHEMA.OBJECTS
ob, NEO.HP_DEFINITION_SCHEMA.COLS co where sc.SCHEMA_NAME = '%s' and ob.OBJECT_NAME = '%s'
and sc.SCHEMA_UID = ob.SCHEMA_UID and ob.OBJECT_UID = co.OBJECT_UID and ob.OBJECT_TYPE = 'BT'
FOR READ UNCOMMITTED ACCESS", srvrGlobal->SystemCatalog, verBuffer, verBuffer, atol(verBuffer),
schemaToken, tableName);
6290:                 strcpy(HashTableInfo+ControlQueryLen, ";HE="); // HE means Guesstimated
rowset size. Change 128 to HP soon.
6291:                 ControlQueryLen = ControlQueryLen + 4;
6292:                 break;
6293:             default:
6294:                 break;
6295:             }
6296:             iqqcode = QryControlSrvrStmt->ExecDirect(NULL, ControlQuery, EXTERNAL_STMT,
TYPE_SELECT, SQL_ASYNC_ENABLE_OFF, 0);
6297:             if (iqqcode != SQL_SUCCESS)
6298:             {
6299:                 ERROR_DESC_def *p_buffer = QryControlSrvrStmt->sqlError.errorList._buffer;


北京易鲸捷信息技术有限公司
地址:北京市朝阳区北辰东路8号汇宾大厦A座1302室
手机:18513493336
邮箱:xiaozhong.wang@esgyn.cn<mailto:xiaozhong.wang@esgyn.cn>

Mime
View raw message