mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Fix crash on start
This commit is contained in:
parent
9a546b5414
commit
db984d92a8
@ -50,19 +50,22 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class StringHolder {
|
||||
protected:
|
||||
std::string ss;
|
||||
};
|
||||
|
||||
/// Creates the string by itself and allows to get it.
|
||||
class WriteBufferFromOwnString : public WriteBufferFromString
|
||||
class WriteBufferFromOwnString : public StringHolder, public WriteBufferFromString
|
||||
{
|
||||
private:
|
||||
std::string s;
|
||||
|
||||
public:
|
||||
WriteBufferFromOwnString() : WriteBufferFromString(s) {}
|
||||
WriteBufferFromOwnString() : WriteBufferFromString(ss) {}
|
||||
|
||||
std::string & str()
|
||||
{
|
||||
finish();
|
||||
return s;
|
||||
return ss;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user