1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

MCOL-3536 collation

This commit is contained in:
David Hall
2020-06-04 16:15:06 -05:00
parent 889094a23d
commit bacd81d32a
11 changed files with 349 additions and 552 deletions

View File

@@ -20,6 +20,9 @@
*
*
****************************************************************************/
#include <mariadb.h>
#undef set_bits // mariadb.h defines set_bits, which is incompatible with boost
#include <my_sys.h>
#include <string>
using namespace std;
@@ -47,13 +50,16 @@ CalpontSystemCatalog::ColType Func_concat_ws::operationType(FunctionParm& fp, Ca
string Func_concat_ws::getStrVal(Row& row,
FunctionParm& parm,
bool& isNull,
CalpontSystemCatalog::ColType&)
CalpontSystemCatalog::ColType& type)
{
string delim;
stringValue(parm[0], row, isNull, delim);
if (isNull)
return "";
// TODO: I don't think we need wide chars here.
// Concatenation works without see Server implementation.
#if 0
wstring wstr;
size_t strwclen = utf8::idb_mbstowcs(0, delim.c_str(), 0) + 1;
wchar_t* wcbuf = new wchar_t[strwclen];
@@ -94,10 +100,11 @@ string Func_concat_ws::getStrVal(Row& row,
delete [] outbuf;
delete [] wcbuf;
return ret;
#if 0
#endif
string str;
string tmp;
// Work on reallocation. use std::string::resize() to
// grab larger chunks in some intellegent manner.
for ( uint32_t i = 1 ; i < parm.size() ; i++)
{
stringValue(parm[i], row, isNull, tmp);
@@ -119,7 +126,6 @@ string Func_concat_ws::getStrVal(Row& row,
isNull = false;
return str;
#endif
}