Merge pull request #6596 from taosdata/test/TD-3825
[TD-3825] <fix> to fix bug which make with asan caused。modified by hjLiao.
This commit is contained in:
commit
1116a70c92
|
@ -1496,7 +1496,9 @@ int tscBuildAlterTableMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
|
||||||
|
|
||||||
pMsg = (char *)pSchema;
|
pMsg = (char *)pSchema;
|
||||||
pAlterTableMsg->tagValLen = htonl(pAlterInfo->tagData.dataLen);
|
pAlterTableMsg->tagValLen = htonl(pAlterInfo->tagData.dataLen);
|
||||||
memcpy(pMsg, pAlterInfo->tagData.data, pAlterInfo->tagData.dataLen);
|
if (pAlterInfo->tagData.dataLen > 0) {
|
||||||
|
memcpy(pMsg, pAlterInfo->tagData.data, pAlterInfo->tagData.dataLen);
|
||||||
|
}
|
||||||
pMsg += pAlterInfo->tagData.dataLen;
|
pMsg += pAlterInfo->tagData.dataLen;
|
||||||
|
|
||||||
msgLen = (int32_t)(pMsg - (char*)pAlterTableMsg);
|
msgLen = (int32_t)(pMsg - (char*)pAlterTableMsg);
|
||||||
|
|
|
@ -90,7 +90,7 @@ enum TEST_MODE {
|
||||||
#define OPT_ABORT 1 /* –abort */
|
#define OPT_ABORT 1 /* –abort */
|
||||||
#define STRING_LEN 60000
|
#define STRING_LEN 60000
|
||||||
#define MAX_PREPARED_RAND 1000000
|
#define MAX_PREPARED_RAND 1000000
|
||||||
#define MAX_FILE_NAME_LEN 256
|
#define MAX_FILE_NAME_LEN 128
|
||||||
|
|
||||||
#define MAX_SAMPLES_ONCE_FROM_FILE 10000
|
#define MAX_SAMPLES_ONCE_FROM_FILE 10000
|
||||||
#define MAX_NUM_DATATYPE 10
|
#define MAX_NUM_DATATYPE 10
|
||||||
|
|
|
@ -1068,7 +1068,9 @@ static int32_t mnodeProcessCreateSuperTableMsg(SMnodeMsg *pMsg) {
|
||||||
pStable->info.tableId = strdup(pCreate->tableName);
|
pStable->info.tableId = strdup(pCreate->tableName);
|
||||||
pStable->info.type = TSDB_SUPER_TABLE;
|
pStable->info.type = TSDB_SUPER_TABLE;
|
||||||
pStable->createdTime = taosGetTimestampMs();
|
pStable->createdTime = taosGetTimestampMs();
|
||||||
pStable->uid = (us << 24) + ((sdbGetVersion() & ((1ul << 16) - 1ul)) << 8) + (taosRand() & ((1ul << 8) - 1ul));
|
int64_t x = (us&0x000000FFFFFFFFFF);
|
||||||
|
x = x<<24;
|
||||||
|
pStable->uid = x + ((sdbGetVersion() & ((1ul << 16) - 1ul)) << 8) + (taosRand() & ((1ul << 8) - 1ul));
|
||||||
pStable->sversion = 0;
|
pStable->sversion = 0;
|
||||||
pStable->tversion = 0;
|
pStable->tversion = 0;
|
||||||
pStable->numOfColumns = numOfColumns;
|
pStable->numOfColumns = numOfColumns;
|
||||||
|
|
|
@ -35,7 +35,7 @@ int32_t main(int32_t argc, char *argv[]) {
|
||||||
|
|
||||||
for (int32_t i = 1; i < argc; ++i) {
|
for (int32_t i = 1; i < argc; ++i) {
|
||||||
if (strcmp(argv[i], "-c") == 0 && i < argc - 1) {
|
if (strcmp(argv[i], "-c") == 0 && i < argc - 1) {
|
||||||
tstrncpy(configDir, argv[++i], MAX_FILE_NAME_LEN);
|
tstrncpy(configDir, argv[++i], 128);
|
||||||
} else if (strcmp(argv[i], "-f") == 0 && i < argc - 1) {
|
} else if (strcmp(argv[i], "-f") == 0 && i < argc - 1) {
|
||||||
strcpy(scriptFile, argv[++i]);
|
strcpy(scriptFile, argv[++i]);
|
||||||
} else if (strcmp(argv[i], "-a") == 0) {
|
} else if (strcmp(argv[i], "-a") == 0) {
|
||||||
|
@ -75,4 +75,4 @@ int32_t main(int32_t argc, char *argv[]) {
|
||||||
simInfo("execute result %d", ret);
|
simInfo("execute result %d", ret);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue