1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-09-02 12:41:17 +03:00

Merge pull request #470 from mariadb-corporation/MCOL-1390

MCOL-1390 Fix SUBSTRING_INDEX for negative count
This commit is contained in:
David.Hall
2018-05-10 15:46:18 -05:00
committed by GitHub

View File

@@ -71,6 +71,9 @@ std::string Func_substring_index::getStrVal(rowgroup::Row& row,
if ( count > (int64_t) end )
return str;
if (( count < 0 ) && ((count * -1) > end))
return str;
string value = str;
if ( count > 0 ) {