You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
MCOL-642 Separate TEXT from BLOB
* TEXT and BLOB now have separate identifiers internally * TEXT columns are identified as such in system catalog * cpimport only requires hex input for BLOB, not TEXT
This commit is contained in:
@@ -18,6 +18,7 @@ select
|
||||
when 12 then 'VARCHAR'
|
||||
when 13 then 'CLOB'
|
||||
when 14 then 'BLOB'
|
||||
when 15 then 'TEXT'
|
||||
end DATATYPE,
|
||||
SCALE, PREC, COLUMNLENGTH COLLEN, COLUMNPOSITION POS, COMPRESSIONTYPE CT
|
||||
from
|
||||
|
@@ -182,6 +182,10 @@ uint32_t convertDataType(int dataType)
|
||||
calpontDataType = CalpontSystemCatalog::BLOB;
|
||||
break;
|
||||
|
||||
case ddlpackage::DDL_TEXT:
|
||||
calpontDataType = CalpontSystemCatalog::TEXT;
|
||||
break;
|
||||
|
||||
case ddlpackage::DDL_UNSIGNED_TINYINT:
|
||||
calpontDataType = CalpontSystemCatalog::UTINYINT;
|
||||
break;
|
||||
|
@@ -1586,6 +1586,7 @@ int ha_calpont_impl_write_batch_row_(uchar *buf, TABLE* table, cal_impl_if::cal_
|
||||
break;
|
||||
}
|
||||
case CalpontSystemCatalog::BLOB:
|
||||
case CalpontSystemCatalog::TEXT:
|
||||
{
|
||||
int dataLength = 0;
|
||||
uintptr_t *dataptr;
|
||||
@@ -1621,7 +1622,15 @@ int ha_calpont_impl_write_batch_row_(uchar *buf, TABLE* table, cal_impl_if::cal_
|
||||
buf+= sizeof(uintptr_t);
|
||||
for (int32_t i=0; i<dataLength; i++)
|
||||
{
|
||||
fprintf(ci.filePtr, "%02x", *(uint8_t*)ucharptr);
|
||||
if (ci.columnTypes[colpos].colDataType == CalpontSystemCatalog::BLOB)
|
||||
{
|
||||
fprintf(ci.filePtr, "%02x", *(uint8_t*)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);
|
||||
|
@@ -624,6 +624,7 @@ int fetchNextRow(uchar *buf, cal_table_info& ti, cal_connection_info* ci)
|
||||
break;
|
||||
}
|
||||
case CalpontSystemCatalog::BLOB:
|
||||
case CalpontSystemCatalog::TEXT:
|
||||
{
|
||||
Field_blob *f2 = (Field_blob*)*f;
|
||||
f2->set_ptr(row.getVarBinaryLength(s), (unsigned char*)row.getVarBinaryField(s));
|
||||
|
@@ -141,6 +141,8 @@ string name(CalpontSystemCatalog::ColType& ct)
|
||||
return "VARBINARY";
|
||||
case CalpontSystemCatalog::BLOB:
|
||||
return "BLOB";
|
||||
case CalpontSystemCatalog::TEXT:
|
||||
return "TEXT";
|
||||
case CalpontSystemCatalog::CLOB:
|
||||
return "CLOB";
|
||||
case CalpontSystemCatalog::UINT:
|
||||
@@ -318,6 +320,7 @@ const int64_t IDB_format(char* str, CalpontSystemCatalog::ColType& ct, uint8_t&
|
||||
case CalpontSystemCatalog::VARCHAR:
|
||||
case CalpontSystemCatalog::VARBINARY:
|
||||
case CalpontSystemCatalog::BLOB:
|
||||
case CalpontSystemCatalog::TEXT:
|
||||
case CalpontSystemCatalog::CLOB:
|
||||
{
|
||||
string i = boost::any_cast<string>(anyVal);
|
||||
|
@@ -267,6 +267,7 @@ ReturnedColumn* buildWindowFunctionColumn(Item* item, gp_walk_info& gwi, bool& n
|
||||
case CalpontSystemCatalog::VARCHAR:
|
||||
case CalpontSystemCatalog::VARBINARY:
|
||||
case CalpontSystemCatalog::BLOB:
|
||||
case CalpontSystemCatalog::TEXT:
|
||||
case CalpontSystemCatalog::CLOB:
|
||||
boundTypeErr = true;
|
||||
break;
|
||||
@@ -309,6 +310,7 @@ ReturnedColumn* buildWindowFunctionColumn(Item* item, gp_walk_info& gwi, bool& n
|
||||
case CalpontSystemCatalog::VARCHAR:
|
||||
case CalpontSystemCatalog::VARBINARY:
|
||||
case CalpontSystemCatalog::BLOB:
|
||||
case CalpontSystemCatalog::TEXT:
|
||||
case CalpontSystemCatalog::CLOB:
|
||||
boundTypeErr = true;
|
||||
break;
|
||||
@@ -358,6 +360,7 @@ ReturnedColumn* buildWindowFunctionColumn(Item* item, gp_walk_info& gwi, bool& n
|
||||
case CalpontSystemCatalog::VARCHAR:
|
||||
case CalpontSystemCatalog::VARBINARY:
|
||||
case CalpontSystemCatalog::BLOB:
|
||||
case CalpontSystemCatalog::TEXT:
|
||||
case CalpontSystemCatalog::CLOB:
|
||||
orderTypeErr = true;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user