fix bug while alter table

This commit is contained in:
slguan 2020-05-08 19:05:03 +08:00
parent 085abd40d9
commit 5127b9a135
1 changed files with 4 additions and 4 deletions

View File

@ -828,10 +828,10 @@ static void mgmtProcessDropSuperTableMsg(SQueuedMsg *pMsg) {
}
static int32_t mgmtFindSuperTableTagIndex(SSuperTableObj *pStable, const char *tagName) {
for (int32_t i = 0; i < pStable->numOfTags; i++) {
SSchema *schema = (SSchema *)(pStable->schema + (pStable->numOfColumns + i) * sizeof(SSchema));
if (strcasecmp(tagName, schema->name) == 0) {
return i;
SSchema *schema = (SSchema *) pStable->schema;
for (int32_t tag = 0; tag < pStable->numOfTags; tag++) {
if (strcasecmp(schema[pStable->numOfColumns + tag].name, tagName) == 0) {
return tag;
}
}