1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-3536 collation

This commit is contained in:
David Hall
2020-06-08 16:09:46 -05:00
parent 236b92d706
commit 938ee6d308
3 changed files with 23 additions and 22 deletions

View File

@ -88,7 +88,7 @@ std::string Func_insert::getStrVal(rowgroup::Row& row,
int64_t strLen = cs->numchars(pos, end);
// Return the original string if start isn't within the string.
if ((start <= 1) || start >= strLen)
if ((start < 1) || start >= strLen)
return src;
if ((length < 0) || (length > strLen))
@ -103,7 +103,8 @@ std::string Func_insert::getStrVal(rowgroup::Row& row,
out.append(src.c_str(), start);
out.append(tnewstr.c_str(), tnewstr.length());
out.append(src.c_str() + start + length, binLen - start - length);
if (binLen - start - length > 0)
out.append(src.c_str() + start + length, binLen - start - length);
return out;
}