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-3536 Collation
This commit is contained in:
@ -21,9 +21,6 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
#include <mariadb.h>
|
|
||||||
#undef set_bits // mariadb.h defines set_bits, which is incompatible with boost
|
|
||||||
#include <my_sys.h>
|
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
@ -80,6 +77,10 @@ using namespace rowgroup;
|
|||||||
#include "idbregistry.h"
|
#include "idbregistry.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <mariadb.h>
|
||||||
|
#undef set_bits // mariadb.h defines set_bits, which is incompatible with boost
|
||||||
|
#include <my_sys.h>
|
||||||
|
|
||||||
#undef BAIL_IF_0
|
#undef BAIL_IF_0
|
||||||
#if 1
|
#if 1
|
||||||
//We are unlikely to ever get anything more out of this connection, so bail out
|
//We are unlikely to ever get anything more out of this connection, so bail out
|
||||||
|
@ -21,10 +21,6 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
#include <mariadb.h>
|
|
||||||
#undef set_bits // mariadb.h defines set_bits, which is incompatible with boost
|
|
||||||
#include <my_sys.h>
|
|
||||||
#include <m_ctype.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -33,6 +29,12 @@
|
|||||||
#include "objectreader.h"
|
#include "objectreader.h"
|
||||||
|
|
||||||
#include "liboamcpp.h"
|
#include "liboamcpp.h"
|
||||||
|
|
||||||
|
#include <mariadb.h>
|
||||||
|
#undef set_bits // mariadb.h defines set_bits, which is incompatible with boost
|
||||||
|
#include <my_sys.h>
|
||||||
|
#include <m_ctype.h>
|
||||||
|
|
||||||
using namespace oam;
|
using namespace oam;
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -17,10 +17,6 @@
|
|||||||
MA 02110-1301, USA. */
|
MA 02110-1301, USA. */
|
||||||
|
|
||||||
//#define DEBUG_WALK_COND
|
//#define DEBUG_WALK_COND
|
||||||
#include <my_config.h>
|
|
||||||
#include <mariadb.h>
|
|
||||||
#undef set_bits // mariadb.h defines set_bits, which is incompatible with boost
|
|
||||||
#include <my_sys.h>
|
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -90,6 +86,10 @@ using namespace execplan;
|
|||||||
#include "functor.h"
|
#include "functor.h"
|
||||||
using namespace funcexp;
|
using namespace funcexp;
|
||||||
|
|
||||||
|
#include <mariadb.h>
|
||||||
|
#undef set_bits // mariadb.h defines set_bits, which is incompatible with boost
|
||||||
|
#include <my_sys.h>
|
||||||
|
|
||||||
const uint64_t AGG_BIT = 0x01;
|
const uint64_t AGG_BIT = 0x01;
|
||||||
const uint64_t SUB_BIT = 0x02;
|
const uint64_t SUB_BIT = 0x02;
|
||||||
const uint64_t AF_BIT = 0x04;
|
const uint64_t AF_BIT = 0x04;
|
||||||
|
@ -19,11 +19,6 @@
|
|||||||
* $Id: dictionary.cpp 2122 2013-07-08 16:33:50Z bpaul $
|
* $Id: dictionary.cpp 2122 2013-07-08 16:33:50Z bpaul $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mariadb.h>
|
|
||||||
#undef set_bits // mariadb.h defines set_bits, which is incompatible with boost
|
|
||||||
#include <my_sys.h>
|
|
||||||
#include <m_ctype.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <boost/scoped_array.hpp>
|
#include <boost/scoped_array.hpp>
|
||||||
#include <boost/algorithm/string/trim.hpp>
|
#include <boost/algorithm/string/trim.hpp>
|
||||||
@ -39,6 +34,11 @@ using namespace std;
|
|||||||
#include "dataconvert.h"
|
#include "dataconvert.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#include <mariadb.h>
|
||||||
|
#undef set_bits // mariadb.h defines set_bits, which is incompatible with boost
|
||||||
|
#include <my_sys.h>
|
||||||
|
#include <m_ctype.h>
|
||||||
|
|
||||||
using namespace logging;
|
using namespace logging;
|
||||||
|
|
||||||
const char* nullString = " "; // this is not NULL to preempt segfaults.
|
const char* nullString = " "; // this is not NULL to preempt segfaults.
|
||||||
|
@ -35,8 +35,6 @@ using namespace rowgroup;
|
|||||||
#include "dataconvert.h"
|
#include "dataconvert.h"
|
||||||
using namespace dataconvert;
|
using namespace dataconvert;
|
||||||
|
|
||||||
#define STRCOLL_ENH__
|
|
||||||
|
|
||||||
namespace funcexp
|
namespace funcexp
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -35,8 +35,6 @@ using namespace execplan;
|
|||||||
#include "rowgroup.h"
|
#include "rowgroup.h"
|
||||||
using namespace rowgroup;
|
using namespace rowgroup;
|
||||||
|
|
||||||
#define STRCOLL_ENH__
|
|
||||||
|
|
||||||
namespace funcexp
|
namespace funcexp
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -40,8 +40,6 @@ using namespace joblist;
|
|||||||
#include "utf8.h"
|
#include "utf8.h"
|
||||||
using namespace utf8;
|
using namespace utf8;
|
||||||
|
|
||||||
#define STRCOLL_ENH__
|
|
||||||
|
|
||||||
namespace funcexp
|
namespace funcexp
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -39,8 +39,6 @@ using namespace rowgroup;
|
|||||||
#include "joblisttypes.h"
|
#include "joblisttypes.h"
|
||||||
using namespace joblist;
|
using namespace joblist;
|
||||||
|
|
||||||
#define STRCOLL_ENH__
|
|
||||||
|
|
||||||
namespace funcexp
|
namespace funcexp
|
||||||
{
|
{
|
||||||
const string Func_lpad::fPad = " ";
|
const string Func_lpad::fPad = " ";
|
||||||
@ -90,7 +88,7 @@ std::string Func_lpad::getStrVal(rowgroup::Row& row,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The pad characters.
|
// The pad characters.
|
||||||
const string* pad = &fPad;
|
const string* pad = &fPad; // Defaults to space
|
||||||
if (fp.size() > 2)
|
if (fp.size() > 2)
|
||||||
{
|
{
|
||||||
pad = &fp[2]->data()->getStrVal(row, isNull);
|
pad = &fp[2]->data()->getStrVal(row, isNull);
|
||||||
@ -100,7 +98,7 @@ std::string Func_lpad::getStrVal(rowgroup::Row& row,
|
|||||||
const char* posP = pad->c_str();
|
const char* posP = pad->c_str();
|
||||||
// plen = the number of characters in pad
|
// plen = the number of characters in pad
|
||||||
size_t plen = cs->numchars(posP, posP+binPLen);
|
size_t plen = cs->numchars(posP, posP+binPLen);
|
||||||
if (plen == 0 || plen > strLen)
|
if (plen == 0)
|
||||||
return src;
|
return src;
|
||||||
|
|
||||||
size_t byteCount = (padLength+1) * cs->mbmaxlen; // absolute maximun number of bytes
|
size_t byteCount = (padLength+1) * cs->mbmaxlen; // absolute maximun number of bytes
|
||||||
@ -112,15 +110,15 @@ std::string Func_lpad::getStrVal(rowgroup::Row& row,
|
|||||||
|
|
||||||
while (padLength >= plen)
|
while (padLength >= plen)
|
||||||
{
|
{
|
||||||
memcpy(pBuf, posP, plen);
|
memcpy(pBuf, posP, binPLen);
|
||||||
padLength -= plen;
|
padLength -= plen;
|
||||||
byteCount += plen;
|
byteCount += binPLen;
|
||||||
pBuf += plen;
|
pBuf += binPLen;
|
||||||
}
|
}
|
||||||
// Sometimes, in a case with multi-char pad, we need to add a partial pad
|
// Sometimes, in a case with multi-char pad, we need to add a partial pad
|
||||||
if (padLength > 0)
|
if (padLength > 0)
|
||||||
{
|
{
|
||||||
size_t partialSize = cs->charpos(posP, posP+plen, padLength);
|
size_t partialSize = cs->charpos(posP, posP+binPLen, padLength);
|
||||||
memcpy(pBuf, posP, partialSize);
|
memcpy(pBuf, posP, partialSize);
|
||||||
byteCount += partialSize;
|
byteCount += partialSize;
|
||||||
pBuf += partialSize;
|
pBuf += partialSize;
|
||||||
|
@ -34,8 +34,6 @@ using namespace rowgroup;
|
|||||||
#include "joblisttypes.h"
|
#include "joblisttypes.h"
|
||||||
using namespace joblist;
|
using namespace joblist;
|
||||||
|
|
||||||
#define STRCOLL_ENH__
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -38,8 +38,6 @@ using namespace rowgroup;
|
|||||||
#include "joblisttypes.h"
|
#include "joblisttypes.h"
|
||||||
using namespace joblist;
|
using namespace joblist;
|
||||||
|
|
||||||
#define STRCOLL_ENH__
|
|
||||||
|
|
||||||
namespace funcexp
|
namespace funcexp
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user