You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-02 17:22:27 +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>
|
||||
using namespace std;
|
||||
@ -52,11 +56,6 @@ inline bool numericEQ(result_t op1, result_t op2)
|
||||
return op1 == op2;
|
||||
}
|
||||
|
||||
inline bool strEQ(string op1, string op2)
|
||||
{
|
||||
return utf8::idb_strcoll(op1.c_str(), op2.c_str()) == 0;
|
||||
}
|
||||
|
||||
inline bool getBoolForIn(rowgroup::Row& row,
|
||||
funcexp::FunctionParm& pm,
|
||||
bool& isNull,
|
||||
@ -273,15 +272,16 @@ inline bool getBoolForIn(rowgroup::Row& row,
|
||||
case execplan::CalpontSystemCatalog::TEXT:
|
||||
{
|
||||
const string& val = pm[0]->data()->getStrVal(row, isNull);
|
||||
|
||||
if (isNull)
|
||||
return false;
|
||||
|
||||
CHARSET_INFO* cs = pm[0]->data()->resultType().getCharset();
|
||||
|
||||
for (uint32_t i = 1; i < pm.size(); i++)
|
||||
{
|
||||
isNull = false;
|
||||
|
||||
if ( utf8::idb_strcoll(val.c_str(), pm[i]->data()->getStrVal(row, isNull).c_str()) == 0 && !isNull)
|
||||
const string& str1 = pm[i]->data()->getStrVal(row, isNull);
|
||||
if (cs->strnncoll(val.c_str(), val.length(), str1.c_str(), str1.length()) == 0 && !isNull)
|
||||
return true;
|
||||
|
||||
if (isNull && isNotIn)
|
||||
|
Reference in New Issue
Block a user