1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-1385 Initial 10.3 support

This commit is contained in:
Andrew Hutchings
2018-08-02 14:52:15 +01:00
parent 57367c8ec2
commit 443a2867c4
26 changed files with 384 additions and 348 deletions

View File

@ -61,7 +61,7 @@ using namespace std;
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/regex.hpp>
#include <boost/thread.hpp>
using namespace boost;
//using namespace boost;
#include "idb_mysql.h"
@ -977,7 +977,7 @@ uint32_t doUpdateDelete(THD* thd)
}
//@Bug 4387. Check BRM status before start statement.
scoped_ptr<DBRM> dbrmp(new DBRM());
boost::scoped_ptr<DBRM> dbrmp(new DBRM());
int rc = dbrmp->isReadWrite();
thd->infinidb_vtable.isInfiniDBDML = true;
@ -1133,7 +1133,7 @@ uint32_t doUpdateDelete(THD* thd)
schemaName = string(item->db_name);
columnAssignmentPtr = new ColumnAssignment();
columnAssignmentPtr->fColumn = string(item->name);
columnAssignmentPtr->fColumn = string(item->name.str);
columnAssignmentPtr->fOperator = "=";
columnAssignmentPtr->fFuncScale = 0;
Item* value = value_it++;
@ -1279,7 +1279,7 @@ uint32_t doUpdateDelete(THD* thd)
{
Item_field* tmp = (Item_field*)value;
if (!tmp->field_name) //null
if (!tmp->field_name.length) //null
{
columnAssignmentPtr->fScalarExpression = "NULL";
columnAssignmentPtr->fFromCol = false;
@ -1400,9 +1400,9 @@ uint32_t doUpdateDelete(THD* thd)
if (deleteTable->get_num_of_tables() == 1)
{
schemaName = first_table->db;
tableName = first_table->table_name;
aliasName = first_table->alias;
schemaName = first_table->db.str;
tableName = first_table->table_name.str;
aliasName = first_table->alias.str;
qualifiedTablName->fName = tableName;
qualifiedTablName->fSchema = schemaName;
pDMLPackage = CalpontDMLFactory::makeCalpontDMLPackageFromMysqlBuffer(dmlStatement);
@ -1421,7 +1421,7 @@ uint32_t doUpdateDelete(THD* thd)
first_table = (TABLE_LIST*) thd->lex->select_lex.table_list.first;
schemaName = first_table->table->s->db.str;
tableName = first_table->table->s->table_name.str;
aliasName = first_table->alias;
aliasName = first_table->alias.str;
qualifiedTablName->fName = tableName;
qualifiedTablName->fSchema = schemaName;
pDMLPackage = CalpontDMLFactory::makeCalpontDMLPackageFromMysqlBuffer(dmlStatement);
@ -1432,7 +1432,7 @@ uint32_t doUpdateDelete(THD* thd)
first_table = (TABLE_LIST*) thd->lex->select_lex.table_list.first;
schemaName = first_table->table->s->db.str;
tableName = first_table->table->s->table_name.str;
aliasName = first_table->alias;
aliasName = first_table->alias.str;
qualifiedTablName->fName = tableName;
qualifiedTablName->fSchema = schemaName;
pDMLPackage = CalpontDMLFactory::makeCalpontDMLPackageFromMysqlBuffer(dmlStatement);
@ -2243,7 +2243,7 @@ extern "C"
bool includeInput = true;
string pstr(parameter);
algorithm::to_lower(pstr);
boost::algorithm::to_lower(pstr);
if (pstr == PmSmallSideMaxMemory)
{
@ -2389,8 +2389,8 @@ extern "C"
{
tableName.table = args->args[0];
if (thd->db)
tableName.schema = thd->db;
if (thd->db.length)
tableName.schema = thd->db.str;
else
{
string msg("No schema information provided");
@ -2527,8 +2527,8 @@ extern "C"
{
tableName.table = args->args[0];
if (thd->db)
tableName.schema = thd->db;
if (thd->db.length)
tableName.schema = thd->db.str;
else
{
return -1;
@ -3022,8 +3022,8 @@ int ha_calpont_impl_rnd_init(TABLE* table)
ti.csep->verID(verID);
ti.csep->sessionID(sessionID);
if (thd->db)
ti.csep->schemaName(thd->db);
if (thd->db.length)
ti.csep->schemaName(thd->db.str);
ti.csep->traceFlags(ci->traceFlags);
ti.msTablePtr = table;
@ -3116,8 +3116,8 @@ int ha_calpont_impl_rnd_init(TABLE* table)
csep->verID(verID);
csep->sessionID(sessionID);
if (thd->db)
csep->schemaName(thd->db);
if (thd->db.length)
csep->schemaName(thd->db.str);
csep->traceFlags(ci->traceFlags);
@ -3782,12 +3782,12 @@ int ha_calpont_impl_delete_table(const char* name)
if (thd->lex->sql_command == SQLCOM_DROP_DB)
{
dbName = thd->lex->name.str;
dbName = const_cast<char*>(thd->lex->name.str);
}
else
{
TABLE_LIST* first_table = (TABLE_LIST*) thd->lex->select_lex.table_list.first;
dbName = first_table->db;
dbName = const_cast<char*>(first_table->db.str);
}
if (!dbName)
@ -3809,7 +3809,7 @@ int ha_calpont_impl_delete_table(const char* name)
if (strcmp(dbName, "calpontsys") == 0 && string(name).find("@0024vtable") == string::npos)
{
std::string stmt(idb_mysql_query_str(thd));
algorithm::to_upper(stmt);
boost::algorithm::to_upper(stmt);
//@Bug 2432. systables can be dropped with restrict
if (stmt.find(" RESTRICT") != string::npos)
@ -3961,7 +3961,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
if ((thd->lex)->sql_command == SQLCOM_INSERT)
{
string insertStmt = idb_mysql_query_str(thd);
algorithm::to_lower(insertStmt);
boost::algorithm::to_lower(insertStmt);
string intoStr("into");
size_t found = insertStmt.find(intoStr);
@ -4437,7 +4437,7 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
ci->stats.fQueryType = CalpontSelectExecutionPlan::queryTypeToString(CalpontSelectExecutionPlan::LOAD_DATA_INFILE);
//@Bug 4387. Check BRM status before start statement.
scoped_ptr<DBRM> dbrmp(new DBRM());
boost::scoped_ptr<DBRM> dbrmp(new DBRM());
int rc = dbrmp->isReadWrite();
if (rc != 0 )
@ -4755,7 +4755,7 @@ int ha_calpont_impl_commit (handlerton* hton, THD* thd, bool all)
return 0;
//@Bug 5823 check if any active transaction for this session
scoped_ptr<DBRM> dbrmp(new DBRM());
boost::scoped_ptr<DBRM> dbrmp(new DBRM());
BRM::TxnID txnId = dbrmp->getTxnID(tid2sid(thd->thread_id));
if (!txnId.valid)
@ -5257,8 +5257,8 @@ int ha_calpont_impl_group_by_init(ha_calpont_group_by_handler* group_hand, TABLE
csep->verID(verID);
csep->sessionID(sessionID);
if (group_hand->table_list->db_length)
csep->schemaName(group_hand->table_list->db);
if (group_hand->table_list->db.length)
csep->schemaName(group_hand->table_list->db.str);
csep->traceFlags(ci->traceFlags);