Commit f3b20b80 by Celine Mercier

Fixed bug with indexer names being defined and generating seg fault if

creating a column not using indexers
parent d159b921
...@@ -587,16 +587,19 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms, ...@@ -587,16 +587,19 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
} }
// Build the indexer name if needed // Build the indexer name if needed
if (((data_type == OBI_STR) || (data_type == OBI_SEQ)) && (strcmp(indexer_name, "") == 0)) if ((data_type == OBI_STR) || (data_type == OBI_SEQ))
{
final_indexer_name = obi_build_indexer_name(column_name, version_number);
if (final_indexer_name == NULL)
return NULL;
}
else
{ {
final_indexer_name = (char*) malloc((strlen(indexer_name)+1)*sizeof(char)); if (strcmp(indexer_name, "") == 0)
strcpy(final_indexer_name, indexer_name); {
final_indexer_name = obi_build_indexer_name(column_name, version_number);
if (final_indexer_name == NULL)
return NULL;
}
else
{
final_indexer_name = (char*) malloc((strlen(indexer_name)+1)*sizeof(char));
strcpy(final_indexer_name, indexer_name);
}
} }
returned_data_type = data_type; returned_data_type = data_type;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment