Fixed bug with indexer names being defined and generating seg fault if
creating a column not using indexers
This commit is contained in:
@ -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 (strcmp(indexer_name, "") == 0)
|
||||||
if (final_indexer_name == NULL)
|
{
|
||||||
return NULL;
|
final_indexer_name = obi_build_indexer_name(column_name, version_number);
|
||||||
}
|
if (final_indexer_name == NULL)
|
||||||
else
|
return NULL;
|
||||||
{
|
}
|
||||||
final_indexer_name = (char*) malloc((strlen(indexer_name)+1)*sizeof(char));
|
else
|
||||||
strcpy(final_indexer_name, indexer_name);
|
{
|
||||||
|
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;
|
||||||
|
Reference in New Issue
Block a user