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

MCOL-104 First pass of InfiniDB rename in code

This commit is contained in:
Andrew Hutchings
2019-08-12 09:41:28 +01:00
parent 7b006b6e74
commit 9d83b49fca
35 changed files with 170 additions and 170 deletions

View File

@@ -71,7 +71,7 @@ pthread_mutex_t calpont_mutex;
Function we use in the creation of our hash to get key.
*/
static uchar* calpont_get_key(INFINIDB_SHARE* share, size_t* length,
static uchar* calpont_get_key(COLUMNSTORE_SHARE* share, size_t* length,
my_bool not_used __attribute__((unused)))
{
*length = share->table_name_length;

View File

@@ -25,7 +25,7 @@ extern handlerton* calpont_hton;
extern handlerton* mcs_hton;
/** @brief
INFINIDB_SHARE is a structure that will be shared among all open handlers.
COLUMNSTORE_SHARE is a structure that will be shared among all open handlers.
This example implements the minimum of what you will probably need.
*/
typedef struct st_calpont_share
@@ -34,7 +34,7 @@ typedef struct st_calpont_share
uint32_t table_name_length, use_count;
pthread_mutex_t mutex;
THR_LOCK lock;
} INFINIDB_SHARE;
} COLUMNSTORE_SHARE;
/** @brief
Class definition for the storage engine
@@ -42,7 +42,7 @@ typedef struct st_calpont_share
class ha_calpont: public handler
{
THR_LOCK_DATA lock; ///< MySQL lock
INFINIDB_SHARE* share; ///< Shared lock info
COLUMNSTORE_SHARE* share; ///< Shared lock info
ulonglong int_table_flags;
public:

View File

@@ -2370,7 +2370,7 @@ SimpleColumn* buildSimpleColFromDerivedTable(gp_walk_info& gwi, Item_field* ifp)
sc->hasAggregate(cols[j]->hasAggregate());
if (col)
sc->isInfiniDB(col->isInfiniDB());
sc->isColumnStore(col->isColumnStore());
// @bug5634, @bug5635. mark used derived col on derived table.
// outer join inner table filter can not be moved in
@@ -2823,14 +2823,14 @@ SimpleColumn* getSmallestColumn(boost::shared_ptr<CalpontSystemCatalog> csc,
}
// check engine type
if (!tan.fIsInfiniDB)
if (!tan.fisColumnStore)
{
// get the first column to project. @todo optimization to get the smallest one for foreign engine.
Field* field = *(table->field);
SimpleColumn* sc = new SimpleColumn(table->s->db.str, table->s->table_name.str, field->field_name.str, tan.fIsInfiniDB, gwi.sessionid);
SimpleColumn* sc = new SimpleColumn(table->s->db.str, table->s->table_name.str, field->field_name.str, tan.fisColumnStore, gwi.sessionid);
string alias(table->alias.ptr());
sc->tableAlias(lower(alias));
sc->isInfiniDB(false);
sc->isColumnStore(false);
sc->timeZone(gwi.thd->variables.time_zone->get_name()->ptr());
sc->resultType(fieldType_MysqlToIDB(field));
sc->oid(field->field_index + 1);
@@ -4182,16 +4182,16 @@ FunctionColumn* buildCaseFunction(Item_func* item, gp_walk_info& gwi, bool& nonS
ConstantColumn* buildDecimalColumn(Item* item, gp_walk_info& gwi)
{
Item_decimal* idp = (Item_decimal*)item;
IDB_Decimal infinidb_decimal;
IDB_Decimal columnstore_decimal;
String val, *str = item->val_str(&val);
string valStr;
valStr.assign(str->ptr(), str->length());
ostringstream infinidb_decimal_val;
ostringstream columnstore_decimal_val;
uint32_t i = 0;
if (str->ptr()[0] == '+' || str->ptr()[0] == '-')
{
infinidb_decimal_val << str->ptr()[0];
columnstore_decimal_val << str->ptr()[0];
i = 1;
}
@@ -4200,22 +4200,22 @@ ConstantColumn* buildDecimalColumn(Item* item, gp_walk_info& gwi)
if (str->ptr()[i] == '.')
continue;
infinidb_decimal_val << str->ptr()[i];
columnstore_decimal_val << str->ptr()[i];
}
infinidb_decimal.value = strtoll(infinidb_decimal_val.str().c_str(), 0, 10);
columnstore_decimal.value = strtoll(columnstore_decimal_val.str().c_str(), 0, 10);
if (gwi.internalDecimalScale >= 0 && idp->decimals > (uint)gwi.internalDecimalScale)
{
infinidb_decimal.scale = gwi.internalDecimalScale;
double val = (double)(infinidb_decimal.value / pow((double)10, idp->decimals - gwi.internalDecimalScale));
infinidb_decimal.value = (int64_t)(val > 0 ? val + 0.5 : val - 0.5);
columnstore_decimal.scale = gwi.internalDecimalScale;
double val = (double)(columnstore_decimal.value / pow((double)10, idp->decimals - gwi.internalDecimalScale));
columnstore_decimal.value = (int64_t)(val > 0 ? val + 0.5 : val - 0.5);
}
else
infinidb_decimal.scale = idp->decimals;
columnstore_decimal.scale = idp->decimals;
infinidb_decimal.precision = idp->max_length - idp->decimals;
ConstantColumn* cc = new ConstantColumn(valStr, infinidb_decimal);
columnstore_decimal.precision = idp->max_length - idp->decimals;
ConstantColumn* cc = new ConstantColumn(valStr, columnstore_decimal);
cc->timeZone(gwi.thd->variables.time_zone->get_name()->ptr());
return cc;
}
@@ -4239,18 +4239,18 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi)
return buildSimpleColFromDerivedTable(gwi, ifp);
CalpontSystemCatalog::ColType ct;
bool infiniDB = true;
bool columnStore = true;
try
{
// check foreign engine
if (ifp->cached_table && ifp->cached_table->table)
infiniDB = isMCSTable(ifp->cached_table->table);
columnStore = isMCSTable(ifp->cached_table->table);
// @bug4509. ifp->cached_table could be null for myisam sometimes
else if (ifp->field && ifp->field->table)
infiniDB = isMCSTable(ifp->field->table);
columnStore = isMCSTable(ifp->field->table);
if (infiniDB)
if (columnStore)
{
ct = gwi.csc->colType(
gwi.csc->lookupOID(make_tcn(ifp->db_name, bestTableName(ifp), ifp->field_name.str)));
@@ -4273,10 +4273,10 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi)
{
case CalpontSystemCatalog::TINYINT:
if (ct.scale == 0)
sc = new SimpleColumn_INT<1>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, infiniDB, gwi.sessionid);
sc = new SimpleColumn_INT<1>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid);
else
{
sc = new SimpleColumn_Decimal<1>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, infiniDB, gwi.sessionid);
sc = new SimpleColumn_Decimal<1>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid);
ct.colDataType = CalpontSystemCatalog::DECIMAL;
}
@@ -4284,10 +4284,10 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi)
case CalpontSystemCatalog::SMALLINT:
if (ct.scale == 0)
sc = new SimpleColumn_INT<2>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, infiniDB, gwi.sessionid);
sc = new SimpleColumn_INT<2>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid);
else
{
sc = new SimpleColumn_Decimal<2>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, infiniDB, gwi.sessionid);
sc = new SimpleColumn_Decimal<2>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid);
ct.colDataType = CalpontSystemCatalog::DECIMAL;
}
@@ -4296,10 +4296,10 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi)
case CalpontSystemCatalog::INT:
case CalpontSystemCatalog::MEDINT:
if (ct.scale == 0)
sc = new SimpleColumn_INT<4>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, infiniDB, gwi.sessionid);
sc = new SimpleColumn_INT<4>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid);
else
{
sc = new SimpleColumn_Decimal<4>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, infiniDB, gwi.sessionid);
sc = new SimpleColumn_Decimal<4>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid);
ct.colDataType = CalpontSystemCatalog::DECIMAL;
}
@@ -4307,34 +4307,34 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi)
case CalpontSystemCatalog::BIGINT:
if (ct.scale == 0)
sc = new SimpleColumn_INT<8>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, infiniDB, gwi.sessionid);
sc = new SimpleColumn_INT<8>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid);
else
{
sc = new SimpleColumn_Decimal<8>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, infiniDB, gwi.sessionid);
sc = new SimpleColumn_Decimal<8>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid);
ct.colDataType = CalpontSystemCatalog::DECIMAL;
}
break;
case CalpontSystemCatalog::UTINYINT:
sc = new SimpleColumn_UINT<1>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, infiniDB, gwi.sessionid);
sc = new SimpleColumn_UINT<1>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid);
break;
case CalpontSystemCatalog::USMALLINT:
sc = new SimpleColumn_UINT<2>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, infiniDB, gwi.sessionid);
sc = new SimpleColumn_UINT<2>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid);
break;
case CalpontSystemCatalog::UINT:
case CalpontSystemCatalog::UMEDINT:
sc = new SimpleColumn_UINT<4>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, infiniDB, gwi.sessionid);
sc = new SimpleColumn_UINT<4>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid);
break;
case CalpontSystemCatalog::UBIGINT:
sc = new SimpleColumn_UINT<8>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, infiniDB, gwi.sessionid);
sc = new SimpleColumn_UINT<8>(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid);
break;
default:
sc = new SimpleColumn(ifp->db_name, bestTableName(ifp), ifp->field_name.str, infiniDB, gwi.sessionid);
sc = new SimpleColumn(ifp->db_name, bestTableName(ifp), ifp->field_name.str, columnStore, gwi.sessionid);
}
sc->resultType(ct);
@@ -4352,10 +4352,10 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi)
sc->viewName(lower(getViewName(ifp->cached_table)));
sc->alias(ifp->name.str);
sc->isInfiniDB(infiniDB);
sc->isColumnStore(columnStore);
sc->timeZone(gwi.thd->variables.time_zone->get_name()->ptr());
if (!infiniDB && ifp->field)
if (!columnStore && ifp->field)
sc->oid(ifp->field->field_index + 1); // ExeMgr requires offset started from 1
if (ifp->depended_from)
@@ -4584,7 +4584,7 @@ ReturnedColumn* buildAggregateColumn(Item* item, gp_walk_info& gwi)
parm.reset(sc);
gwi.columnMap.insert(CalpontSelectExecutionPlan::ColumnMap::value_type(string(ifp->field_name.str), parm));
TABLE_LIST* tmp = (ifp->cached_table ? ifp->cached_table : 0);
gwi.tableMap[make_aliastable(sc->schemaName(), sc->tableName(), sc->tableAlias(), sc->isInfiniDB())] = make_pair(1, tmp);
gwi.tableMap[make_aliastable(sc->schemaName(), sc->tableName(), sc->tableAlias(), sc->isColumnStore())] = make_pair(1, tmp);
break;
}
@@ -5084,7 +5084,7 @@ void gp_walk(const Item* item, void* arg)
if (!((scp->joinInfo() & JOIN_CORRELATED) || scp->colType().colDataType == CalpontSystemCatalog::VARBINARY))
{
TABLE_LIST* tmp = (ifp->cached_table ? ifp->cached_table : 0);
gwip->tableMap[make_aliastable(scp->schemaName(), scp->tableName(), scp->tableAlias(), scp->isInfiniDB())] =
gwip->tableMap[make_aliastable(scp->schemaName(), scp->tableName(), scp->tableAlias(), scp->isColumnStore())] =
make_pair(1, tmp);
}
}
@@ -6132,10 +6132,10 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex,
else
{
// check foreign engine tables
bool infiniDB = (table_ptr->table ? isMCSTable(table_ptr->table) : true);
bool columnStore = (table_ptr->table ? isMCSTable(table_ptr->table) : true);
// trigger system catalog cache
if (infiniDB)
if (columnStore)
csc->columnRIDs(make_table(table_ptr->db.str, table_ptr->table_name.str), true);
string table_name = table_ptr->table_name.str;
@@ -6144,9 +6144,9 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex,
if (table_ptr->db.length && strcmp(table_ptr->db.str, "information_schema") == 0)
table_name = (table_ptr->schema_table_name.length ? table_ptr->schema_table_name.str : table_ptr->alias.str);
CalpontSystemCatalog::TableAliasName tn = make_aliasview(table_ptr->db.str, table_name, table_ptr->alias.str, viewName, infiniDB);
CalpontSystemCatalog::TableAliasName tn = make_aliasview(table_ptr->db.str, table_name, table_ptr->alias.str, viewName, columnStore);
gwi.tbList.push_back(tn);
CalpontSystemCatalog::TableAliasName tan = make_aliastable(table_ptr->db.str, table_name, table_ptr->alias.str, infiniDB);
CalpontSystemCatalog::TableAliasName tan = make_aliastable(table_ptr->db.str, table_name, table_ptr->alias.str, columnStore);
gwi.tableMap[tan] = make_pair(0, table_ptr);
#ifdef DEBUG_WALK_COND
cerr << tn << endl;
@@ -6523,7 +6523,7 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex,
if (ifp->cached_table)
tmp = ifp->cached_table;
gwi.tableMap[make_aliastable(sc->schemaName(), sc->tableName(), sc->tableAlias(), sc->isInfiniDB())] =
gwi.tableMap[make_aliastable(sc->schemaName(), sc->tableName(), sc->tableAlias(), sc->isColumnStore())] =
make_pair(1, tmp);
}
else
@@ -7090,7 +7090,7 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex,
string fullname;
fullname = str.c_ptr();
TABLE_LIST* tmp = (funcFieldVec[i]->cached_table ? funcFieldVec[i]->cached_table : 0);
gwi.tableMap[make_aliastable(sc->schemaName(), sc->tableName(), sc->tableAlias(), sc->isInfiniDB())] =
gwi.tableMap[make_aliastable(sc->schemaName(), sc->tableName(), sc->tableAlias(), sc->isColumnStore())] =
make_pair(1, tmp);
}
}
@@ -7630,7 +7630,7 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex,
gwi.returnedCols.push_back(srcp);
gwi.columnMap.insert(CalpontSelectExecutionPlan::ColumnMap::value_type(string(fieldVec[i]->field_name.str), srcp));
TABLE_LIST* tmp = (fieldVec[i]->cached_table ? fieldVec[i]->cached_table : 0);
gwi.tableMap[make_aliastable(sc->schemaName(), sc->tableName(), sc->tableAlias(), sc->isInfiniDB())] =
gwi.tableMap[make_aliastable(sc->schemaName(), sc->tableName(), sc->tableAlias(), sc->isColumnStore())] =
make_pair(1, tmp);
}
}
@@ -8367,10 +8367,10 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
else
{
// check foreign engine tables
bool infiniDB = (table_ptr->table ? isMCSTable(table_ptr->table) : true);
bool columnStore = (table_ptr->table ? isMCSTable(table_ptr->table) : true);
// trigger system catalog cache
if (infiniDB)
if (columnStore)
csc->columnRIDs(make_table(table_ptr->db.str, table_ptr->table_name.str), true);
string table_name = table_ptr->table_name.str;
@@ -8379,9 +8379,9 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
if (table_ptr->db.length && strcmp(table_ptr->db.str, "information_schema") == 0)
table_name = (table_ptr->schema_table_name.length ? table_ptr->schema_table_name.str : table_ptr->alias.str);
CalpontSystemCatalog::TableAliasName tn = make_aliasview(table_ptr->db.str, table_name, table_ptr->alias.str, viewName, infiniDB);
CalpontSystemCatalog::TableAliasName tn = make_aliasview(table_ptr->db.str, table_name, table_ptr->alias.str, viewName, columnStore);
gwi.tbList.push_back(tn);
CalpontSystemCatalog::TableAliasName tan = make_aliastable(table_ptr->db.str, table_name, table_ptr->alias.str, infiniDB);
CalpontSystemCatalog::TableAliasName tan = make_aliastable(table_ptr->db.str, table_name, table_ptr->alias.str, columnStore);
gwi.tableMap[tan] = make_pair(0, table_ptr);
#ifdef DEBUG_WALK_COND
cerr << tn << endl;
@@ -8646,7 +8646,7 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
if (ifp->cached_table)
tmp = ifp->cached_table;
gwi.tableMap[make_aliastable(sc->schemaName(), sc->tableName(), sc->tableAlias(), sc->isInfiniDB())] =
gwi.tableMap[make_aliastable(sc->schemaName(), sc->tableName(), sc->tableAlias(), sc->isColumnStore())] =
make_pair(1, tmp);
}
else
@@ -9235,7 +9235,7 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
string fullname;
fullname = str.c_ptr();
TABLE_LIST* tmp = (funcFieldVec[i]->cached_table ? funcFieldVec[i]->cached_table : 0);
gwi.tableMap[make_aliastable(sc->schemaName(), sc->tableName(), sc->tableAlias(), sc->isInfiniDB())] =
gwi.tableMap[make_aliastable(sc->schemaName(), sc->tableName(), sc->tableAlias(), sc->isColumnStore())] =
make_pair(1, tmp);
}
}

View File

@@ -94,7 +94,7 @@ public:
* derived_handler API methods. Could be used by the server
* tp process sub-queries.
* More details in server/sql/dervied_handler.h
* INFINIDB_SHARE* hton share
* COLUMNSTORE_SHARE* hton share
* tbl in the constructor is the list of the tables involved.
* Methods:
* init_scan - get plan and send it to ExeMgr. Get the execution result.
@@ -104,7 +104,7 @@ public:
class ha_columnstore_derived_handler: public derived_handler
{
private:
INFINIDB_SHARE *share;
COLUMNSTORE_SHARE *share;
public:
ha_columnstore_derived_handler(THD* thd_arg, TABLE_LIST *tbl);
@@ -121,7 +121,7 @@ public:
* select_handler API methods. Could be used by the server
* tp pushdown the whole query described by SELECT_LEX.
* More details in server/sql/select_handler.h
* INFINIDB_SHARE* hton share
* COLUMNSTORE_SHARE* hton share
* sel in the constructor is the semantic tree for the query.
* Methods:
* init_scan - get plan and send it to ExeMgr. Get the execution result.
@@ -131,7 +131,7 @@ public:
class ha_columnstore_select_handler: public select_handler
{
private:
INFINIDB_SHARE *share;
COLUMNSTORE_SHARE *share;
public:
ha_columnstore_select_handler(THD* thd_arg, SELECT_LEX* sel);

View File

@@ -134,7 +134,7 @@ static MYSQL_THDVAR_BOOL(
static MYSQL_THDVAR_BOOL(
double_for_decimal_math,
PLUGIN_VAR_NOCMDARG,
"Enable/disable the InfiniDB to replace DECIMAL with DOUBLE in arithmetic operation.",
"Enable/disable for ColumnStore to replace DECIMAL with DOUBLE in arithmetic operation.",
NULL,
NULL,
0
@@ -227,7 +227,7 @@ static MYSQL_THDVAR_ULONG(
static MYSQL_THDVAR_ULONG(
local_query,
PLUGIN_VAR_RQCMDARG,
"Enable/disable the Infinidb local PM query only feature.",
"Enable/disable the ColumnStore local PM query only feature.",
NULL,
NULL,
0,

View File

@@ -540,7 +540,7 @@ execplan::ReturnedColumn* buildPseudoColumn(Item* item,
{
SRCP srcp(sc);
gwi.columnMap.insert(CalpontSelectExecutionPlan::ColumnMap::value_type(sc->columnName(), srcp));
gwi.tableMap[make_aliastable(sc->schemaName(), sc->tableName(), sc->tableAlias(), sc->isInfiniDB())] =
gwi.tableMap[make_aliastable(sc->schemaName(), sc->tableName(), sc->tableAlias(), sc->isColumnStore())] =
make_pair(1, field->cached_table);
}
else if (!gwi.rcWorkStack.empty())

View File

@@ -120,13 +120,13 @@ void View::transform()
else
{
// check foreign engine tables
bool infiniDB = (table_ptr->table ? isMCSTable(table_ptr->table) : true);
bool columnStore = (table_ptr->table ? isMCSTable(table_ptr->table) : true);
// trigger system catalog cache
if (infiniDB)
if (columnStore)
csc->columnRIDs(make_table(table_ptr->db.str, table_ptr->table_name.str), true);
CalpontSystemCatalog::TableAliasName tn = make_aliasview(table_ptr->db.str, table_ptr->table_name.str, table_ptr->alias.str, viewName, infiniDB);
CalpontSystemCatalog::TableAliasName tn = make_aliasview(table_ptr->db.str, table_ptr->table_name.str, table_ptr->alias.str, viewName, columnStore);
gwi.tbList.push_back(tn);
gwi.tableMap[tn] = make_pair(0, table_ptr);
fParentGwip->tableMap[tn] = make_pair(0, table_ptr);

View File

@@ -454,7 +454,7 @@ tpl_close ( cpsm_tplh_t* ntplh,
status_t
sm_init ( uint32_t sid,
cpsm_conhdl_t** conn_hdl,
uint32_t infinidb_local_query)
uint32_t columnstore_local_query)
{
// clear file content
#if IDB_SM_DEBUG
@@ -465,7 +465,7 @@ sm_init ( uint32_t sid,
// @bug5660 Connection changes related to the local pm setting
/**
* when local PM is detected, or infinidb_local_query is set:
* when local PM is detected, or columnstore_local_query is set:
* 1. SELECT query connect to local ExeMgr 127.0.0.1:8601;
* 2. DML/DDL is disallowed.
* once local connection is determined, no need to check
@@ -474,14 +474,14 @@ sm_init ( uint32_t sid,
if (*conn_hdl)
{
// existing connection is local, ok.
if ((*conn_hdl)->exeMgr->localQuery() || ! infinidb_local_query)
if ((*conn_hdl)->exeMgr->localQuery() || ! columnstore_local_query)
return STATUS_OK;
// if session variable changes to local, re-establish the connection to loopback.
else
sm_cleanup(*conn_hdl);
}
cpsm_conhdl_t* hndl = new cpsm_conhdl_t(time(0), sid, infinidb_local_query);
cpsm_conhdl_t* hndl = new cpsm_conhdl_t(time(0), sid, columnstore_local_query);
*conn_hdl = hndl;
hndl->sessionID = sid;

View File

@@ -198,9 +198,9 @@ typedef boost::shared_ptr<cpsm_tplsch_t> sp_cpsm_tplsch_t;
class cpsm_conhdl_t
{
public:
cpsm_conhdl_t(time_t v, const uint32_t sid, bool infinidb_local_query) :
cpsm_conhdl_t(time_t v, const uint32_t sid, bool columnstore_local_query) :
value(v), sessionID(sid), queryState (NO_QUERY),
exeMgr( new execplan::ClientRotator(sid, "ExeMgr", infinidb_local_query)),
exeMgr( new execplan::ClientRotator(sid, "ExeMgr", columnstore_local_query)),
tblinfo_idx(0), idxinfo_idx(0), curFetchTb (0)
{ }
@@ -275,7 +275,7 @@ struct cpsm_tid_t
int value;
};
extern status_t sm_init(uint32_t, cpsm_conhdl_t**, uint32_t infinidb_local_query = false);
extern status_t sm_init(uint32_t, cpsm_conhdl_t**, uint32_t columnstore_local_query = false);
extern status_t sm_cleanup(cpsm_conhdl_t*);
extern status_t tpl_open(tableid_t, cpsm_tplh_t*, cpsm_conhdl_t*);