You've already forked mariadb-columnstore-engine
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:
@ -22,6 +22,10 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <mariadb.h>
|
||||
#undef set_bits // mariadb.h defines set_bits, which is incompatible with boost
|
||||
#include <my_sys.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
@ -148,6 +152,7 @@ std::string Func_greatest::getStrVal(rowgroup::Row& row,
|
||||
execplan::CalpontSystemCatalog::ColType& op_ct)
|
||||
{
|
||||
const string& str = fp[0]->data()->getStrVal(row, isNull);
|
||||
CHARSET_INFO* cs = fp[0]->data()->resultType().getCharset();
|
||||
|
||||
string greatestStr = str;
|
||||
|
||||
@ -155,12 +160,10 @@ std::string Func_greatest::getStrVal(rowgroup::Row& row,
|
||||
{
|
||||
const string& str1 = fp[i]->data()->getStrVal(row, isNull);
|
||||
|
||||
int tmp = utf8::idb_strcoll(greatestStr.c_str(), str1.c_str());
|
||||
|
||||
if ( tmp < 0 )
|
||||
|
||||
// if ( greatestStr < str1 )
|
||||
if (cs->strnncoll(greatestStr.c_str(), greatestStr.length(), str1.c_str(), str1.length()) < 0)
|
||||
{
|
||||
greatestStr = str1;
|
||||
}
|
||||
}
|
||||
|
||||
return greatestStr;
|
||||
|
Reference in New Issue
Block a user