diff --git a/dbcon/dmlpackageproc/dmlpackageprocessor.h b/dbcon/dmlpackageproc/dmlpackageprocessor.h index a3744db51..ba3d4aaf5 100644 --- a/dbcon/dmlpackageproc/dmlpackageprocessor.h +++ b/dbcon/dmlpackageproc/dmlpackageprocessor.h @@ -97,7 +97,8 @@ class DMLPackageProcessor ACTIVE_TRANSACTION_ERROR, TABLE_LOCK_ERROR, JOB_ERROR, - JOB_CANCELED + JOB_CANCELED, + DBRM_READ_ONLY }; enum DebugLevel /** @brief Debug level type enumeration */ diff --git a/dmlproc/dmlprocessor.cpp b/dmlproc/dmlprocessor.cpp index 81cce5031..c2e989b06 100644 --- a/dmlproc/dmlprocessor.cpp +++ b/dmlproc/dmlprocessor.cpp @@ -1387,7 +1387,7 @@ void DMLProcessor::operator()() 0) // > 0 implies succesful retrieval. It doesn't imply anything about the contents { messageqcpp::ByteStream results; - const char* responseMsg = 0; + std::string responseMsg; bool bReject = false; // Check to see if we're in write suspended mode @@ -1433,6 +1433,14 @@ void DMLProcessor::operator()() } } + // MCOL-4988 Check if DBRM is in READ ONLY mode + if (fDbrm->isReadWrite() == BRM::ERR_READONLY) + { + BRM::errString(BRM::ERR_READONLY, responseMsg); + status = DMLPackageProcessor::DBRM_READ_ONLY; + bReject = true; + } + if (bReject) { // For batch insert, we need to send a lastpkg message