Merge pull request #12347 from taosdata/fix/ZhiqiangWang/fix-15189-windows-compile-TDinternal
fix(os): windows compile TDinternal.
This commit is contained in:
commit
356ccb7336
|
@ -402,7 +402,7 @@ static int32_t smlModifyDBSchemas(SSmlHandle* info) {
|
|||
code = catalogGetSTableMeta(info->pCatalog, info->taos->pAppInfo->pTransporter, &ep, &pName, &pTableMeta);
|
||||
|
||||
if (code == TSDB_CODE_PAR_TABLE_NOT_EXIST || code == TSDB_CODE_MND_INVALID_STB) {
|
||||
SSchemaAction schemaAction = {.action = SCHEMA_ACTION_CREATE_STABLE};
|
||||
SSchemaAction schemaAction = { SCHEMA_ACTION_CREATE_STABLE, 0};
|
||||
memcpy(schemaAction.createSTable.sTableName, superTable, superTableLen);
|
||||
schemaAction.createSTable.tags = sTableData->tags;
|
||||
schemaAction.createSTable.fields = sTableData->cols;
|
||||
|
@ -1505,8 +1505,8 @@ static int32_t smlParseLine(SSmlHandle* info, const char* sql) {
|
|||
|
||||
tinfo->sTableName = elements.measure;
|
||||
tinfo->sTableNameLen = elements.measureLen;
|
||||
RandTableName rName = {.tags=tinfo->tags, .sTableName=tinfo->sTableName, .sTableNameLen=tinfo->sTableNameLen,
|
||||
.childTableName=tinfo->childTableName};
|
||||
RandTableName rName = { tinfo->tags, tinfo->sTableName, tinfo->sTableNameLen,
|
||||
tinfo->childTableName, 0 };
|
||||
buildChildTableName(&rName);
|
||||
tinfo->uid = rName.uid;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ struct SMemTable {
|
|||
|
||||
struct SMemSkipListNode {
|
||||
int8_t level;
|
||||
SMemSkipListNode *forwards[];
|
||||
SMemSkipListNode *forwards[1]; // Windows does not allow 0
|
||||
};
|
||||
|
||||
struct SMemSkipList {
|
||||
|
@ -46,7 +46,7 @@ struct SMemSkipList {
|
|||
int8_t maxLevel;
|
||||
int8_t level;
|
||||
int32_t size;
|
||||
SMemSkipListNode pHead[];
|
||||
SMemSkipListNode pHead[1]; // Windows does not allow 0
|
||||
};
|
||||
|
||||
struct SMemData {
|
||||
|
|
|
@ -103,7 +103,8 @@ Dwarf_Debug tDbg;
|
|||
static TdThreadOnce traceThreadInit = PTHREAD_ONCE_INIT;
|
||||
|
||||
void endTrace() {
|
||||
if (traceThreadInit != PTHREAD_ONCE_INIT) {
|
||||
TdThreadOnce tmp = PTHREAD_ONCE_INIT;
|
||||
if (memcmp(&traceThreadInit, &tmp, sizeof(TdThreadOnce)) != 0) {
|
||||
delete_lookup_table(&lookup_table);
|
||||
dwarf_finish(tDbg);
|
||||
}
|
||||
|
|
|
@ -911,7 +911,8 @@ void taosCacheRefresh(SCacheObj *pCacheObj, __cache_trav_fn_t fp, void *param1)
|
|||
|
||||
void taosStopCacheRefreshWorker(void) {
|
||||
stopRefreshWorker = true;
|
||||
if(cacheThreadInit != PTHREAD_ONCE_INIT) taosThreadJoin(cacheRefreshWorker, NULL);
|
||||
TdThreadOnce tmp = PTHREAD_ONCE_INIT;
|
||||
if (memcmp(&cacheRefreshWorker, &tmp, sizeof(TdThreadOnce)) != 0) taosThreadJoin(cacheRefreshWorker, NULL);
|
||||
taosArrayDestroy(pCacheArrayList);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue