Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Segfault when preparing statement for table whose name exists in multiple keyspaces
Description
When I try to prepare a statement for a table that exists (same name) in multiple keyspaces, the C++ driver segfaults. I traced the crash back to a bug in Metadata::InternalData::update_columns():
if(keyspace_name != temp_keyspace_name){ keyspace_name = temp_keyspace_name; keyspace =get_or_create_keyspace(keyspace_name);// XXX This needs to clear the "table_or_view_name" variable, because// XXX the new keyspace may have a table/view with the same name.// XXX We need to force the next if-statement to run.}if(table_or_view_name != temp_table_or_view_name){// Build keys for the previous tableif(table_or_view){ table_or_view->build_keys_and_sort(config);} table_or_view_name = temp_table_or_view_name;...}
When I try to prepare a statement for a table that exists (same name) in multiple keyspaces, the C++ driver segfaults. I traced the crash back to a bug in Metadata::InternalData::update_columns():
if (keyspace_name != temp_keyspace_name) { keyspace_name = temp_keyspace_name; keyspace = get_or_create_keyspace(keyspace_name); // XXX This needs to clear the "table_or_view_name" variable, because // XXX the new keyspace may have a table/view with the same name. // XXX We need to force the next if-statement to run. } if (table_or_view_name != temp_table_or_view_name) { // Build keys for the previous table if (table_or_view) { table_or_view->build_keys_and_sort(config); } table_or_view_name = temp_table_or_view_name; ... }