You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-4099 Fix up first char insertion
This commit is contained in:
@ -73,8 +73,6 @@ std::string Func_insert::getStrVal(rowgroup::Row& row,
|
|||||||
if (isNull)
|
if (isNull)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
start--; // Because SQL syntax is 1 based and we want 0 based.
|
|
||||||
|
|
||||||
CHARSET_INFO* cs = fp[0]->data()->resultType().getCharset();
|
CHARSET_INFO* cs = fp[0]->data()->resultType().getCharset();
|
||||||
|
|
||||||
// binLen represents the number of bytes
|
// binLen represents the number of bytes
|
||||||
@ -91,6 +89,8 @@ std::string Func_insert::getStrVal(rowgroup::Row& row,
|
|||||||
if ((length < 0) || (length > strLen))
|
if ((length < 0) || (length > strLen))
|
||||||
length = strLen;
|
length = strLen;
|
||||||
|
|
||||||
|
start--; // Because SQL syntax is 1 based and we want 0 based.
|
||||||
|
|
||||||
// Convert start and length from characters to bytes.
|
// Convert start and length from characters to bytes.
|
||||||
start = cs->charpos(pos, end, start);
|
start = cs->charpos(pos, end, start);
|
||||||
length = cs->charpos(pos+start, end, length);
|
length = cs->charpos(pos+start, end, length);
|
||||||
|
Reference in New Issue
Block a user