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-669 TEXT cpimport fixes
* 64KB TEXT column had off-by-one length pointer counting * TEXT I_S/LDI was looping where it shouldn't causing pointer issues * TEXT data type wasn't fully understood by cpimport
This commit is contained in:
@ -153,11 +153,11 @@ public:
|
||||
UFLOAT, /*!< Unsigned FLOAT type */
|
||||
UBIGINT, /*!< Unsigned BIGINT type */
|
||||
UDOUBLE, /*!< Unsigned DOUBLE type */
|
||||
NUM_OF_COL_DATA_TYPE,
|
||||
TEXT, /*!< TEXT type */
|
||||
NUM_OF_COL_DATA_TYPE, /* NEW TYPES ABOVE HERE */
|
||||
LONGDOUBLE, /* @bug3241, dev and variance calculation only */
|
||||
STRINT, /* @bug3532, string as int for fast comparison */
|
||||
TEXT /*!< TEXT type */
|
||||
};
|
||||
STRINT /* @bug3532, string as int for fast comparison */
|
||||
};
|
||||
|
||||
/** the set of column constraint types
|
||||
*
|
||||
|
@ -1597,7 +1597,7 @@ int ha_calpont_impl_write_batch_row_(uchar *buf, TABLE* table, cal_impl_if::cal_
|
||||
dataLength = *(int8_t*) buf;
|
||||
buf++;
|
||||
}
|
||||
else if (ci.columnTypes[colpos].colWidth < 65535)
|
||||
else if (ci.columnTypes[colpos].colWidth < 65536)
|
||||
{
|
||||
dataLength = *(int16_t*) buf;
|
||||
buf = buf + 2 ;
|
||||
@ -1620,20 +1620,20 @@ int ha_calpont_impl_write_batch_row_(uchar *buf, TABLE* table, cal_impl_if::cal_
|
||||
dataptr = (uintptr_t*)buf;
|
||||
ucharptr = (uchar*)*dataptr;
|
||||
buf+= sizeof(uintptr_t);
|
||||
for (int32_t i=0; i<dataLength; i++)
|
||||
if (ci.columnTypes[colpos].colDataType == CalpontSystemCatalog::BLOB)
|
||||
{
|
||||
if (ci.columnTypes[colpos].colDataType == CalpontSystemCatalog::BLOB)
|
||||
for (int32_t i=0; i<dataLength; i++)
|
||||
{
|
||||
fprintf(ci.filePtr, "%02x", *(uint8_t*)ucharptr);
|
||||
ucharptr++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// TEXT Column
|
||||
fprintf(ci.filePtr, "%c%.*s%c%c", ci.enclosed_by, dataLength, ucharptr, ci.enclosed_by, ci.delimiter);
|
||||
}
|
||||
ucharptr++;
|
||||
fprintf(ci.filePtr, "%c", ci.delimiter);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TEXT Column
|
||||
fprintf(ci.filePtr, "%c%.*s%c%c", ci.enclosed_by, dataLength, ucharptr, ci.enclosed_by, ci.delimiter);
|
||||
}
|
||||
fprintf(ci.filePtr, "%c", ci.delimiter);
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -152,7 +152,8 @@ namespace WriteEngine
|
||||
"unsigned-int",
|
||||
"unsigned-float",
|
||||
"unsigned-bigint",
|
||||
"unsigned-double"
|
||||
"unsigned-double",
|
||||
"text"
|
||||
};
|
||||
|
||||
enum FuncType { FUNC_WRITE_ENGINE, FUNC_INDEX, FUNC_DICTIONARY };
|
||||
|
Reference in New Issue
Block a user