[TBASE-1284]
This commit is contained in:
parent
92a9613e7c
commit
a56b019a25
|
@ -21,10 +21,6 @@
|
||||||
|
|
||||||
#define abs(x) (((x) < 0) ? -(x) : (x))
|
#define abs(x) (((x) < 0) ? -(x) : (x))
|
||||||
|
|
||||||
#ifndef max
|
|
||||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern char version[];
|
extern char version[];
|
||||||
const int16_t sdbFileVersion = 0;
|
const int16_t sdbFileVersion = 0;
|
||||||
int sdbExtConns = 0;
|
int sdbExtConns = 0;
|
||||||
|
@ -247,14 +243,14 @@ int sdbInitTableByFile(SSdbTable *pTable) {
|
||||||
(*sdbAddIndexFp[pTable->keyType])(pTable->iHandle, rowMeta.row, &rowMeta);
|
(*sdbAddIndexFp[pTable->keyType])(pTable->iHandle, rowMeta.row, &rowMeta);
|
||||||
if (pTable->keyType == SDB_KEYTYPE_AUTO) {
|
if (pTable->keyType == SDB_KEYTYPE_AUTO) {
|
||||||
pTable->autoIndex++;
|
pTable->autoIndex++;
|
||||||
maxAutoIndex = max(maxAutoIndex, *(int32_t*)rowHead->data);
|
maxAutoIndex = MAX(maxAutoIndex, *(int32_t*)rowHead->data);
|
||||||
}
|
}
|
||||||
pTable->numOfRows++;
|
pTable->numOfRows++;
|
||||||
}
|
}
|
||||||
} else { // already exists
|
} else { // already exists
|
||||||
if (pTable->keyType == SDB_KEYTYPE_AUTO) {
|
if (pTable->keyType == SDB_KEYTYPE_AUTO) {
|
||||||
pTable->autoIndex++;
|
pTable->autoIndex++;
|
||||||
maxAutoIndex = max(maxAutoIndex, *(int32_t *) rowHead->data);
|
maxAutoIndex = MAX(maxAutoIndex, *(int32_t *) rowHead->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rowHead->id < 0) { // Delete the object
|
if (rowHead->id < 0) { // Delete the object
|
||||||
|
|
Loading…
Reference in New Issue