Skip to content
Snippets Groups Projects
Commit 310abffa authored by Thomas Blum's avatar Thomas Blum
Browse files

Fix bug in update

parent 4c3fcaf1
No related branches found
No related tags found
No related merge requests found
Pipeline #38649 failed
......@@ -234,7 +234,7 @@ namespace semanticalAnalysis {
construct_join(context, firstVertexName);
if (context.joinedTree == nullptr)
throw std::runtime_error("no or more than one root found: Table joining has failed");
throw semantic_sql_error("no or more than one root found: Table joining has failed");
}
}
\ No newline at end of file
......@@ -50,8 +50,10 @@ namespace semanticalAnalysis {
bool shouldBeUpdated = false;
for (auto &[column,value] : stmt->updates) {
shouldBeUpdated = iu.first.compare(column.name) == 0;
if (shouldBeUpdated) updateIUs.emplace_back( iu.second,value);
break;
if (shouldBeUpdated) {
updateIUs.emplace_back( iu.second,value);
break;
}
}
if (!shouldBeUpdated) updateIUs.emplace_back( iu.second,"");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment