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
Merge branch 'develop-1.1' into develop-1.2-merge-up-20190619
This commit is contained in:
@ -862,6 +862,12 @@ int ha_calpont_impl_write_batch_row_(uchar* buf, TABLE* table, cal_impl_if::cal_
|
||||
|
||||
case CalpontSystemCatalog::VARCHAR:
|
||||
{
|
||||
size_t length;
|
||||
if (ci.utf8)
|
||||
length = (ci.columnTypes[colpos].colWidth * 3);
|
||||
else
|
||||
length = ci.columnTypes[colpos].colWidth;
|
||||
|
||||
if (nullVal && (ci.columnTypes[colpos].constraintType != CalpontSystemCatalog::NOTNULL_CONSTRAINT))
|
||||
{
|
||||
fprintf(ci.filePtr, "%c", ci.delimiter);
|
||||
@ -905,7 +911,7 @@ int ha_calpont_impl_write_batch_row_(uchar* buf, TABLE* table, cal_impl_if::cal_
|
||||
dataLength = *(uint16_t*) buf;
|
||||
buf = buf + 2 ;
|
||||
}
|
||||
|
||||
length = dataLength;
|
||||
escape.assign((char*)buf, dataLength);
|
||||
boost::replace_all(escape, "\\", "\\\\");
|
||||
fprintf(ci.filePtr, "%c%.*s%c%c", ci.enclosed_by, (int)escape.length(), escape.c_str(), ci.enclosed_by, ci.delimiter);
|
||||
@ -922,9 +928,7 @@ int ha_calpont_impl_write_batch_row_(uchar* buf, TABLE* table, cal_impl_if::cal_
|
||||
dataLength = *(uint16_t*) buf;
|
||||
buf = buf + 2 ;
|
||||
}
|
||||
|
||||
if ( dataLength > ci.columnTypes[colpos].colWidth)
|
||||
dataLength = ci.columnTypes[colpos].colWidth;
|
||||
length = dataLength;
|
||||
|
||||
escape.assign((char*)buf, dataLength);
|
||||
boost::replace_all(escape, "\\", "\\\\");
|
||||
@ -932,12 +936,7 @@ int ha_calpont_impl_write_batch_row_(uchar* buf, TABLE* table, cal_impl_if::cal_
|
||||
fprintf(ci.filePtr, "%c%.*s%c%c", ci.enclosed_by, (int)escape.length(), escape.c_str(), ci.enclosed_by, ci.delimiter);
|
||||
}
|
||||
}
|
||||
|
||||
//buf += ci.columnTypes[colpos].colWidth;
|
||||
if (ci.utf8)
|
||||
buf += (ci.columnTypes[colpos].colWidth * 3);
|
||||
else
|
||||
buf += ci.columnTypes[colpos].colWidth;
|
||||
buf += length;
|
||||
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user