in squangle/mysql_client/DbResult.cpp [326:339]
void MultiQueryStreamHandler::fetchQueryEnd(StreamedQueryResult* result) {
checkStreamedQueryResult(result);
connection()->wait();
// Accepted states: ReadResult, OperationFailed
if (state_ == State::ReadResult) {
handleQueryEnded(result);
} else if (state_ == State::OperationFailed) {
handleQueryFailed(result);
} else if (state_ != State::ReadRows || fetchOneRow(result)) {
LOG(DFATAL) << "Expected end of query, but received " << toString(state_)
<< ".";
handleBadState();
}
}