fix some problem
This commit is contained in:
parent
ac91127b03
commit
f1804a86cf
|
@ -38,13 +38,22 @@ typedef struct STagVal STagVal;
|
||||||
typedef struct STag STag;
|
typedef struct STag STag;
|
||||||
|
|
||||||
// bitmap
|
// bitmap
|
||||||
#define N1(n) ((1 << (n)) - 1)
|
#define N1(n) ((1 << (n)) - 1)
|
||||||
#define BIT1_SIZE(n) (((n)-1) / 8 + 1)
|
#define BIT1_SIZE(n) (((n)-1) / 8 + 1)
|
||||||
#define BIT2_SIZE(n) (((n)-1) / 4 + 1)
|
#define BIT2_SIZE(n) (((n)-1) / 4 + 1)
|
||||||
#define SET_BIT1(p, i, v) ((p)[(i) / 8] |= (((uint8_t)(v)) << ((i) % 8)))
|
#define SET_BIT1(p, i, v) \
|
||||||
#define GET_BIT1(p, i) (((p)[(i) / 8] >> ((i) % 8)) & ((uint8_t)1))
|
do { \
|
||||||
#define SET_BIT2(p, i, v) ((p)[(i) / 4] |= (((uint8_t)(v)) << (((i) % 4) * 2)))
|
(p)[(i) / 8] &= N1((i) % 8); \
|
||||||
#define GET_BIT2(p, i) (((p)[(i) / 4] >> (((i) % 4) * 2)) & ((uint8_t)3))
|
(p)[(i) / 8] |= (((uint8_t)(v)) << (((i) % 8))); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define GET_BIT1(p, i) (((p)[(i) / 8] >> ((i) % 8)) & ((uint8_t)1))
|
||||||
|
#define SET_BIT2(p, i, v) \
|
||||||
|
do { \
|
||||||
|
p[(i) / 4] &= N1((i) % 4 * 2); \
|
||||||
|
(p)[(i) / 4] |= (((uint8_t)(v)) << (((i) % 4) * 2)); \
|
||||||
|
} while (0)
|
||||||
|
#define GET_BIT2(p, i) (((p)[(i) / 4] >> (((i) % 4) * 2)) & ((uint8_t)3))
|
||||||
|
|
||||||
// STSchema
|
// STSchema
|
||||||
int32_t tTSchemaCreate(int32_t sver, SSchema *pSchema, int32_t nCols, STSchema **ppTSchema);
|
int32_t tTSchemaCreate(int32_t sver, SSchema *pSchema, int32_t nCols, STSchema **ppTSchema);
|
||||||
|
|
|
@ -955,6 +955,7 @@ static void tsdbCommitDataEnd(SCommitter *pCommitter) {
|
||||||
taosArrayDestroy(pCommitter->aBlockIdxN);
|
taosArrayDestroy(pCommitter->aBlockIdxN);
|
||||||
tMapDataClear(&pCommitter->nBlockMap);
|
tMapDataClear(&pCommitter->nBlockMap);
|
||||||
tBlockDataClear(&pCommitter->nBlockData);
|
tBlockDataClear(&pCommitter->nBlockData);
|
||||||
|
tTSchemaDestroy(pCommitter->pTSchema);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t tsdbCommitData(SCommitter *pCommitter) {
|
static int32_t tsdbCommitData(SCommitter *pCommitter) {
|
||||||
|
|
Loading…
Reference in New Issue