Don't try to update index if it is not found

This quiets compiler warning about possibly uninitialized var
This commit is contained in:
Jean-Michel Vourgère
2012-07-01 12:50:00 +02:00
parent 4c470a907d
commit 8becb3fa6d

View File

@@ -140,8 +140,10 @@ mdb_read_indices(MdbTableDef *table)
if (pidx->index_type!=2 && pidx->index_num==i) if (pidx->index_type!=2 && pidx->index_num==i)
break; break;
} }
if (j==table->num_idxs) if (j==table->num_idxs) {
fprintf(stderr, "ERROR: can't find index #%d.\n", i); fprintf(stderr, "ERROR: can't find index #%d.\n", i);
continue;
}
//fprintf(stderr, "index %d #%d (%s) index_type:%d\n", i, pidx->index_num, pidx->name, pidx->index_type); //fprintf(stderr, "index %d #%d (%s) index_type:%d\n", i, pidx->index_num, pidx->name, pidx->index_type);
pidx->num_rows = mdb_get_int32(mdb->alt_pg_buf, pidx->num_rows = mdb_get_int32(mdb->alt_pg_buf,