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
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;
|
||||
}
|
||||
|
@@ -2183,7 +2183,14 @@ SimpleColumn* buildSimpleColFromDerivedTable(gp_walk_info& gwi, Item_field* ifp)
|
||||
sc->colPosition(j);
|
||||
string tableAlias(csep->derivedTbAlias());
|
||||
sc->tableAlias(lower(tableAlias));
|
||||
sc->viewName(lower(viewName));
|
||||
if (!viewName.empty())
|
||||
{
|
||||
sc->viewName(viewName);
|
||||
}
|
||||
else
|
||||
{
|
||||
sc->viewName(csep->derivedTbView());
|
||||
}
|
||||
sc->resultType(cols[j]->resultType());
|
||||
sc->hasAggregate(cols[j]->hasAggregate());
|
||||
|
||||
|
@@ -649,7 +649,11 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, bool h
|
||||
// bug 3485, reserve enough space for the longest float value
|
||||
// -3.402823466E+38 to -1.175494351E-38, 0, and
|
||||
// 1.175494351E-38 to 3.402823466E+38.
|
||||
(*f)->field_length = 40;
|
||||
if (!f2->dec)
|
||||
{
|
||||
(*f)->field_length = 40;
|
||||
f2->dec = row.getScale(s);
|
||||
}
|
||||
|
||||
//float float_val = *(float*)(&value);
|
||||
//f2->store(float_val);
|
||||
@@ -679,7 +683,11 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, bool h
|
||||
// bug 3483, reserve enough space for the longest double value
|
||||
// -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and
|
||||
// 2.2250738585072014E-308 to 1.7976931348623157E+308.
|
||||
(*f)->field_length = 310;
|
||||
if (!f2->dec)
|
||||
{
|
||||
(*f)->field_length = 310;
|
||||
f2->dec = row.getScale(s);
|
||||
}
|
||||
|
||||
//double double_val = *(double*)(&value);
|
||||
//f2->store(double_val);
|
||||
|
@@ -338,6 +338,7 @@ SCSEP FromSubQuery::transform()
|
||||
gwi.subQuery = this;
|
||||
gwi.viewName = fGwip.viewName;
|
||||
csep->derivedTbAlias(fAlias); // always lower case
|
||||
csep->derivedTbView(fGwip.viewName.alias);
|
||||
|
||||
if (getSelectPlan(gwi, *fFromSub, csep) != 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user