1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-2178 upstream merge forces to add explicit namespaces.

Add a magic value check to avoid cleanup procedures only
    if needed.
This commit is contained in:
Roman Nozdrin
2019-05-20 19:10:21 +03:00
committed by Gagan Goel
parent c297ceb6c1
commit b4d1cbc529
2 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2014 InfiniDB, Inc.
/* Copyright (C) 2014 InfiniDB, Inc.
Copyright (C) 2019 MariaDB Corporaton
This program is free software; you can redistribute it and/or
@ -4203,7 +4203,7 @@ int ha_calpont_impl_close_connection (handlerton* hton, THD* thd)
// An ugly way. I will use ha_data w/o external_lock.
// This in MCOL-2178
cal_connection_info* ci = NULL;
if(thd_get_ha_data(thd, hton))
if(thd_get_ha_data(thd, hton) != (void*)0x42) // 0x42 is the magic CS sets when setup hton
{
ci = reinterpret_cast<cal_connection_info*>(thd_get_ha_data(thd, hton));
}

View File

@ -286,6 +286,7 @@ struct cal_connection_info
std::stack<sm::cpsm_conhdl_t*> cal_conn_hndl_st;
int queryState;
CalTableMap tableMap;
std::set<TABLE*> physTablesList;
sm::tableid_t currentTable;
uint32_t traceFlags;
std::string queryStats;
@ -337,8 +338,8 @@ const std::string infinidb_err_msg = "\nThe query includes syntax that is not su
int cp_get_plan(THD* thd, execplan::SCSEP& csep);
int cp_get_table_plan(THD* thd, execplan::SCSEP& csep, cal_impl_if::cal_table_info& ti);
int cp_get_group_plan(THD* thd, execplan::SCSEP& csep, cal_impl_if::cal_group_info& gi);
int cs_get_derived_plan(derived_handler* handler, THD* thd, SCSEP& csep);
int cs_get_select_plan(select_handler* handler, THD* thd, SCSEP& csep);
int cs_get_derived_plan(derived_handler* handler, THD* thd, execplan::SCSEP& csep);
int cs_get_select_plan(select_handler* handler, THD* thd, execplan::SCSEP& csep);
int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, execplan::SCSEP& csep, bool isUnion = false, bool isPushdownHand = false);
int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, execplan::SCSEP& csep, cal_group_info& gi, bool isUnion = false);
void setError(THD* thd, uint32_t errcode, const std::string errmsg, gp_walk_info* gwi);