From 00ce77b742ce284d41cdce3b5a8a7ce2247bea52 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Thu, 22 Nov 2018 21:58:03 +0000 Subject: [PATCH] MCOL-1624 mcssystemready() does more testing Now checks if system catalog exists and if we can query the system catalogue in FE mode (and therefore tests ExeMgr and PrimProc). --- dbcon/mysql/ha_calpont_impl.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dbcon/mysql/ha_calpont_impl.cpp b/dbcon/mysql/ha_calpont_impl.cpp index 3be44d2b8..9536ff24f 100644 --- a/dbcon/mysql/ha_calpont_impl.cpp +++ b/dbcon/mysql/ha_calpont_impl.cpp @@ -2015,6 +2015,7 @@ extern "C" Oam oam; DBRM dbrm(true); SystemStatus systemstatus; + WriteEngine::FileOp fileOp; try { @@ -2022,8 +2023,15 @@ extern "C" if (systemstatus.SystemOpState == ACTIVE && dbrm.getSystemReady() - && dbrm.getSystemQueryReady()) + && dbrm.getSystemQueryReady() + && fileOp.existsOIDDir(1001)) { + // Test getting system catalogue data from ExeMgr + boost::shared_ptr systemCatalogPtr = + execplan::CalpontSystemCatalog::makeCalpontSystemCatalog(0); + systemCatalogPtr->identity(execplan::CalpontSystemCatalog::FE); + systemCatalogPtr->getTableCount(); + return 1; } }