TD-166
This commit is contained in:
parent
519b261cc2
commit
5b3bd9ddc1
|
@ -15,5 +15,5 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
|
||||||
TARGET_LINK_LIBRARIES(tsdb common tutil)
|
TARGET_LINK_LIBRARIES(tsdb common tutil)
|
||||||
|
|
||||||
# Someone has no gtest directory, so comment it
|
# Someone has no gtest directory, so comment it
|
||||||
# ADD_SUBDIRECTORY(tests)
|
ADD_SUBDIRECTORY(tests)
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
|
@ -27,7 +27,7 @@ typedef struct {
|
||||||
|
|
||||||
static int insertData(SInsertInfo *pInfo) {
|
static int insertData(SInsertInfo *pInfo) {
|
||||||
SSubmitMsg *pMsg =
|
SSubmitMsg *pMsg =
|
||||||
(SSubmitMsg *)malloc(sizeof(SSubmitMsg) + sizeof(SSubmitBlk) + tdMaxRowBytesFromSchema(pInfo->pSchema) * pInfo->rowsPerSubmit);
|
(SSubmitMsg *)malloc(sizeof(SSubmitMsg) + sizeof(SSubmitBlk) + dataRowMaxBytesFromSchema(pInfo->pSchema) * pInfo->rowsPerSubmit);
|
||||||
if (pMsg == NULL) return -1;
|
if (pMsg == NULL) return -1;
|
||||||
TSKEY start_time = pInfo->startTime;
|
TSKEY start_time = pInfo->startTime;
|
||||||
|
|
||||||
|
@ -53,10 +53,10 @@ static int insertData(SInsertInfo *pInfo) {
|
||||||
|
|
||||||
for (int j = 0; j < schemaNCols(pInfo->pSchema); j++) {
|
for (int j = 0; j < schemaNCols(pInfo->pSchema); j++) {
|
||||||
if (j == 0) { // Just for timestamp
|
if (j == 0) { // Just for timestamp
|
||||||
tdAppendColVal(row, (void *)(&start_time), schemaColAt(pInfo->pSchema, j));
|
tdAppendColVal(row, (void *)(&start_time), pInfo->pSchema, j);
|
||||||
} else { // For int
|
} else { // For int
|
||||||
int val = 10;
|
int val = 10;
|
||||||
tdAppendColVal(row, (void *)(&val), schemaColAt(pInfo->pSchema, j));
|
tdAppendColVal(row, (void *)(&val), pInfo->pSchema, j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pBlock->len += dataRowLen(row);
|
pBlock->len += dataRowLen(row);
|
||||||
|
|
Loading…
Reference in New Issue