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

fix(CES): Server doesn't terminate MDB client connection that it did previously delivering incomplete result set

This commit is contained in:
drrtuy
2025-04-08 15:30:47 +00:00
parent 6e98ef3037
commit c9f9cf8988
2 changed files with 19 additions and 19 deletions

View File

@ -251,14 +251,10 @@ T CrossEngineStep::convertValueNum(const char* str, const CalpontSystemCatalog::
case CalpontSystemCatalog::USMALLINT: rv = boost::any_cast<uint16_t>(anyVal); break;
case CalpontSystemCatalog::MEDINT:
case CalpontSystemCatalog::INT:
rv = boost::any_cast<int32_t>(anyVal);
break;
case CalpontSystemCatalog::INT: rv = boost::any_cast<int32_t>(anyVal); break;
case CalpontSystemCatalog::UMEDINT:
case CalpontSystemCatalog::UINT:
rv = boost::any_cast<uint32_t>(anyVal);
break;
case CalpontSystemCatalog::UINT: rv = boost::any_cast<uint32_t>(anyVal); break;
case CalpontSystemCatalog::BIGINT: rv = boost::any_cast<long long>(anyVal); break;
@ -389,7 +385,7 @@ void CrossEngineStep::execute()
if (ret != 0)
mysql->handleMySqlError(mysql->getError().c_str(), ret);
std::string query(makeQuery());
std::string query = makeQuery();
fLogger->logMessage(logging::LOG_TYPE_INFO, "QUERY to foreign engine: " + query);
if (traceOn())
@ -429,7 +425,6 @@ void CrossEngineStep::execute()
addRow(rgDataDelivered);
}
}
else if (doFE1 && !doFE3) // FE in WHERE clause only
{
std::shared_ptr<uint8_t[]> rgDataFe1; // functions in where clause
@ -480,7 +475,6 @@ void CrossEngineStep::execute()
addRow(rgDataDelivered);
}
}
else if (!doFE1 && doFE3) // FE in SELECT clause only
{
std::shared_ptr<uint8_t[]> rgDataFe3; // functions in select clause
@ -501,7 +495,6 @@ void CrossEngineStep::execute()
addRow(rgDataDelivered);
}
}
else // FE in SELECT clause, FE join and WHERE clause
{
std::shared_ptr<uint8_t[]> rgDataFe1; // functions in where clause
@ -562,7 +555,6 @@ void CrossEngineStep::execute()
}
}
// INSERT_ADAPTER(fOutputDL, rgDataDelivered);
fOutputDL->insert(rgDataDelivered);
fRowsRetrieved = mysql->getRowCount();
}
@ -801,8 +793,7 @@ void CrossEngineStep::formatMiniStats()
{
ostringstream oss;
oss << "CES "
<< "UM "
<< tableAlias() << " "
<< "UM " << tableAlias() << " "
<< "- "
<< "- "
<< "- "

View File

@ -88,6 +88,15 @@ int LibMySQL::init(const char* h, unsigned int p, const char* u, const char* w,
ret = -1;
}
static const std::string extendNetTimeoutQuery = "SET SESSION net_write_timeout = 3600";
if (mysql_real_query(fCon, extendNetTimeoutQuery.c_str(), extendNetTimeoutQuery.length()) != 0)
{
fErrStr = "fatal error setting net_write_timeout=3600 in libmysql_client lib";
ret = -1;
return ret;
}
return ret;
}