db/view: Consume updated rows regardless of static row

Using Materialized Views, if the base table has static columns,
and the update in base table mutates static and non static rows,
the streamed_mutation is stopped before process non static row.
The patch avoids stopping the stream_mutation and adds a test case.

Message-Id: <20171220173434.25091-1-tavares.george@gmail.com>
This commit is contained in:
George Tavares
2017-12-20 15:34:34 -02:00
committed by Duarte Nunes
parent dfe48bbbc7
commit ceecd542cd
2 changed files with 39 additions and 2 deletions

View File

@@ -636,8 +636,10 @@ future<stop_iteration> view_update_builder::on_results() {
}
// If we have updates and it's a range tombstone, it removes nothing pre-exisiting, so we can ignore it
if (_update && _update->is_clustering_row()) {
generate_update(std::move(*_update).as_clustering_row(), { });
if (_update) {
if (_update->is_clustering_row()) {
generate_update(std::move(*_update).as_clustering_row(), { });
}
return advance_updates();
}