enh: prefer to use latest schema
This commit is contained in:
parent
5fa27b27ba
commit
76ef412d8f
|
@ -182,7 +182,7 @@ int tsdbUnlockRepo(STsdb *pTsdb);
|
||||||
|
|
||||||
static FORCE_INLINE STSchema *tsdbGetTableSchemaImpl(STsdb *pTsdb, STable *pTable, bool lock, bool copy,
|
static FORCE_INLINE STSchema *tsdbGetTableSchemaImpl(STsdb *pTsdb, STable *pTable, bool lock, bool copy,
|
||||||
int32_t version) {
|
int32_t version) {
|
||||||
if (version < 0) {
|
if ((version < 0) || (schemaVersion(pTable->pSchema) == version)) {
|
||||||
return pTable->pSchema;
|
return pTable->pSchema;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue