fix coredump
This commit is contained in:
parent
d648f55753
commit
907c870181
|
@ -106,9 +106,9 @@ static FORCE_INLINE STSchema* tsdbGetTableSchemaImpl(STable* pTable, bool lock,
|
||||||
|
|
||||||
if (lock) TSDB_RLOCK_TABLE(pDTable);
|
if (lock) TSDB_RLOCK_TABLE(pDTable);
|
||||||
if (_version < 0) { // get the latest version of schema
|
if (_version < 0) { // get the latest version of schema
|
||||||
pTSchema = *(STSchema **)taosArrayGetLast(pTable->schema);
|
pTSchema = *(STSchema **)taosArrayGetLast(pDTable->schema);
|
||||||
} else { // get the schema with version
|
} else { // get the schema with version
|
||||||
void* ptr = taosArraySearch(pTable->schema, &_version, tsdbCompareSchemaVersion, TD_EQ);
|
void* ptr = taosArraySearch(pDTable->schema, &_version, tsdbCompareSchemaVersion, TD_EQ);
|
||||||
if (ptr == NULL) {
|
if (ptr == NULL) {
|
||||||
terrno = TSDB_CODE_TDB_IVD_TB_SCHEMA_VERSION;
|
terrno = TSDB_CODE_TDB_IVD_TB_SCHEMA_VERSION;
|
||||||
goto _exit;
|
goto _exit;
|
||||||
|
|
Loading…
Reference in New Issue