1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

fix(rowgroup,stringstore): MCOL-5597 Set length for nullptr string to 0. (#3027)

This commit is contained in:
Denis Khalikov
2023-11-28 17:18:52 +03:00
committed by GitHub
parent 26f5f8fe5c
commit 76e4e13b80

View File

@ -33,7 +33,8 @@ class ConstString
public: public:
ConstString(const char* str, size_t length) : mStr(str), mLength(length) ConstString(const char* str, size_t length) : mStr(str), mLength(length)
{ {
idbassert(mStr || mLength == 0); // nullptr mStr should have zero length. if (!mStr)
mLength = 0;
} }
explicit ConstString(const std::string& str) : mStr(str.data()), mLength(str.length()) explicit ConstString(const std::string& str) : mStr(str.data()), mLength(str.length())
{ {