Merge branch 'multiple_avls_bloom'
This commit is contained in:
@ -525,7 +525,6 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
||||
OBIDMS_column_p new_column;
|
||||
OBIDMS_column_directory_p column_directory;
|
||||
OBIDMS_column_header_p header;
|
||||
OBIDMS_avl_p avl;
|
||||
size_t file_size;
|
||||
obiversion_t version_number;
|
||||
char* column_file_name;
|
||||
@ -727,16 +726,15 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
||||
// If the data type is OBI_STR or OBI_SEQ, the associated obi_avl is opened or created
|
||||
if ((returned_data_type == OBI_STR) || (returned_data_type == OBI_SEQ))
|
||||
{
|
||||
avl = obi_avl(dms, avl_name);
|
||||
if (avl == NULL)
|
||||
{
|
||||
obidebug(1, "\nError opening or creating the aVL tree associated with a column");
|
||||
munmap(new_column->header, header_size);
|
||||
close(column_file_descriptor);
|
||||
free(new_column);
|
||||
return NULL;
|
||||
}
|
||||
new_column->avl = avl;
|
||||
new_column->avl = obi_create_avl_group(dms, avl_name);
|
||||
// if (avl == NULL) TODO
|
||||
// {
|
||||
// obidebug(1, "\nError opening or creating the aVL tree associated with a column");
|
||||
// munmap(new_column->header, header_size);
|
||||
// close(column_file_descriptor);
|
||||
// free(new_column);
|
||||
// return NULL;
|
||||
// }
|
||||
strncpy(header->avl_name, avl_name, AVL_MAX_NAME);
|
||||
}
|
||||
|
||||
@ -760,11 +758,11 @@ OBIDMS_column_p obi_open_column(OBIDMS_p dms,
|
||||
{
|
||||
OBIDMS_column_p column;
|
||||
OBIDMS_column_directory_p column_directory;
|
||||
OBIDMS_avl_p avl;
|
||||
char* column_file_name;
|
||||
int column_file_descriptor;
|
||||
size_t header_size;
|
||||
size_t i;
|
||||
OBIDMS_avl_p avl;
|
||||
|
||||
column = NULL;
|
||||
|
||||
@ -890,7 +888,7 @@ OBIDMS_column_p obi_open_column(OBIDMS_p dms,
|
||||
free(column);
|
||||
return NULL;
|
||||
}
|
||||
column->avl = avl;
|
||||
//column->avl = avl; TODO
|
||||
}
|
||||
|
||||
close(column_file_descriptor);
|
||||
@ -1024,12 +1022,12 @@ int obi_close_column(OBIDMS_column_p column)
|
||||
}
|
||||
}
|
||||
|
||||
// If the data type is OBI_STR or OBI_SEQ, the associated AVL tree is closed
|
||||
if (((column->header)->returned_data_type == OBI_STR) || ((column->header)->returned_data_type == OBI_SEQ))
|
||||
{
|
||||
if (obi_close_avl(column->avl) < 0)
|
||||
return -1;
|
||||
}
|
||||
// If the data type is OBI_STR or OBI_SEQ, the associated AVL tree is closed TODO
|
||||
// if (((column->header)->returned_data_type == OBI_STR) || ((column->header)->returned_data_type == OBI_SEQ))
|
||||
// {
|
||||
// if (obi_close_avl(column->avl) < 0)
|
||||
// return -1;
|
||||
// }
|
||||
|
||||
// Munmap data
|
||||
if (munmap(column->data, (column->header)->data_size) < 0)
|
||||
|
Reference in New Issue
Block a user