1
0
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:
David Hall
2020-06-08 17:19:07 -05:00
parent 938ee6d308
commit d289c30521
10 changed files with 25 additions and 34 deletions

View File

@ -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 <stdexcept>
@ -80,6 +77,10 @@ using namespace rowgroup;
#include "idbregistry.h"
#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
#if 1
//We are unlikely to ever get anything more out of this connection, so bail out

View File

@ -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>
@ -33,6 +29,12 @@
#include "objectreader.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 std;

View File

@ -17,10 +17,6 @@
MA 02110-1301, USA. */
//#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 <string>
@ -90,6 +86,10 @@ using namespace execplan;
#include "functor.h"
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 SUB_BIT = 0x02;
const uint64_t AF_BIT = 0x04;

View File

@ -19,11 +19,6 @@
* $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 <boost/scoped_array.hpp>
#include <boost/algorithm/string/trim.hpp>
@ -39,6 +34,11 @@ using namespace std;
#include "dataconvert.h"
#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;
const char* nullString = " "; // this is not NULL to preempt segfaults.

View File

@ -35,8 +35,6 @@ using namespace rowgroup;
#include "dataconvert.h"
using namespace dataconvert;
#define STRCOLL_ENH__
namespace funcexp
{

View File

@ -35,8 +35,6 @@ using namespace execplan;
#include "rowgroup.h"
using namespace rowgroup;
#define STRCOLL_ENH__
namespace funcexp
{

View File

@ -40,8 +40,6 @@ using namespace joblist;
#include "utf8.h"
using namespace utf8;
#define STRCOLL_ENH__
namespace funcexp
{

View File

@ -39,8 +39,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#define STRCOLL_ENH__
namespace funcexp
{
const string Func_lpad::fPad = " ";
@ -90,7 +88,7 @@ std::string Func_lpad::getStrVal(rowgroup::Row& row,
}
// The pad characters.
const string* pad = &fPad;
const string* pad = &fPad; // Defaults to space
if (fp.size() > 2)
{
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();
// plen = the number of characters in pad
size_t plen = cs->numchars(posP, posP+binPLen);
if (plen == 0 || plen > strLen)
if (plen == 0)
return src;
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)
{
memcpy(pBuf, posP, plen);
memcpy(pBuf, posP, binPLen);
padLength -= plen;
byteCount += plen;
pBuf += plen;
byteCount += binPLen;
pBuf += binPLen;
}
// Sometimes, in a case with multi-char pad, we need to add a partial pad
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);
byteCount += partialSize;
pBuf += partialSize;

View File

@ -34,8 +34,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#define STRCOLL_ENH__
namespace
{

View File

@ -38,8 +38,6 @@ using namespace rowgroup;
#include "joblisttypes.h"
using namespace joblist;
#define STRCOLL_ENH__
namespace funcexp
{