mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
ISSUES-16605 try fix review comment
This commit is contained in:
parent
0985029f49
commit
ade04b5dc4
@ -328,8 +328,15 @@ void MySQLHandler::comQuery(ReadBuffer & payload)
|
||||
|
||||
Context query_context = connection_context;
|
||||
|
||||
size_t affected_rows = 0;
|
||||
query_context.setProgressCallback([&](const Progress & progress) { affected_rows += progress.written_rows; });
|
||||
std::atomic<size_t> affected_rows {0};
|
||||
auto prev = query_context.getProgressCallback();
|
||||
query_context.setProgressCallback([&, prev = prev](const Progress & progress)
|
||||
{
|
||||
if (prev)
|
||||
prev(progress);
|
||||
|
||||
affected_rows += progress.written_rows;
|
||||
});
|
||||
|
||||
executeQuery(should_replace ? replacement : payload, *out, true, query_context,
|
||||
[&with_output](const String &, const String &, const String &, const String &)
|
||||
|
Loading…
Reference in New Issue
Block a user