1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +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::USMALLINT: rv = boost::any_cast<uint16_t>(anyVal); break;
case CalpontSystemCatalog::MEDINT: case CalpontSystemCatalog::MEDINT:
case CalpontSystemCatalog::INT: case CalpontSystemCatalog::INT: rv = boost::any_cast<int32_t>(anyVal); break;
rv = boost::any_cast<int32_t>(anyVal);
break;
case CalpontSystemCatalog::UMEDINT: case CalpontSystemCatalog::UMEDINT:
case CalpontSystemCatalog::UINT: case CalpontSystemCatalog::UINT: rv = boost::any_cast<uint32_t>(anyVal); break;
rv = boost::any_cast<uint32_t>(anyVal);
break;
case CalpontSystemCatalog::BIGINT: rv = boost::any_cast<long long>(anyVal); break; case CalpontSystemCatalog::BIGINT: rv = boost::any_cast<long long>(anyVal); break;
@@ -389,7 +385,7 @@ void CrossEngineStep::execute()
if (ret != 0) if (ret != 0)
mysql->handleMySqlError(mysql->getError().c_str(), ret); 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); fLogger->logMessage(logging::LOG_TYPE_INFO, "QUERY to foreign engine: " + query);
if (traceOn()) if (traceOn())
@@ -429,7 +425,6 @@ void CrossEngineStep::execute()
addRow(rgDataDelivered); addRow(rgDataDelivered);
} }
} }
else if (doFE1 && !doFE3) // FE in WHERE clause only else if (doFE1 && !doFE3) // FE in WHERE clause only
{ {
std::shared_ptr<uint8_t[]> rgDataFe1; // functions in where clause std::shared_ptr<uint8_t[]> rgDataFe1; // functions in where clause
@@ -480,7 +475,6 @@ void CrossEngineStep::execute()
addRow(rgDataDelivered); addRow(rgDataDelivered);
} }
} }
else if (!doFE1 && doFE3) // FE in SELECT clause only else if (!doFE1 && doFE3) // FE in SELECT clause only
{ {
std::shared_ptr<uint8_t[]> rgDataFe3; // functions in select clause std::shared_ptr<uint8_t[]> rgDataFe3; // functions in select clause
@@ -501,7 +495,6 @@ void CrossEngineStep::execute()
addRow(rgDataDelivered); addRow(rgDataDelivered);
} }
} }
else // FE in SELECT clause, FE join and WHERE clause else // FE in SELECT clause, FE join and WHERE clause
{ {
std::shared_ptr<uint8_t[]> rgDataFe1; // functions in 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); fOutputDL->insert(rgDataDelivered);
fRowsRetrieved = mysql->getRowCount(); fRowsRetrieved = mysql->getRowCount();
} }
@@ -801,8 +793,7 @@ void CrossEngineStep::formatMiniStats()
{ {
ostringstream oss; ostringstream oss;
oss << "CES " oss << "CES "
<< "UM " << "UM " << tableAlias() << " "
<< tableAlias() << " "
<< "- " << "- "
<< "- " << "- "
<< "- " << "- "

View File

@@ -88,6 +88,15 @@ int LibMySQL::init(const char* h, unsigned int p, const char* u, const char* w,
ret = -1; 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; return ret;
} }