You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
Merge branch 'develop' into MCOL-3536
This commit is contained in:
@ -294,24 +294,10 @@ extern "C"
|
||||
|
||||
try
|
||||
{
|
||||
if (getenv("SKIP_OAM_INIT"))
|
||||
if (dbrm.getSystemReady()
|
||||
&& dbrm.getSystemQueryReady())
|
||||
{
|
||||
if (dbrm.getSystemReady()
|
||||
&& dbrm.getSystemQueryReady())
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
oam.getSystemStatus(systemstatus);
|
||||
|
||||
if (systemstatus.SystemOpState == ACTIVE
|
||||
&& dbrm.getSystemReady()
|
||||
&& dbrm.getSystemQueryReady())
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
|
@ -891,7 +891,11 @@ int ha_mcs_impl_write_batch_row_(const uchar* buf, TABLE* table, cal_impl_if::ca
|
||||
if (current_thd->variables.sql_mode & MODE_PAD_CHAR_TO_FULL_LENGTH)
|
||||
{
|
||||
// Pad to the full length of the field
|
||||
escape.assign((char*)buf, ci.columnTypes[colpos].colWidth);
|
||||
if (ci.utf8)
|
||||
escape.assign((char*)buf, ci.columnTypes[colpos].colWidth * 3);
|
||||
else
|
||||
escape.assign((char*)buf, ci.columnTypes[colpos].colWidth);
|
||||
|
||||
boost::replace_all(escape, "\\", "\\\\");
|
||||
|
||||
fprintf(ci.filePtr, "%c%.*s%c%c", ci.enclosed_by, (int)escape.length(),
|
||||
@ -904,8 +908,10 @@ int ha_mcs_impl_write_batch_row_(const uchar* buf, TABLE* table, cal_impl_if::ca
|
||||
bitmap_set_bit(table->read_set, field->field_index);
|
||||
String attribute;
|
||||
field->val_str(&attribute);
|
||||
|
||||
escape.assign((char*)buf, attribute.length());
|
||||
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);
|
||||
}
|
||||
@ -1777,32 +1783,35 @@ int ha_mcs_impl_write_batch_row_(const uchar* buf, TABLE* table, cal_impl_if::ca
|
||||
case CalpontSystemCatalog::BLOB:
|
||||
case CalpontSystemCatalog::TEXT:
|
||||
{
|
||||
// MCOL-4005 Note that we don't handle nulls as a special
|
||||
// case here as we do for other datatypes, the below works
|
||||
// as expected for nulls.
|
||||
uint32_t dataLength = 0;
|
||||
uintptr_t* dataptr;
|
||||
uchar* ucharptr;
|
||||
uint colWidthInBytes = (ci.utf8 ?
|
||||
ci.columnTypes[colpos].colWidth * 3: ci.columnTypes[colpos].colWidth);
|
||||
|
||||
if (ci.columnTypes[colpos].colWidth < 256)
|
||||
if (colWidthInBytes < 256)
|
||||
{
|
||||
dataLength = *(uint8_t*) buf;
|
||||
buf++;
|
||||
}
|
||||
else if (ci.columnTypes[colpos].colWidth < 65536)
|
||||
else if (colWidthInBytes < 65536)
|
||||
{
|
||||
dataLength = *(uint16_t*) buf;
|
||||
buf = buf + 2 ;
|
||||
buf += 2;
|
||||
}
|
||||
else if (ci.columnTypes[colpos].colWidth < 16777216)
|
||||
else if (colWidthInBytes < 16777216)
|
||||
{
|
||||
dataLength = *(uint16_t*) buf;
|
||||
buf = buf + 2 ;
|
||||
if (*(uint8_t*)buf)
|
||||
dataLength += 256*256*(*(uint8_t*)buf) ;
|
||||
buf++;
|
||||
dataLength = *(uint16_t*) buf;
|
||||
dataLength |= ((int) buf[2]) << 16;
|
||||
buf += 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
dataLength = *(uint32_t*) buf;
|
||||
buf = buf + 4 ;
|
||||
buf += 4;
|
||||
}
|
||||
|
||||
// buf contains pointer to blob, for example:
|
||||
@ -1826,7 +1835,9 @@ int ha_mcs_impl_write_batch_row_(const uchar* buf, TABLE* table, cal_impl_if::ca
|
||||
else
|
||||
{
|
||||
// TEXT Column
|
||||
fprintf(ci.filePtr, "%c%.*s%c%c", ci.enclosed_by, dataLength, ucharptr, ci.enclosed_by, ci.delimiter);
|
||||
escape.assign((char*)ucharptr, 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);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -1308,7 +1308,7 @@ uint32_t buildOuterJoin(gp_walk_info& gwi, SELECT_LEX& select_lex)
|
||||
// View is already processed in view::transform
|
||||
// @bug5319. view is sometimes treated as derived table and
|
||||
// fromSub::transform does not build outer join filters.
|
||||
if (!table_ptr->derived && table_ptr->view)
|
||||
if (!table_ptr->derived && table_ptr->view && !gwi.subQuery)
|
||||
continue;
|
||||
|
||||
CalpontSystemCatalog:: TableAliasName tan = make_aliasview(
|
||||
|
@ -17,7 +17,7 @@ for arg in "$@"; do
|
||||
done
|
||||
|
||||
# DELETE libcalmysql.so entries first as they are in ha_columnstore.so in 1.4.2 onwards
|
||||
mysql --force --user=root mysql 2> ${tmpdir}/mysql_install.log <<EOD
|
||||
su -s /bin/sh -c 'mysql' mysql 2> ${tmpdir}/mysql_install.log <<EOD
|
||||
DELETE FROM mysql.func WHERE dl='libcalmysql.so';
|
||||
INSERT INTO mysql.func VALUES ('calgetstats',0,'ha_columnstore.so','function');
|
||||
INSERT INTO mysql.func VALUES ('calsettrace',2,'ha_columnstore.so','function');
|
||||
@ -110,9 +110,10 @@ CREATE TABLE IF NOT EXISTS infinidb_querystats.priority
|
||||
insert ignore into infinidb_querystats.priority values ('High', 100),('Medium', 66), ('Low', 33);
|
||||
EOD
|
||||
|
||||
mysql --user=root mysql 2>/dev/null <@ENGINE_SUPPORTDIR@/syscatalog_mysql.sql
|
||||
mysql --user=root mysql 2>/dev/null <@ENGINE_SUPPORTDIR@/calsetuserpriority.sql
|
||||
mysql --user=root mysql 2>/dev/null <@ENGINE_SUPPORTDIR@/calremoveuserpriority.sql
|
||||
mysql --user=root mysql 2>/dev/null <@ENGINE_SUPPORTDIR@/calshowprocesslist.sql
|
||||
mysql --user=root mysql 2>/dev/null <@ENGINE_SUPPORTDIR@/columnstore_info.sql
|
||||
su -s /bin/sh -c 'mysql <@ENGINE_SUPPORTDIR@/syscatalog_mysql.sql' mysql 2>/dev/null
|
||||
su -s /bin/sh -c 'mysql <@ENGINE_SUPPORTDIR@/calsetuserpriority.sql' mysql 2>/dev/null
|
||||
su -s /bin/sh -c 'mysql <@ENGINE_SUPPORTDIR@/calremoveuserpriority.sql' mysql 2>/dev/null
|
||||
su -s /bin/sh -c 'mysql <@ENGINE_SUPPORTDIR@/calshowprocesslist.sql' mysql 2>/dev/null
|
||||
su -s /bin/sh -c 'mysql <@ENGINE_SUPPORTDIR@/columnstore_info.sql' mysql 2>/dev/null
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user