C: fixed a bug where indexers referring to tuples of certain types were
not properly closed and imported
This commit is contained in:
@ -1496,7 +1496,7 @@ obiversion_t obi_import_column(const char* dms_path_1, const char* dms_path_2, c
|
|||||||
memcpy(column_2->data, column_1->data, header_1->data_size);
|
memcpy(column_2->data, column_1->data, header_1->data_size);
|
||||||
|
|
||||||
// Copy the AVL files if there are some (overwriting the automatically created files)
|
// Copy the AVL files if there are some (overwriting the automatically created files)
|
||||||
if ((header_1->returned_data_type == OBI_STR) || (header_1->returned_data_type == OBI_SEQ) || (header_1->returned_data_type == OBI_QUAL))
|
if ((header_1->tuples) || ((header_1->returned_data_type == OBI_STR) || (header_1->returned_data_type == OBI_SEQ) || (header_1->returned_data_type == OBI_QUAL)))
|
||||||
{
|
{
|
||||||
avl_name_1 = (char*) malloc((strlen(header_1->indexer_name) + 1) * sizeof(char));
|
avl_name_1 = (char*) malloc((strlen(header_1->indexer_name) + 1) * sizeof(char));
|
||||||
if (avl_name_1 == NULL)
|
if (avl_name_1 == NULL)
|
||||||
|
@ -1693,8 +1693,8 @@ int obi_close_column(OBIDMS_column_p column)
|
|||||||
if (obi_dms_unlist_column(column->dms, column) < 0)
|
if (obi_dms_unlist_column(column->dms, column) < 0)
|
||||||
ret_val = -1;
|
ret_val = -1;
|
||||||
|
|
||||||
// If the data type is OBI_STR, OBI_SEQ or OBI_QUAL, the associated indexer is closed
|
// If it's a tuple column or the data type is OBI_STR, OBI_SEQ or OBI_QUAL, the associated indexer is closed
|
||||||
if (((column->header)->returned_data_type == OBI_STR) || ((column->header)->returned_data_type == OBI_SEQ) || ((column->header)->returned_data_type == OBI_QUAL))
|
if (((column->header)->tuples) || (((column->header)->returned_data_type == OBI_STR) || ((column->header)->returned_data_type == OBI_SEQ) || ((column->header)->returned_data_type == OBI_QUAL)))
|
||||||
if (obi_close_indexer(column->indexer) < 0)
|
if (obi_close_indexer(column->indexer) < 0)
|
||||||
ret_val = -1;
|
ret_val = -1;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user