**Describe what's wrong**
Query in clickhouse-client may fail with options `--send_logs_level=trace --server_logs_file=-` (`--server_logs_file=-` means write server logs to stdout).

**How to reproduce**

```
while true; do clickhouse-client -q "select 1" --send_logs_level=trace --server_logs_file=- >log; done
Code: 75. DB::ErrnoException: Cannot write to file (fd = 1), errno: 14, strerror: Bad address: (in query: select 1). (CANNOT_WRITE_TO_FILE_DESCRIPTOR)

Code: 75. DB::ErrnoException: Cannot write to file (fd = 1), errno: 14, strerror: Bad address: (in query: select 1). (CANNOT_WRITE_TO_FILE_DESCRIPTOR)

Code: 75. DB::ErrnoException: Cannot write to file (fd = 1), errno: 14, strerror: Bad address: (in query: select 1). (CANNOT_WRITE_TO_FILE_DESCRIPTOR)
```

Some queries will fail periodically.


}
        }
        logs_out_stream = std::make_unique<InternalTextLogs>(*wb, color_logs);
    }
}
void ClientBase::updateSuggest(const ASTPtr & ast)
{
    std::vector<std::string> new_words;
    if (auto * create = ast->as<ASTCreateQuery>())
    {
        if (create->database)
            new_words.push_back(create->getDatabase());
        new_words.push_back(create->getTable());
        if (create->columns_list && create->columns_list->columns)
        {
            for (const auto & elem : create->columns_list->columns->children)
            {
                if (const auto * column = elem->as<ASTColumnDeclaration>())
                    new_words.push_back(column->name);
            }
        }
    }
    if (const auto * create_function = ast->as<ASTCreateFunctionQuery>())
    {
        new_words.push_back(create_function->getFunctionName());
    }
    if (!new_words.empty())
        suggest->addWords(std::move(new_words));
}
bool ClientBase::isSyncInsertWithData(const ASTInsertQuery & insert_query, const ContextPtr & context)