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

don't create a ResourceManager to initialize a global variable

this is executed when ha_columnstore is loaded, at dlopen time
before any initialization code is run and crashes any dlopen
attemps.

Crashes - because a missing config file is a crashing offence,
but it's an issue for another day
This commit is contained in:
Sergei Golubchik
2019-12-19 19:42:38 +01:00
parent dab1a8b147
commit 96adf535ae
3 changed files with 10 additions and 7 deletions

View File

@ -96,8 +96,8 @@ namespace
{ {
typedef CalpontSelectExecutionPlan::ColumnMap::value_type CMVT_; typedef CalpontSelectExecutionPlan::ColumnMap::value_type CMVT_;
ResourceManager* rm = ResourceManager::instance(); // HDFS is never used nowadays, so don't bother
bool useHdfs = rm->useHdfs(); bool useHdfs = false; // ResourceManager::instance()->useHdfs();
#include "ha_autoi.cpp" #include "ha_autoi.cpp"

View File

@ -77,9 +77,9 @@ using namespace joblist;
namespace namespace
{ {
ResourceManager* rm = ResourceManager::instance(); uint64_t fBatchInsertGroupRows = 0; // ResourceManager::instance()->getRowsPerBatch();
uint64_t fBatchInsertGroupRows = rm->getRowsPerBatch(); // HDFS is never used nowadays, so don't bother
bool useHdfs = rm->useHdfs(); bool useHdfs = false; // ResourceManager::instance()->useHdfs();
//convenience fcn //convenience fcn
inline uint32_t tid2sid(const uint32_t tid) inline uint32_t tid2sid(const uint32_t tid)
@ -595,6 +595,9 @@ int ha_mcs_impl_write_row_(const uchar* buf, TABLE* table, cal_connection_info&
return rc; return rc;
} }
if (fBatchInsertGroupRows == 0)
fBatchInsertGroupRows = ResourceManager::instance()->getRowsPerBatch();
//timer.stop( "buildValueList"); //timer.stop( "buildValueList");
if ( ci.singleInsert // Single insert if ( ci.singleInsert // Single insert
|| (( ci.bulkInsertRows > 0 ) && (( ( ci.rowsHaveInserted + size) >= ci.bulkInsertRows ) || ( size >= fBatchInsertGroupRows )) ) || (( ci.bulkInsertRows > 0 ) && (( ( ci.rowsHaveInserted + size) >= ci.bulkInsertRows ) || ( size >= fBatchInsertGroupRows )) )

View File

@ -162,8 +162,8 @@ static const string interval_names[] =
const unsigned NONSUPPORTED_ERR_THRESH = 2000; const unsigned NONSUPPORTED_ERR_THRESH = 2000;
ResourceManager* rm = ResourceManager::instance(); // HDFS is never used nowadays, so don't bother
bool useHdfs = rm->useHdfs(); bool useHdfs = false; // ResourceManager::instance()->useHdfs();
//convenience fcn //convenience fcn
inline uint32_t tid2sid(const uint32_t tid) inline uint32_t tid2sid(const uint32_t tid)