[-]
[+]
|
Changed |
cego.changes
|
|
[-]
[+]
|
Changed |
cego.spec
^
|
|
[-]
[+]
|
Deleted |
cego-2.15.5.tar.bz2/src/#CegoAdminHandler.cc#
^
|
@@ -1,4671 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-// CegoAdminHandler.cc
-// -------------------
-// Cego admin handler class implementation
-//
-// Design and Implementation by Bjoern Lemke
-//
-// (C)opyright 2000-2010 Bjoern Lemke
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; see the file COPYING. If not, write to
-// the Free Software Foundation, 59 Temple Place - Suite 330,
-// Boston, MA 02111-1307, USA.
-//
-// IMPLEMENTATION MODULE
-//
-// Class: CegoAdminHandler
-//
-// Description:
-//
-// Status: QG-2.6
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include <lfc/AESCrypt.h>
-#include <lfc/Datetime.h>
-
-#include "CegoDefs.h"
-#include "CegoXMLdef.h"
-#include "CegoAdminHandler.h"
-#include "CegoTypeConverter.h"
-#include "CegoDatabaseManager.h"
-
-#include <string.h>
-#include <stdlib.h>
-
-CegoAdminHandler::CegoAdminHandler(CegoModule *pModule, NetHandler *pN)
-{
- _pN = pN;
- _pModule = pModule;
-
- Document *pDoc = new Document(XML_CEGO);
- pDoc->setAttribute(XML_VERSION_ATTR, XML_VERSION_VALUE);
-
- _xml.setDocument(pDoc);
-
- _modId = _pModule->getModId("CegoAdminHandler");
-}
-
-CegoAdminHandler::~CegoAdminHandler()
-{
- Document *pDoc = _xml.getDocument();
- pDoc->clear();
- delete pDoc;
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::requestSession(const Chain& user, const Chain& password, bool doEncrypt)
-{
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("Request session for user ") + user + Chain("/") + password);
-#endif
-
- _xml.getDocument()->clear();
-
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
-
- pRoot->setAttribute(XML_NAME_ATTR, user);
-
- if ( doEncrypt )
- {
- AESCrypt aescrypt(CEGOAESKEY, CEGOAESKEYLEN);
- pRoot->setAttribute(XML_PASSWD_ATTR, aescrypt.encrypt(password));
- }
- else
- {
- pRoot->setAttribute(XML_PASSWD_ATTR, password);
- }
-
- _xml.getDocument()->setRootElement(pRoot);
- _xml.getDocument()->setDocType(Chain(XML_ADMINSESSION_REQUEST));
-
- Chain request;
- _xml.getXMLChain(request);
-
- _xml.getDocument()->clear();
-
- _pN->setMsg(request, request.length());
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("Requesting session ..."));
-#endif
-
- _pN->writeMsg();
-
- _pN->readMsg();
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("--- XML ---"));
- _pModule->log(_modId, Logger::DEBUG, _pN->getMsg());
- _pModule->log(_modId, Logger::DEBUG, Chain("--- --- ---"));
-#endif
-
- _xml.getDocument()->clear();
- _xml.setChain( _pN->getMsg() );
- _xml.parse();
-
- Chain docType = _xml.getDocument()->getDocType();
-
- if ( docType == Chain(XML_OK_DOC) )
- {
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("Session established"));
-#endif
- return ADM_OK;
- }
- else // if ( docType == Chain(XML_ERROR_DOC) )
- {
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("Session rejected"));
-#endif
-
- return ADM_ERROR;
- }
-
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::closeSession()
-{
-
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
-
- _xml.getDocument()->setRootElement(pRoot);
- _xml.getDocument()->setDocType(XML_SESSION_CLOSE);
- Chain request;
- _xml.getXMLChain(request);
- _xml.getDocument()->clear();
-
- _pN->setMsg(request, request.length());
-
- _pN->writeMsg();
-
- _pN->readMsg();
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("--- XML ---"));
- _pModule->log(_modId, Logger::DEBUG, _pN->getMsg());
- _pModule->log(_modId, Logger::DEBUG, Chain("--- --- ---"));
-#endif
-
- _xml.getDocument()->clear();
- _xml.setChain( _pN->getMsg() );
- _xml.parse();
-
- Chain docType = _xml.getDocument()->getDocType();
-
- if ( docType == Chain(XML_OK_DOC) )
- {
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("Session closed"));
-#endif
-
- return ADM_OK;
- }
- else // if ( docType == Chain(XML_ERROR_DOC) )
- {
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("Session close failed"));
-#endif
-
- return ADM_ERROR;
- }
-}
-
-bool CegoAdminHandler::acceptSession()
-{
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("Accepting session"));
-#endif
-
- try {
-
- _xml.getDocument()->clear();
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("--- XML ---"));
- _pModule->log(_modId, Logger::DEBUG, _pN->getMsg());
- _pModule->log(_modId, Logger::DEBUG, Chain("--- --- ---"));
-#endif
-
- _xml.setChain( _pN->getMsg() );
- _xml.parse();
-
-
- Chain docType = _xml.getDocument()->getDocType();
-
- if ( docType != Chain(XML_ADMINSESSION_REQUEST) )
- {
-
- _pModule->log(_modId, Logger::LOGERR, Chain("Invalid request"));
-
- _xml.getDocument()->clear();
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_MSG_ATTR, Chain("Invalid request"));
-
- _xml.getDocument()->setRootElement(pRoot);
-
- _xml.getDocument()->setDocType(XML_ERROR_DOC);
-
- Chain response;
- _xml.getXMLChain(response);
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("--- XML ---"));
- _pModule->log(_modId, Logger::DEBUG, response);
- _pModule->log(_modId, Logger::DEBUG, Chain("--- --- ---"));
-#endif
-
- _pN->setMsg(response, response.length());
-
- _pN->writeMsg();
-
- return false;
- }
- else
- {
-
- Element *pRoot = _xml.getDocument()->getRootElement();
- if ( pRoot )
- {
- _user = pRoot->getAttributeValue(XML_NAME_ATTR);
- _password = pRoot->getAttributeValue(XML_PASSWD_ATTR);
-
- // response is sent after authorization check
-
- return true;
- }
- else
- {
- throw Exception(EXLOC, "Cannot get root element from message");
- }
- }
- }
- catch ( Exception e)
- {
- Chain msg;
- e.pop(msg);
- _pModule->log(_modId, Logger::LOGERR, Chain("Aborting session. Reason=") + msg);
- _pN->sendNack();
- return false;
-
- }
-}
-
-void CegoAdminHandler::setNetHandle(NetHandler *pN)
-{
- _pN = pN;
-}
-
-NetHandler* CegoAdminHandler::getNetHandle()
-{
- return _pN;
-}
-
-CegoAdminHandler::RequestType CegoAdminHandler::acceptRequest()
-{
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("Accepting request"));
-#endif
-
- if ( _pN->waitMsg(NETMNG_WAITMSG_TIMEOUT) == false )
- return CegoAdminHandler::REQTIMEOUT;
-
- _pN->readMsg();
-
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("--- XML ---"));
- _pModule->log(_modId, Logger::DEBUG, _pN->getMsg());
- _pModule->log(_modId, Logger::DEBUG, Chain("--- --- ---"));
-#endif
-
- _xml.getDocument()->clear();
- _xml.setChain( _pN->getMsg() );
- _xml.parse();
-
- Chain docType = _xml.getDocument()->getDocType();
-
- if ( docType == Chain(XML_RETRIEVETABLESET_REQUEST) )
- {
- return CegoAdminHandler::RETRIEVETABLESET;
- }
- else if ( docType == Chain(XML_LOCKINFO_REQUEST) )
- {
- return CegoAdminHandler::LOCKINFO;
- }
- else if ( docType == Chain(XML_LOCKSTAT_REQUEST) )
- {
- return CegoAdminHandler::LOCKSTAT;
- }
- else if ( docType == Chain(XML_POOLINFO_REQUEST) )
- {
- return CegoAdminHandler::POOLINFO;
- }
- else if ( docType == Chain(XML_POOLENTRYLIST_REQUEST) )
- {
- return CegoAdminHandler::POOLENTRYLIST;
- }
- else if ( docType == Chain(XML_THREADINFO_REQUEST) )
- {
- return CegoAdminHandler::THREADINFO;
- }
- else if ( docType == Chain(XML_DBTHREADABORT_REQUEST) )
- {
- return CegoAdminHandler::DBTHREADABORT;
- }
- else if ( docType == Chain(XML_DBTHREADINFO_REQUEST) )
- {
- return CegoAdminHandler::DBTHREADINFO;
- }
- else if ( docType == Chain(XML_ADMTHREADINFO_REQUEST) )
- {
- return CegoAdminHandler::ADMTHREADINFO;
- }
- else if ( docType == Chain(XML_LOGTHREADINFO_REQUEST) )
- {
- return CegoAdminHandler::LOGTHREADINFO;
- }
- else if ( docType == Chain(XML_DBSESSIONINFO_REQUEST) )
- {
- return CegoAdminHandler::DBSESSIONINFO;
- }
- else if ( docType == Chain(XML_COPYINFO_REQUEST) )
- {
- return CegoAdminHandler::COPYINFO;
- }
- else if ( docType == Chain(XML_DEFINE_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::DEFINE_TABLESET;
- }
- else if ( docType == Chain(XML_REMOVE_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::REMOVE_TABLESET;
- }
- else if ( docType == Chain(XML_CREATE_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::CREATE_TABLESET;
- }
- else if ( docType == Chain(XML_DROP_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::DROP_TABLESET;
- }
- else if ( docType == Chain(XML_START_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::START_TABLESET;
- }
- else if ( docType == Chain(XML_STOP_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::STOP_TABLESET;
- }
- else if ( docType == Chain(XML_SYNC_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::SYNC_TABLESET;
- }
- else if ( docType == Chain(XML_INIT_LOGS_REQUEST) )
- {
- return CegoAdminHandler::INIT_LOGS;
- }
- else if ( docType == Chain(XML_GET_DBSPEC_REQUEST) )
- {
- return CegoAdminHandler::GET_DBSPEC;
- }
- else if ( docType == Chain(XML_COPY_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::COPY_TABLESET;
- }
- else if ( docType == Chain(XML_COPY_FILE_REQUEST) )
- {
- return CegoAdminHandler::COPY_FILE;
- }
- else if ( docType == Chain(XML_START_RECOVER_REQUEST) )
- {
- return CegoAdminHandler::START_RECOVERY;
- }
- else if ( docType == Chain(XML_STOP_RECOVER_REQUEST) )
- {
- return CegoAdminHandler::STOP_RECOVERY;
- }
- else if ( docType == Chain(XML_GET_NODELIST_REQUEST) )
- {
- return CegoAdminHandler::GET_NODELIST;
- }
- else if ( docType == Chain(XML_GET_DBINFO_REQUEST) )
- {
- return CegoAdminHandler::GET_DBINFO;
- }
- else if ( docType == Chain(XML_GET_TSINFO_REQUEST) )
- {
- return CegoAdminHandler::GET_TSINFO;
- }
- else if ( docType == Chain(XML_GET_DETAILED_TSINFO_REQUEST) )
- {
- return CegoAdminHandler::GET_DETAILED_TSINFO;
- }
- else if ( docType == Chain(XML_GET_OBJECT_INFO_REQUEST) )
- {
- return CegoAdminHandler::GET_OBJECT_INFO;
- }
- else if ( docType == Chain(XML_GET_TRANSACTION_INFO_REQUEST) )
- {
- return CegoAdminHandler::GET_TRANSACTION_INFO;
- }
- else if ( docType == Chain(XML_GET_BUSTAT_REQUEST) )
- {
- return CegoAdminHandler::GET_BUSTAT;
- }
- else if ( docType == Chain(XML_PROP_TSINFO_REQUEST) )
- {
- return CegoAdminHandler::PROP_TSINFO;
- }
- else if ( docType == Chain(XML_SET_TABLESETNODE_REQUEST) )
- {
- return CegoAdminHandler::SET_TABLESETNODE;
- }
- else if ( docType == Chain(XML_SET_LSN_REQUEST) )
- {
- return CegoAdminHandler::SET_LSN;
- }
- else if ( docType == Chain(XML_SET_RUNSTATE_REQUEST) )
- {
- return CegoAdminHandler::SET_RUNSTATE;
- }
- else if ( docType == Chain(XML_SET_SYNCSTATE_REQUEST) )
- {
- return CegoAdminHandler::SET_SYNCSTATE;
- }
- else if ( docType == Chain(XML_EXPORT_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::EXPORT_TABLESET;
- }
- else if ( docType == Chain(XML_IMPORT_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::IMPORT_TABLESET;
- }
- else if ( docType == Chain(XML_EXPORT_TABLE_REQUEST) )
- {
- return CegoAdminHandler::EXPORT_TABLE;
- }
- else if ( docType == Chain(XML_IMPORT_TABLE_REQUEST) )
- {
- return CegoAdminHandler::IMPORT_TABLE;
- }
- else if ( docType == Chain(XML_ADD_DATAFILE_REQUEST) )
- {
- return CegoAdminHandler::ADD_DATAFILE;
- }
- else if ( docType == Chain(XML_SHOW_USER_REQUEST) )
- {
- return CegoAdminHandler::SHOW_USER;
- }
- else if ( docType == Chain(XML_ADD_USER_REQUEST) )
- {
- return CegoAdminHandler::ADD_USER;
- }
- else if ( docType == Chain(XML_REMOVE_USER_REQUEST) )
- {
- return CegoAdminHandler::REMOVE_USER;
- }
- else if ( docType == Chain(XML_CHANGE_PWD_REQUEST) )
- {
- return CegoAdminHandler::CHANGE_PWD;
- }
- else if ( docType == Chain(XML_ASSIGN_ROLE_REQUEST) )
- {
- return CegoAdminHandler::ASSIGN_ROLE;
- }
- else if ( docType == Chain(XML_REMOVE_ROLE_REQUEST) )
- {
- return CegoAdminHandler::REMOVE_ROLE;
- }
- else if ( docType == Chain(XML_LIST_ROLE_REQUEST) )
- {
- return CegoAdminHandler::LIST_ROLE;
- }
- else if ( docType == Chain(XML_SHOW_ROLE_REQUEST) )
- {
- return CegoAdminHandler::SHOW_ROLE;
- }
- else if ( docType == Chain(XML_CREATE_ROLE_REQUEST) )
- {
- return CegoAdminHandler::CREATE_ROLE;
- }
- else if ( docType == Chain(XML_DROP_ROLE_REQUEST) )
- {
- return CegoAdminHandler::DROP_ROLE;
- }
- else if ( docType == Chain(XML_SET_PERM_REQUEST) )
- {
- return CegoAdminHandler::SET_PERM;
- }
- else if ( docType == Chain(XML_REMOVE_PERM_REQUEST) )
- {
- return CegoAdminHandler::REMOVE_PERM;
- }
-
- else if ( docType == Chain(XML_USER_TRACE_REQUEST) )
- {
- return CegoAdminHandler::USER_TRACE;
- }
- else if ( docType == Chain(XML_ADD_ARCHLOG_REQUEST) )
- {
- return CegoAdminHandler::ADD_ARCHLOG;
- }
- else if ( docType == Chain(XML_REMOVE_ARCHLOG_REQUEST) )
- {
- return CegoAdminHandler::REMOVE_ARCHLOG;
- }
- else if ( docType == Chain(XML_BEGIN_BACKUP_REQUEST) )
- {
- return CegoAdminHandler::BEGIN_BACKUP;
- }
- else if ( docType == Chain(XML_END_BACKUP_REQUEST) )
- {
- return CegoAdminHandler::END_BACKUP;
- }
- else if ( docType == Chain(XML_RECOVER_REQUEST) )
- {
- return CegoAdminHandler::RECOVER;
- }
- else if ( docType == Chain(XML_SECSWITCH_REQUEST) )
- {
- return CegoAdminHandler::SECSWITCH;
- }
- else if ( docType == Chain(XML_VERIFY_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::VERIFY_TABLESET;
- }
- else if ( docType == Chain(XML_CORRECT_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::CORRECT_TABLESET;
- }
- else if ( docType == Chain(XML_DUMP_OBJECT_REQUEST) )
- {
- return CegoAdminHandler::DUMP_OBJECT;
- }
- else if ( docType == Chain(XML_SET_LOGMNG_REQUEST) )
- {
- return CegoAdminHandler::SET_LOGMNG;
- }
- else if ( docType == Chain(XML_SHOW_LOGMNG_REQUEST) )
- {
- return CegoAdminHandler::SHOW_LOGMNG;
- }
- else if ( docType == Chain(XML_SET_CHECKPOINT_REQUEST) )
- {
- return CegoAdminHandler::SET_CHECKPOINT;
- }
- else if ( docType == Chain(XML_SET_TSINITFILE_REQUEST) )
- {
- return CegoAdminHandler::SET_TSINITFILE;
- }
-
- else if ( docType == Chain(XML_SET_TSSYSSIZE_REQUEST) )
- {
- return CegoAdminHandler::SET_TSSYSSIZE;
- }
- else if ( docType == Chain(XML_SET_TSTMPSIZE_REQUEST) )
- {
- return CegoAdminHandler::SET_TSTMPSIZE;
- }
- else if ( docType == Chain(XML_SET_TSROOTPATH_REQUEST) )
- {
- return CegoAdminHandler::SET_TSROOTPATH;
- }
- else if ( docType == Chain(XML_SET_TSTICKET_REQUEST) )
- {
- return CegoAdminHandler::SET_TSTICKET;
- }
- else if ( docType == Chain(XML_SET_TSLOGNUM_REQUEST) )
- {
- return CegoAdminHandler::SET_TSLOGNUM;
- }
- else if ( docType == Chain(XML_SET_TSLOGSIZE_REQUEST) )
- {
- return CegoAdminHandler::SET_TSLOGSIZE;
- }
- else if ( docType == Chain(XML_SET_TSSORTAREASIZE_REQUEST) )
- {
- return CegoAdminHandler::SET_TSSORTAREASIZE;
- }
-
- // mediator requests
- else if ( docType == Chain(XML_MED_NOTIFY_REQUEST) )
- {
- return CegoAdminHandler::MED_NOTIFY;
- }
- else if ( docType == Chain(XML_MED_DEFINE_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::MED_DEFINE_TABLESET;
- }
- else if ( docType == Chain(XML_MED_REMOVE_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::MED_REMOVE_TABLESET;
- }
- else if ( docType == Chain(XML_MED_CREATE_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::MED_CREATE_TABLESET;
- }
- else if ( docType == Chain(XML_MED_DROP_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::MED_DROP_TABLESET;
- }
- else if ( docType == Chain(XML_MED_START_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::MED_START_TABLESET;
- }
- else if ( docType == Chain(XML_MED_STOP_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::MED_STOP_TABLESET;
- }
- else if ( docType == Chain(XML_MED_COPY_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::MED_COPY_TABLESET;
- }
- else if ( docType == Chain(XML_MED_SWITCH_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::MED_SWITCH_TABLESET;
- }
- else if ( docType == Chain(XML_MED_ADD_ARCHLOG_REQUEST) )
- {
- return CegoAdminHandler::MED_ADD_ARCHLOG;
- }
- else if ( docType == Chain(XML_MED_REMOVE_ARCHLOG_REQUEST) )
- {
- return CegoAdminHandler::MED_REMOVE_ARCHLOG;
- }
- else if ( docType == Chain(XML_MED_ADD_DATAFILE_REQUEST) )
- {
- return CegoAdminHandler::MED_ADD_DATAFILE;
- }
- else if ( docType == Chain(XML_MED_GET_TABLESETLIST_REQUEST) )
- {
- return CegoAdminHandler::MED_GET_TABLESETLIST;
- }
- else if ( docType == Chain(XML_MED_GET_DETAILEDTABLESETINFO_REQUEST) )
- {
- return CegoAdminHandler::MED_GET_DETAILEDTABLESETINFO;
- }
- else if ( docType == Chain(XML_MED_GET_OBJECTINFO_REQUEST) )
- {
- return CegoAdminHandler::MED_GET_OBJECTINFO;
- }
- else if ( docType == Chain(XML_MED_GET_TRANSACTIONINFO_REQUEST) )
- {
- return CegoAdminHandler::MED_GET_TRANSACTIONINFO;
- }
- else if ( docType == Chain(XML_MED_GET_BUSTAT_REQUEST) )
- {
- return CegoAdminHandler::MED_GET_BUSTAT;
- }
- else if ( docType == Chain(XML_MED_RESET_BUSTAT_REQUEST) )
- {
- return CegoAdminHandler::MED_RESET_BUSTAT;
- }
- else if ( docType == Chain(XML_MED_BEGIN_BACKUP_REQUEST) )
- {
- return CegoAdminHandler::MED_BEGIN_BACKUP;
- }
- else if ( docType == Chain(XML_MED_END_BACKUP_REQUEST) )
- {
- return CegoAdminHandler::MED_END_BACKUP;
- }
- else if ( docType == Chain(XML_MED_RECOVER_REQUEST) )
- {
- return CegoAdminHandler::MED_RECOVER;
- }
- else if ( docType == Chain(XML_MED_SECSWITCH_REQUEST) )
- {
- return CegoAdminHandler::MED_SECSWITCH;
- }
- else if ( docType == Chain(XML_SEC_MEDSWITCH_REQUEST) )
- {
- return CegoAdminHandler::SEC_MEDSWITCH;
- }
- else if ( docType == Chain(XML_MED_SECRELOCATE_REQUEST) )
- {
- return CegoAdminHandler::MED_SECRELOCATE;
- }
- else if ( docType == Chain(XML_SEC_MEDRELOCATE_REQUEST) )
- {
- return CegoAdminHandler::SEC_MEDRELOCATE;
- }
- else if ( docType == Chain(XML_MED_CHECK_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::MED_CHECK_TABLESET;
- }
- else if ( docType == Chain(XML_MED_VERIFY_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::MED_VERIFY_TABLESET;
- }
- else if ( docType == Chain(XML_MED_CORRECT_TABLESET_REQUEST) )
- {
- return CegoAdminHandler::MED_CORRECT_TABLESET;
- }
- else if ( docType == Chain(XML_MED_ENABLE_ARCHLOG_REQUEST) )
- {
- return CegoAdminHandler::MED_ENABLE_ARCHLOG;
- }
- else if ( docType == Chain(XML_MED_DISABLE_ARCHLOG_REQUEST) )
- {
- return CegoAdminHandler::MED_DISABLE_ARCHLOG;
- }
- else if ( docType == Chain(XML_SESSION_CLOSE) )
- {
- return CegoAdminHandler::SESSION_CLOSE;
- }
- else
- {
- return CegoAdminHandler::UNKNOWN;
- }
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqRetrieveTableSet(const Chain& masterHost)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_HOSTNAME_ATTR, masterHost);
- return sendReq(XML_RETRIEVETABLESET_REQUEST, pRoot);
-}
-
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqLockInfo(const Chain& lockCat)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_LOCKCAT_ATTR, lockCat);
- return sendReq(XML_LOCKINFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqLockStat()
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- return sendReq(XML_LOCKSTAT_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqPoolInfo()
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- return sendReq(XML_POOLINFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqPoolEntryList()
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- return sendReq(XML_POOLENTRYLIST_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqThreadInfo()
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- return sendReq(XML_THREADINFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqDbThreadAbort(int threadId)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_THID_ATTR, Chain(threadId));
- return sendReq(XML_DBTHREADABORT_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqDbThreadInfo()
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- return sendReq(XML_DBTHREADINFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqAdmThreadInfo()
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- return sendReq(XML_ADMTHREADINFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqLogThreadInfo()
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- return sendReq(XML_LOGTHREADINFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqDbSessionInfo()
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- return sendReq(XML_DBSESSIONINFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqCopyInfo()
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- return sendReq(XML_COPYINFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqDefineTableSet(
- const Chain& tableSet,
- const Chain& tsRoot,
- const Chain& tsTicket,
- const Chain& primary,
- const Chain& secondary,
- const Chain& mediator,
- int sysFileId, int tempFileId, int sysFileSize, int tmpFileSize,
- int logFileSize, int logFileNum, long sortAreaSize)
-{
-
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_TSROOT_ATTR, tsRoot);
- pRoot->setAttribute(XML_TSTICKET_ATTR, tsTicket);
- pRoot->setAttribute(XML_PRIMARY_ATTR, primary);
- pRoot->setAttribute(XML_SECONDARY_ATTR, secondary);
- pRoot->setAttribute(XML_MEDIATOR_ATTR, mediator);
- pRoot->setAttribute(XML_SYSFID_ATTR, Chain(sysFileId));
- pRoot->setAttribute(XML_TMPFID_ATTR, Chain(tempFileId));
- pRoot->setAttribute(XML_SYSSIZE_ATTR, Chain(sysFileSize));
- pRoot->setAttribute(XML_TMPSIZE_ATTR, Chain(tmpFileSize));
- pRoot->setAttribute(XML_LOGFILESIZE_ATTR, Chain(logFileSize));
- pRoot->setAttribute(XML_LOGFILENUM_ATTR, Chain(logFileNum));
- pRoot->setAttribute(XML_SORTAREASIZE_ATTR, Chain(sortAreaSize));
-
- return sendReq(XML_DEFINE_TABLESET_REQUEST, pRoot);
-}
-
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqRemoveTableSet(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_REMOVE_TABLESET_REQUEST, pRoot);
-}
-
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqCreateTableSet(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_CREATE_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqDropTableSet(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_DROP_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqStartTableSet(const Chain& tableSet, bool cleanIt, bool forceload)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
-
- if ( cleanIt )
- pRoot->setAttribute(XML_CLEANUP_ATTR, XML_TRUE_VALUE);
- else
- pRoot->setAttribute(XML_CLEANUP_ATTR, XML_FALSE_VALUE);
-
- if ( forceload )
- pRoot->setAttribute(XML_FORCELOAD_ATTR, XML_TRUE_VALUE);
- else
- pRoot->setAttribute(XML_FORCELOAD_ATTR, XML_FALSE_VALUE);
-
-
- return sendReq(XML_START_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqStopTableSet(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_STOP_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqVerifyTableSet(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_VERIFY_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqInitLogs(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_INIT_LOGS_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSyncTableSet(const Chain& tableSet, const Chain& msg, const Chain& escCmd, int timeout)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_BUMSG_ATTR, msg);
-
- if ( escCmd != Chain("") )
- {
- pRoot->setAttribute(XML_ESCCMD_ATTR, escCmd);
- pRoot->setAttribute(XML_TIMEOUT_ATTR, Chain(timeout));
- }
- return sendReq(XML_SYNC_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqStartRecovery(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_START_RECOVER_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqStopRecovery(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_STOP_RECOVER_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqCopyTableSet(const Chain& tableSet, const Chain& secondary, const Chain& mediator)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_SECONDARY_ATTR, secondary);
- pRoot->setAttribute(XML_MEDIATOR_ATTR, mediator);
- return sendReq(XML_COPY_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqCopyFile(const Chain& fileName, int copyId)
-{
-
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_FILENAME_ATTR, fileName);
-
- File copyFile(fileName);
- copyFile.open(File::READ);
-
- int fileSize = copyFile.Size();
-
- pRoot->setAttribute(XML_FILESIZE_ATTR, Chain(copyFile.Size()));
-
- _xml.getDocument()->clear();
- _xml.getDocument()->setRootElement(pRoot);
- _xml.getDocument()->setDocType(XML_COPY_FILE_REQUEST);
-
- Chain request;
- _xml.getXMLChain(request);
- _xml.getDocument()->clear();
-
- _pN->setMsg(request, request.length());
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("Sending request ") + request);
-#endif
-
- _pN->writeMsg();
-
- _pN->readMsg();
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("Got response ") + _pN->getMsg());
-#endif
-
- _xml.getDocument()->clear();
- _xml.setChain( _pN->getMsg() );
- _xml.parse();
-
- Chain docType = _xml.getDocument()->getDocType();
-
- CegoAdminHandler::ResultType res = ADM_OK;
-
- if ( docType == Chain(XML_OK_DOC) )
- {
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("Sending file data for ") + fileName);
-#endif
-
-
- char buf[NETMNG_MSG_BUFLEN];
- int len;
-
- int sentByte = 0;
- while ( ( len = copyFile.readByte(buf, NETMNG_MSG_BUFLEN) ) > 0 )
- {
- _pN->setMsg(buf, len);
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("Sending ") + Chain(len) + Chain(" bytes"));
-#endif
-
- _pN->writeMsg();
- _pN->recvAck();
-
- sentByte += len;
-
- }
- res = ADM_OK;
- }
- else // if ( docType == Chain(XML_ERROR_DOC) )
- {
- res = ADM_ERROR;
- }
-
- copyFile.close();
- return res;
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqGetDbSpec(Chain& dbSpec)
-{
-
-
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
-
- _xml.getDocument()->clear();
- _xml.getDocument()->setRootElement(pRoot);
- _xml.getDocument()->setDocType(XML_GET_DBSPEC_REQUEST);
-
- Chain request;
- _xml.getXMLChain(request);
- _xml.getDocument()->clear();
-
- _pN->setMsg(request, request.length());
-
- _pN->writeMsg();
-
- _pN->readMsg();
-
- _xml.getDocument()->clear();
- _xml.setChain( _pN->getMsg() );
- _xml.parse();
-
- Chain docType = _xml.getDocument()->getDocType();
-
- if ( docType == Chain(XML_ERROR_DOC) )
- return ADM_ERROR;
-
-
- if ( docType == Chain(XML_OK_DOC) )
- {
- pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- ListT<Element*> specList = pRoot->getChildren(XML_DATABASE_ELEMENT);
-
- Element** pSpec = specList.First();
-
- if ( pSpec )
- {
-
- Document *pDoc = new Document(XML_CEGO);
- pDoc->setAttribute(XML_VERSION_ATTR, XML_VERSION_VALUE);
- XMLSuite xml;
- xml.setDocument(pDoc);
-
- pDoc->setRootElement(*pSpec);
- pDoc->setDocType(XML_CEGO_DB_CONFIG_DOC);
-
- xml.getXMLChain(dbSpec);
-
- delete pDoc;
- }
- }
- }
- return ADM_OK;
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqGetNodeList()
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- return sendReq(XML_GET_NODELIST_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqGetDbInfo()
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- return sendReq(XML_GET_DBINFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqGetTSInfo(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_GET_TSINFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqPropTSInfo(Element *pTSInfo)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->addContent(pTSInfo);
- return sendReq(XML_PROP_TSINFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSetTableSetNode(const Chain& tableSet, const Chain& primary, const Chain& secondary, const Chain& mediator)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_PRIMARY_ATTR, primary);
- pRoot->setAttribute(XML_SECONDARY_ATTR, secondary);
- pRoot->setAttribute(XML_MEDIATOR_ATTR, mediator);
- return sendReq(XML_SET_TABLESETNODE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSetLSN(const Chain& tableSet, long lsn)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_LSN_ATTR, Chain(lsn));
- return sendReq(XML_SET_LSN_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSetRunState(const Chain& tableSet, const Chain& runState)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_RUNSTATE_ATTR, runState);
- return sendReq(XML_SET_RUNSTATE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSetSyncState(const Chain& tableSet, const Chain& syncState)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_SYNCSTATE_ATTR, syncState);
- return sendReq(XML_SET_SYNCSTATE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqExportTableSet(const Chain& tableSet, bool isStructure, const Chain& exportFile, const Chain& expMode)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_FILENAME_ATTR, exportFile);
- if ( isStructure )
- pRoot->setAttribute(XML_ISSTRUCT_ATTR, XML_TRUE_VALUE);
- else
- pRoot->setAttribute(XML_ISSTRUCT_ATTR, XML_FALSE_VALUE);
- pRoot->setAttribute(XML_MODE_ATTR, expMode);
-
- return sendReq(XML_EXPORT_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqImportTableSet(const Chain& tableSet, bool isStructure, const Chain& importFile, bool doLogging, const Chain& impMode)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_FILENAME_ATTR, importFile);
- if ( isStructure )
- pRoot->setAttribute(XML_ISSTRUCT_ATTR, XML_TRUE_VALUE);
- else
- pRoot->setAttribute(XML_ISSTRUCT_ATTR, XML_FALSE_VALUE);
- if ( doLogging )
- pRoot->setAttribute(XML_DOLOGGING_ATTR, XML_TRUE_VALUE);
- else
- pRoot->setAttribute(XML_DOLOGGING_ATTR, XML_FALSE_VALUE);
-
- pRoot->setAttribute(XML_MODE_ATTR, impMode);
- return sendReq(XML_IMPORT_TABLESET_REQUEST, pRoot);
-}
-
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqExportTable(const Chain& tableSet, const Chain& tableName, const Chain& exportFile, const Chain& expMode)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_TABLENAME_ATTR, tableName);
- pRoot->setAttribute(XML_FILENAME_ATTR, exportFile);
- pRoot->setAttribute(XML_MODE_ATTR, expMode);
- return sendReq(XML_EXPORT_TABLE_REQUEST, pRoot);
-}
-
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqImportTable(const Chain& tableSet, const Chain& tableName, const Chain& importFile, bool doLogging, const Chain& impMode)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_TABLENAME_ATTR, tableName);
- pRoot->setAttribute(XML_FILENAME_ATTR, importFile);
- pRoot->setAttribute(XML_MODE_ATTR, impMode);
- if ( doLogging )
- pRoot->setAttribute(XML_DOLOGGING_ATTR, XML_TRUE_VALUE);
- else
- pRoot->setAttribute(XML_DOLOGGING_ATTR, XML_FALSE_VALUE);
-
- return sendReq(XML_IMPORT_TABLE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqAddDataFile(const Chain& tableSet, const Chain& type, int fileId, const Chain& dataFile, int fileSize)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_TYPE_ATTR, type);
- pRoot->setAttribute(XML_FILEID_ATTR, Chain(fileId));
- pRoot->setAttribute(XML_FILENAME_ATTR, dataFile);
- pRoot->setAttribute(XML_FILESIZE_ATTR, Chain(fileSize));
- return sendReq(XML_ADD_DATAFILE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqShowUser()
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- return sendReq(XML_SHOW_USER_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqAddUser(const Chain& user, const Chain& password)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_NAME_ATTR, user);
- AESCrypt aescrypt(CEGOAESKEY, CEGOAESKEYLEN);
- pRoot->setAttribute(XML_PASSWD_ATTR, aescrypt.encrypt(password));
-
- return sendReq(XML_ADD_USER_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqRemoveUser(const Chain& user)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_NAME_ATTR, user);
- return sendReq(XML_REMOVE_USER_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqChangePwd(const Chain& user, const Chain& password)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_NAME_ATTR, user);
- AESCrypt aescrypt(CEGOAESKEY, CEGOAESKEYLEN);
- pRoot->setAttribute(XML_PASSWD_ATTR, aescrypt.encrypt(password));
-
- return sendReq(XML_CHANGE_PWD_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqListRole()
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- return sendReq(XML_LIST_ROLE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqShowRole(const Chain& role)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_ROLE_ATTR, role);
- return sendReq(XML_SHOW_ROLE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqCreateRole(const Chain& role)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_ROLE_ATTR, role);
- return sendReq(XML_CREATE_ROLE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqDropRole(const Chain& role)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_ROLE_ATTR, role);
- return sendReq(XML_DROP_ROLE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqAssignRole(const Chain& user, const Chain& role)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_NAME_ATTR, user);
- pRoot->setAttribute(XML_ROLE_ATTR, role);
- return sendReq(XML_ASSIGN_ROLE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqRemoveRole(const Chain& user, const Chain& role)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_NAME_ATTR, user);
- pRoot->setAttribute(XML_ROLE_ATTR, role);
- return sendReq(XML_REMOVE_ROLE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSetPermission(const Chain& role, const Chain& permid, const Chain& tableSet, const Chain& filter, const Chain& perm)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_ROLE_ATTR, role);
- pRoot->setAttribute(XML_PERMID_ATTR, permid);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_FILTER_ATTR, filter);
- pRoot->setAttribute(XML_PERM_ATTR, perm);
-
- return sendReq(XML_SET_PERM_REQUEST, pRoot);
-
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqRemovePermission(const Chain& role, const Chain& permid)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_ROLE_ATTR, role);
- pRoot->setAttribute(XML_PERMID_ATTR, permid);
-
- return sendReq(XML_REMOVE_PERM_REQUEST, pRoot);
-
-}
-
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqUserTrace( const Chain& user, bool isOn)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_NAME_ATTR, user);
- if ( isOn )
- pRoot->setAttribute(XML_TRACE_ATTR, XML_ON_VALUE);
- else
- pRoot->setAttribute(XML_TRACE_ATTR, XML_OFF_VALUE);
-
- return sendReq(XML_USER_TRACE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqAddArchLog(const Chain& tableSet, const Chain& archId, const Chain& archPath)
-{
-
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_ARCHID_ATTR, archId);
- pRoot->setAttribute(XML_ARCHPATH_ATTR, archPath);
- return sendReq(XML_ADD_ARCHLOG_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqBeginBackup(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_BEGIN_BACKUP_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqEndBackup(const Chain& tableSet, bool keepTicket)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- if ( keepTicket )
- pRoot->setAttribute(XML_KEEPTICKET_ATTR, XML_TRUE_VALUE);
- else
- pRoot->setAttribute(XML_KEEPTICKET_ATTR, XML_FALSE_VALUE);
-
- return sendReq(XML_END_BACKUP_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqRecover(const Chain& tableSet, int pit)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_PIT_ATTR, Chain(pit));
- return sendReq(XML_RECOVER_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSecSwitch(const Chain& tableSet, const Chain& secondary)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_SECONDARY_ATTR, secondary);
- return sendReq(XML_SECSWITCH_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqRemoveArchLog(const Chain& tableSet, const Chain& archId)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_ARCHID_ATTR, archId);
- return sendReq(XML_REMOVE_ARCHLOG_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqGetDetailedTSInfo(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_GET_DETAILED_TSINFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqGetBUStatInfo(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_GET_BUSTAT_REQUEST, pRoot);
-}
-
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqGetObjectInfo(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_GET_OBJECT_INFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqGetTransactionInfo(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_GET_TRANSACTION_INFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqDumpObject(const Chain& tableSet, CegoObject::ObjectType type, const Chain& objName)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
-
- CegoTypeConverter tc;
- pRoot->setAttribute(XML_OBJTYPE_ATTR, tc.getObjectTypeString(type));
- pRoot->setAttribute(XML_OBJNAME_ATTR, objName);
-
- return sendReq(XML_DUMP_OBJECT_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSetLogMng(const Chain& progName, int timeout)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_LOGMNGPROG_ATTR, progName);
- pRoot->setAttribute(XML_LOGMNGTIMEOUT_ATTR, Chain(timeout));
-
- return sendReq(XML_SET_LOGMNG_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqShowLogMng()
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- return sendReq(XML_SHOW_LOGMNG_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSetCheckpoint(const Chain& tableSet, int timeout)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_TIMEOUT_ATTR, Chain(timeout));
- return sendReq(XML_SET_CHECKPOINT_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSetTSInitFile(const Chain& tableSet, const Chain& initFile)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_TSINITFILE_ATTR, initFile);
- return sendReq(XML_SET_TSINITFILE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSetTSSysSize(const Chain& tableSet, int sysSize)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_SYSSIZE_ATTR, Chain(sysSize));
- return sendReq(XML_SET_TSSYSSIZE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSetTSTmpSize(const Chain& tableSet, int tmpSize)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_TMPSIZE_ATTR, Chain(tmpSize));
- return sendReq(XML_SET_TSTMPSIZE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSetTSRootPath(const Chain& tableSet, const Chain& tsRoot)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_TSROOT_ATTR, tsRoot);
- return sendReq(XML_SET_TSROOTPATH_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSetTSTicket(const Chain& tableSet, const Chain& tsTicket)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_TSTICKET_ATTR, tsTicket);
- return sendReq(XML_SET_TSTICKET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSetTSLogNum(const Chain& tableSet, int logNum)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_LOGFILENUM_ATTR, Chain(logNum));
- return sendReq(XML_SET_TSLOGNUM_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSetTSLogSize(const Chain& tableSet, int logSize)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_LOGFILESIZE_ATTR, Chain(logSize));
- return sendReq(XML_SET_TSLOGSIZE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::reqSetTSSortAreaSize(const Chain& tableSet, int sortAreaSize)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_SORTAREASIZE_ATTR, Chain(sortAreaSize));
- return sendReq(XML_SET_TSSORTAREASIZE_REQUEST, pRoot);
-}
-
-////////////////////////////////////////////////
-//////////// Mediator Services /////////////////
-////////////////////////////////////////////////
-
-CegoAdminHandler::ResultType CegoAdminHandler::medNotifyMediator(const Chain& hostName, const Chain& status,
- const ListT<Chain>& tsList, const ListT<Chain>& runList, const ListT<Chain>& syncList)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_HOSTNAME_ATTR, hostName);
- pRoot->setAttribute(XML_STATUS_ATTR, status);
-
- Chain *pTS = tsList.First();
- Chain *pSync = syncList.First();
- Chain *pRun = runList.First();
- while ( pTS && pSync )
- {
- Element* pTE = new Element(XML_TABLESET_ELEMENT);
- pTE->setAttribute(XML_NAME_ATTR, *pTS);
- pTE->setAttribute(XML_SYNCSTATE_ATTR, *pSync);
- pTE->setAttribute(XML_RUNSTATE_ATTR, *pRun);
- pRoot->addContent(pTE);
-
- pTS = tsList.Next();
- pSync = syncList.Next();
- pRun = runList.Next();
- }
-
- return sendReq(XML_MED_NOTIFY_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medStartTableSet(const Chain& tableSet, bool cleanIt, bool forceload)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- if ( cleanIt )
- pRoot->setAttribute(XML_CLEANUP_ATTR, XML_TRUE_VALUE);
- else
- pRoot->setAttribute(XML_CLEANUP_ATTR, XML_FALSE_VALUE);
-
- if ( forceload )
- pRoot->setAttribute(XML_FORCELOAD_ATTR, XML_TRUE_VALUE);
- else
- pRoot->setAttribute(XML_FORCELOAD_ATTR, XML_FALSE_VALUE);
-
- return sendReq(XML_MED_START_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medStopTableSet(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_STOP_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medDefineTableSet(const Chain& tableSet,
- const Chain& tsRoot,
- const Chain& tsTicket,
- const Chain& primary,
- const Chain& secondary,
- int sysFileSize,
- int tmpFileSize,
- int logFileSize,
- int logFileNum,
- long sortAreaSize)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_TSROOT_ATTR, tsRoot);
- pRoot->setAttribute(XML_TSTICKET_ATTR, tsTicket);
- pRoot->setAttribute(XML_PRIMARY_ATTR, primary);
- pRoot->setAttribute(XML_SECONDARY_ATTR, secondary);
- pRoot->setAttribute(XML_SYSSIZE_ATTR, Chain(sysFileSize));
- pRoot->setAttribute(XML_TMPSIZE_ATTR, Chain(tmpFileSize));
- pRoot->setAttribute(XML_LOGFILESIZE_ATTR, Chain(logFileSize));
- pRoot->setAttribute(XML_LOGFILENUM_ATTR, Chain(logFileNum));
- pRoot->setAttribute(XML_SORTAREASIZE_ATTR, Chain(sortAreaSize));
-
- return sendReq(XML_MED_DEFINE_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medDropTableSet(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_DROP_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medRemoveTableSet(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_REMOVE_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medCreateTableSet(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_CREATE_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medSwitchTableSet(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_SWITCH_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medAddDataFile(const Chain& tableSet, const Chain& fileType, const Chain& dataFile, int fileSize)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_TYPE_ATTR, fileType);
- pRoot->setAttribute(XML_FILENAME_ATTR, dataFile);
- pRoot->setAttribute(XML_FILESIZE_ATTR, Chain(fileSize));
- return sendReq(XML_MED_ADD_DATAFILE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medAddArchLog(const Chain& tableSet, const Chain& archId, const Chain& archPath)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_ARCHID_ATTR, archId);
- pRoot->setAttribute(XML_ARCHPATH_ATTR, archPath);
- return sendReq(XML_MED_ADD_ARCHLOG_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medRemoveArchLog(const Chain& tableSet, const Chain& archId)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_ARCHID_ATTR, archId);
- return sendReq(XML_MED_REMOVE_ARCHLOG_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medCopyTableSet(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_COPY_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medGetTableSetList(bool getUsage)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- if ( getUsage )
- pRoot->setAttribute(XML_USAGE_ATTR, XML_TRUE_VALUE);
- else
- pRoot->setAttribute(XML_USAGE_ATTR, XML_FALSE_VALUE);
-
- return sendReq(XML_MED_GET_TABLESETLIST_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medGetDetailedTableSetInfo(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_GET_DETAILEDTABLESETINFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medGetObjectInfo(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_GET_OBJECTINFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medGetTransactionInfo(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_GET_TRANSACTIONINFO_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medGetBUStatInfo(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_GET_BUSTAT_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medResetBUStat(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_RESET_BUSTAT_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medBeginBackup(const Chain& tableSet, const Chain& msg)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_BUMSG_ATTR, msg);
- return sendReq(XML_MED_BEGIN_BACKUP_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medEndBackup(const Chain& tableSet, const Chain& msg, bool keepTicket)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_BUMSG_ATTR, msg);
- if ( keepTicket )
- pRoot->setAttribute(XML_KEEPTICKET_ATTR, XML_TRUE_VALUE);
- else
- pRoot->setAttribute(XML_KEEPTICKET_ATTR, XML_FALSE_VALUE);
- return sendReq(XML_MED_END_BACKUP_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medRecover(const Chain& tableSet, int pit)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_PIT_ATTR, Chain(pit));
- return sendReq(XML_MED_RECOVER_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medSecSwitch(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_SECSWITCH_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medSecRelocate(const Chain& tableSet, const Chain& secondary)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_SECONDARY_ATTR, secondary);
- return sendReq(XML_MED_SECRELOCATE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::secMedSwitch(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_SEC_MEDSWITCH_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medEnableArchLog(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_ENABLE_ARCHLOG_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medDisableArchLog(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_DISABLE_ARCHLOG_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::secMedRelocate(const Chain& tableSet, const Chain& mediator)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- pRoot->setAttribute(XML_MEDIATOR_ATTR, mediator);
- return sendReq(XML_SEC_MEDRELOCATE_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medCheckTableSet(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_CHECK_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medVerifyTableSet(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_VERIFY_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::medCorrectTableSet(const Chain& tableSet)
-{
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
- return sendReq(XML_MED_CORRECT_TABLESET_REQUEST, pRoot);
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::sendReq(const Chain& reqType, Element* pRoot)
-{
- _xml.getDocument()->clear();
- _xml.getDocument()->setRootElement(pRoot);
- _xml.getDocument()->setDocType(reqType);
-
- Chain request;
- _xml.getXMLChain(request);
- _xml.getDocument()->clear();
-
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("--- XML ---"));
- _pModule->log(_modId, Logger::DEBUG, request);
- _pModule->log(_modId, Logger::DEBUG, Chain("--- --- ---"));
-#endif
-
- _pN->setMsg(request, request.length());
-
- _pN->writeMsg();
-
- _pN->readMsg();
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("--- XML ---"));
- _pModule->log(_modId, Logger::DEBUG, _pN->getMsg());
- _pModule->log(_modId, Logger::DEBUG, Chain("--- --- ---"));
-#endif
-
- _xml.getDocument()->clear();
- _xml.setChain( _pN->getMsg() );
- _xml.parse();
-
- Chain docType = _xml.getDocument()->getDocType();
-
- if ( docType == Chain(XML_OK_DOC) )
- {
- return ADM_OK;
- }
- else if ( docType == Chain(XML_INFO_DOC) )
- {
- return ADM_INFO;
- }
- else // if ( docType == Chain(XML_ERROR_DOC) )
- {
- return ADM_ERROR;
- }
-
-}
-
-void CegoAdminHandler::getMsg(Chain& msg)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- msg = pRoot->getAttributeValue(XML_MSG_ATTR);
- }
-}
-
-
-void CegoAdminHandler::getBUMsg(Chain& msg)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- msg = pRoot->getAttributeValue(XML_BUMSG_ATTR);
- }
-}
-
-const Chain& CegoAdminHandler::getUser()
-{
- return _user;
-}
-
-const Chain& CegoAdminHandler::getPassword()
-{
- return _password;
-}
-
-void CegoAdminHandler::getTableSet(Chain& tableSet)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- tableSet = pRoot->getAttributeValue(XML_TABLESET_ATTR);
- }
-}
-
-void CegoAdminHandler::getTableSetRoot(Chain& tsRoot)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- tsRoot = pRoot->getAttributeValue(XML_TSROOT_ATTR);
- }
-}
-
-
-void CegoAdminHandler::getTableSetTSTicket(Chain& tsTicket)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- tsTicket = pRoot->getAttributeValue(XML_TSTICKET_ATTR);
- }
-}
-
-void CegoAdminHandler::getTableName(Chain& tableName)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- tableName = pRoot->getAttributeValue(XML_TABLENAME_ATTR);
- }
-}
-
-void CegoAdminHandler::getThreadId(int& threadId)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- threadId = pRoot->getAttributeValue(XML_THID_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getEscapeCmd(Chain& escCmd)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- escCmd = pRoot->getAttributeValue(XML_ESCCMD_ATTR);
- }
-}
-
-void CegoAdminHandler::getTSInitFile(Chain& initFile)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- initFile = pRoot->getAttributeValue(XML_TSINITFILE_ATTR);
- }
-}
-
-void CegoAdminHandler::getTSSysSize(int& sysSize)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- sysSize = pRoot->getAttributeValue(XML_SYSSIZE_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getTSTmpSize(int& tmpSize)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- tmpSize = pRoot->getAttributeValue(XML_TMPSIZE_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getTSRootPath(Chain& tsRoot)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- tsRoot = pRoot->getAttributeValue(XML_TSROOT_ATTR);
- }
-}
-
-void CegoAdminHandler::getTSTicket(Chain& tsTicket)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- tsTicket = pRoot->getAttributeValue(XML_TSTICKET_ATTR);
- }
-}
-
-void CegoAdminHandler::getTSLogNum(int& logNum)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- logNum = pRoot->getAttributeValue(XML_LOGFILENUM_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getTSLogSize(int& logSize)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- logSize = pRoot->getAttributeValue(XML_LOGFILESIZE_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getTSSortAreaSize(int& sortAreaSize)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- sortAreaSize = pRoot->getAttributeValue(XML_SORTAREASIZE_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getTimeoutValue(int& timeout)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- timeout = pRoot->getAttributeValue(XML_TIMEOUT_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getFileName(Chain& fileName)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- fileName = pRoot->getAttributeValue(XML_FILENAME_ATTR);
- }
-}
-
-void CegoAdminHandler::getFileType(Chain& fileType)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- fileType = pRoot->getAttributeValue(XML_TYPE_ATTR);
- }
-}
-
-void CegoAdminHandler::getFileId(int& fileId)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- fileId = pRoot->getAttributeValue(XML_FILEID_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getFileSize(int& fileSize)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- fileSize = pRoot->getAttributeValue(XML_FILESIZE_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getFilter(Chain& filter)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- filter = pRoot->getAttributeValue(XML_FILTER_ATTR);
- }
-}
-
-void CegoAdminHandler::getSysFileId(int& sysFid)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- sysFid = pRoot->getAttributeValue(XML_SYSFID_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getTmpFileId(int& tmpFid)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- tmpFid = pRoot->getAttributeValue(XML_TMPFID_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getSysSize(int& sysSize)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- sysSize = pRoot->getAttributeValue(XML_SYSSIZE_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getTmpSize(int& tmpSize)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- tmpSize = pRoot->getAttributeValue(XML_TMPSIZE_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getLogFileSize(int& logFileSize)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- logFileSize = pRoot->getAttributeValue(XML_LOGFILESIZE_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getLogFileNum(int& logFileNum)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- logFileNum = pRoot->getAttributeValue(XML_LOGFILENUM_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getSortAreaSize(long& sortAreaSize)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- sortAreaSize = pRoot->getAttributeValue(XML_SORTAREASIZE_ATTR).asLong();
- }
-}
-
-void CegoAdminHandler::getTargetHost(Chain& targetHost)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- targetHost = pRoot->getAttributeValue(XML_TARGETHOST_ATTR);
- }
-}
-
-void CegoAdminHandler::getUser(Chain& user)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- user = pRoot->getAttributeValue(XML_NAME_ATTR);
- }
-}
-
-void CegoAdminHandler::getPassword(Chain& password)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- password = pRoot->getAttributeValue(XML_PASSWD_ATTR);
- }
-}
-
-void CegoAdminHandler::getPerm(Chain& perm)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- perm = pRoot->getAttributeValue(XML_PERM_ATTR);
- }
-}
-
-void CegoAdminHandler::getPermId(Chain& permid)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- permid = pRoot->getAttributeValue(XML_PERMID_ATTR);
- }
-}
-
-void CegoAdminHandler::getRole(Chain& role)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- role = pRoot->getAttributeValue(XML_ROLE_ATTR);
- }
-}
-
-void CegoAdminHandler::getTrace(bool& isOn)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- if ( pRoot->getAttributeValue(XML_TRACE_ATTR) == Chain(XML_ON_VALUE) )
- isOn = true;
- else
- isOn = false;
- }
-}
-
-void CegoAdminHandler::getUsage(bool& getUsage)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- if ( pRoot->getAttributeValue(XML_USAGE_ATTR) == Chain(XML_TRUE_VALUE) )
- getUsage = true;
- else
- getUsage = false;
- }
-}
-
-void CegoAdminHandler::getLogManager(Chain& progName)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- progName = pRoot->getAttributeValue(XML_LOGMNGPROG_ATTR);
- }
-}
-
-void CegoAdminHandler::getLogManagerTimeout(int& timeout)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- timeout = pRoot->getAttributeValue(XML_LOGMNGTIMEOUT_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getLockCat(Chain& lockCat)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- lockCat = pRoot->getAttributeValue(XML_LOCKCAT_ATTR);
- }
-}
-
-void CegoAdminHandler::getPrimary(Chain& primary)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- primary = pRoot->getAttributeValue(XML_PRIMARY_ATTR);
- }
-}
-
-void CegoAdminHandler::getSecondary(Chain& secondary)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- secondary = pRoot->getAttributeValue(XML_SECONDARY_ATTR);
- }
-}
-
-void CegoAdminHandler::getMediator(Chain& mediator)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- mediator = pRoot->getAttributeValue(XML_MEDIATOR_ATTR);
- }
-}
-
-void CegoAdminHandler::getLSN(long& lsn)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- lsn = pRoot->getAttributeValue(XML_LSN_ATTR).asLong();
- }
-}
-
-
-void CegoAdminHandler::getRunState(Chain& runState)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- runState = pRoot->getAttributeValue(XML_RUNSTATE_ATTR);
- }
-}
-
-void CegoAdminHandler::getSyncState(Chain& syncState)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- syncState = pRoot->getAttributeValue(XML_SYNCSTATE_ATTR);
- }
-}
-
-void CegoAdminHandler::getDataId(Chain& dataId)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- dataId = pRoot->getAttributeValue(XML_DATAID_ATTR);
- }
-}
-
-void CegoAdminHandler::getPit(int& pit)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- pit = pRoot->getAttributeValue(XML_PIT_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getIsStructure(bool& isStructure)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- if ( pRoot->getAttributeValue(XML_ISSTRUCT_ATTR) == Chain(XML_TRUE_VALUE) )
- isStructure = true;
- else
- isStructure = false;
- }
-}
-
-void CegoAdminHandler::getDoLogging(bool& doLogging)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- if ( pRoot->getAttributeValue(XML_DOLOGGING_ATTR) == Chain(XML_TRUE_VALUE) )
- doLogging = true;
- else
- doLogging = false;
- }
-}
-
-void CegoAdminHandler::getKeepTicket(bool& keepTicket)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- if ( pRoot->getAttributeValue(XML_KEEPTICKET_ATTR) == Chain(XML_TRUE_VALUE) )
- keepTicket = true;
- else
- keepTicket = false;
- }
-}
-
-void CegoAdminHandler::getHostRole(Chain& hostRole)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- hostRole = pRoot->getAttributeValue(XML_HOSTROLE_ATTR);
- }
-}
-
-
-void CegoAdminHandler::getHostName(Chain& hostName)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- hostName = pRoot->getAttributeValue(XML_HOSTNAME_ATTR);
- }
-}
-
-void CegoAdminHandler::getHostStatus(Chain& hostStatus)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- hostStatus = pRoot->getAttributeValue(XML_STATUS_ATTR);
- }
-}
-
-void CegoAdminHandler::getDataPort(int& dataPort)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- dataPort = pRoot->getAttributeValue(XML_DATAPORT_ATTR).asInteger();
- }
-}
-
-void CegoAdminHandler::getAdminPort(int& adminPort)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- adminPort = pRoot->getAttributeValue(XML_ADMINPORT_ATTR).asInteger();
- }
-}
-
-
-void CegoAdminHandler::getArchId(Chain& archId)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- archId = pRoot->getAttributeValue(XML_ARCHID_ATTR);
- }
-}
-
-void CegoAdminHandler::getArchPath(Chain& archPath)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- archPath = pRoot->getAttributeValue(XML_ARCHPATH_ATTR);
- }
-}
-
-void CegoAdminHandler::getTableSyncStateList(ListT<Chain>& tsList, ListT<Chain>& runList, ListT<Chain>& syncList)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> teList = pRoot->getChildren(XML_TABLESET_ELEMENT);
-
- Element **pTE = teList.First();
- while ( pTE )
- {
-
- tsList.Insert((*pTE)->getAttributeValue(XML_NAME_ATTR));
- runList.Insert((*pTE)->getAttributeValue(XML_RUNSTATE_ATTR));
- syncList.Insert((*pTE)->getAttributeValue(XML_SYNCSTATE_ATTR));
-
- pTE = teList.Next();
- }
- }
-}
-
-void CegoAdminHandler::getMode(Chain& mode)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- mode = pRoot->getAttributeValue(XML_MODE_ATTR);
- }
-}
-
-bool CegoAdminHandler::getCleanup()
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- if ( (Chain)pRoot->getAttributeValue(XML_CLEANUP_ATTR) == Chain(XML_TRUE_VALUE) )
- return true;
- else
- return false;
- }
- else
- {
- throw Exception(EXLOC, "No root element found");
- }
-}
-
-
-bool CegoAdminHandler::getForceload()
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- if ( (Chain)pRoot->getAttributeValue(XML_FORCELOAD_ATTR) == Chain(XML_TRUE_VALUE) )
- return true;
- else
- return false;
- }
- else
- {
- throw Exception(EXLOC, "No root element found");
- }
-}
-
-void CegoAdminHandler::getObjName(Chain& objName)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- objName = pRoot->getAttributeValue(XML_OBJNAME_ATTR);
- }
-
-}
-
-void CegoAdminHandler::getObjType(CegoObject::ObjectType& type)
-{
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- CegoTypeConverter tc;
- Chain objType = pRoot->getAttributeValue(XML_OBJTYPE_ATTR);
- type = tc.getObjectTypeId(objType);
- }
-}
-
-void CegoAdminHandler::sendResponse(const Chain& msg, Element *pSubElement)
-{
- _xml.getDocument()->clear();
- _xml.getDocument()->setDocType(XML_OK_DOC);
-
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_MSG_ATTR, msg);
-
- if ( pSubElement )
- pRoot->addContent(pSubElement);
-
- _xml.getDocument()->setRootElement(pRoot);
-
- Chain xmlString;
- _xml.getXMLChain(xmlString);
-
- _xml.getDocument()->clear();
-
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("--- XML ---"));
- _pModule->log(_modId, Logger::DEBUG, xmlString);
- _pModule->log(_modId, Logger::DEBUG, Chain("--- --- ---"));
-#endif
-
-
- _pN->setMsg(xmlString, xmlString.length());
- _pN->writeMsg();
-
-}
-
-void CegoAdminHandler::sendData(const Chain& data)
-{
-
- _xml.getDocument()->clear();
- _xml.getDocument()->setDocType(XML_OK_DOC);
-
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_DATALEN_ATTR, Chain(data.length()));
-
- _xml.getDocument()->setRootElement(pRoot);
-
- Chain xmlString;
- _xml.getXMLChain(xmlString);
-
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("--- XML ---"));
- _pModule->log(_modId, Logger::DEBUG, xmlString);
- _pModule->log(_modId, Logger::DEBUG, Chain("--- --- ---"));
-#endif
-
- _pN->setMsg(xmlString, xmlString.length());
-
- _pN->writeMsg();
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("Waiting for ack ..."));
-#endif
-
- _pN->recvAck();
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("Sending data of size ") + Chain(data.length()) + Chain(" ..."));
-#endif
-
- _pN->setMsg(data, data.length());
-
- _pN->writeMsg();
-
-}
-
-CegoAdminHandler::ResultType CegoAdminHandler::nextInfo()
-{
- _pN->sendAck();
- _pN->readMsg();
-
- _xml.getDocument()->clear();
- _xml.setChain( _pN->getMsg() );
- _xml.parse();
-
- Chain docType = _xml.getDocument()->getDocType();
-
- if ( docType == Chain(XML_OK_DOC) )
- {
- return ADM_OK;
- }
- else if ( docType == Chain(XML_ERROR_DOC) )
- {
- return ADM_ERROR;
- }
- else if ( docType == Chain(XML_INFO_DOC) )
- {
- return ADM_INFO;
- }
- else
- {
- throw Exception(EXLOC, "Invalid document type");
- }
-}
-
-bool CegoAdminHandler::syncWithInfo(const Chain& hostRole, const Chain& hostName, const Chain& msg, Element *pInfo)
-{
-
- _xml.getDocument()->clear();
-
- _xml.getDocument()->setDocType(XML_INFO_DOC);
-
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_HOSTROLE_ATTR, hostRole);
- pRoot->setAttribute(XML_HOSTNAME_ATTR, hostName);
- pRoot->setAttribute(XML_MSG_ATTR, msg);
- if ( pInfo )
- pRoot->addContent(pInfo);
-
- _xml.getDocument()->setRootElement(pRoot);
-
- Chain xmlString;
- _xml.getXMLChain(xmlString);
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("--- XML ---"));
- _pModule->log(_modId, Logger::DEBUG, xmlString);
- _pModule->log(_modId, Logger::DEBUG, Chain("--- --- ---"));
-#endif
-
- _pN->setMsg(xmlString, xmlString.length());
-
- _pN->writeMsg();
-
- _xml.getDocument()->clear();
-
- return _pN->recvAck();
-}
-
-void CegoAdminHandler::sendError(const Chain& msg)
-{
-
- _xml.getDocument()->clear();
- _xml.getDocument()->setDocType(XML_ERROR_DOC);
-
- Element* pRoot = new Element(XML_FRAME_ELEMENT);
- pRoot->setAttribute(XML_MSG_ATTR, msg);
-
- _xml.getDocument()->setRootElement(pRoot);
-
- Chain xmlString;
- _xml.getXMLChain(xmlString);
-
-#ifdef CGDEBUG
- _pModule->log(_modId, Logger::DEBUG, Chain("--- XML ---"));
- _pModule->log(_modId, Logger::DEBUG, xmlString);
- _pModule->log(_modId, Logger::DEBUG, Chain("--- --- ---"));
-#endif
-
- _pN->setMsg(xmlString, xmlString.length());
-
- _pN->writeMsg();
-
-}
-
-void CegoAdminHandler::getThreadInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> threadInfoList = pRoot->getChildren(XML_THREADINFO_ELEMENT);
-
- Element **pInfo = threadInfoList.First();
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("TYPE"),VARCHAR_TYPE, 20));
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("TOTAL"), INT_TYPE, sizeof(int)));
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("ACTIVE"), INT_TYPE, sizeof(int)));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("THREADINFO"), schema, Chain("THREADINFO"));
-
-
- Chain numDbThread = (*pInfo)->getAttributeValue(XML_NUMDBTHREAD_ATTR);
- Chain numAdmThread = (*pInfo)->getAttributeValue(XML_NUMADMTHREAD_ATTR);
- Chain numLogThread = (*pInfo)->getAttributeValue(XML_NUMLOGTHREAD_ATTR);
- Chain actDbThread = (*pInfo)->getAttributeValue(XML_ACTIVEDBTHREAD_ATTR);
- Chain actAdmThread = (*pInfo)->getAttributeValue(XML_ACTIVEADMTHREAD_ATTR);
- Chain actLogThread = (*pInfo)->getAttributeValue(XML_ACTIVELOGTHREAD_ATTR);
-
-
- CegoFieldValue f1a(VARCHAR_TYPE, Chain("DatabaseThread"));
- CegoFieldValue f1b(INT_TYPE, numDbThread);
- CegoFieldValue f1c(INT_TYPE, actDbThread);
- ListT<CegoFieldValue> fl1;
- fl1.Insert(f1a);
- fl1.Insert(f1b);
- fl1.Insert(f1c);
-
- info.Insert(fl1);
-
- CegoFieldValue f2a(VARCHAR_TYPE, Chain("AdminThread"));
- CegoFieldValue f2b(INT_TYPE, numAdmThread);
- CegoFieldValue f2c(INT_TYPE, actAdmThread);
- ListT<CegoFieldValue> fl2;
- fl2.Insert(f2a);
- fl2.Insert(f2b);
- fl2.Insert(f2c);
-
- info.Insert(fl2);
-
- CegoFieldValue f3a(VARCHAR_TYPE, Chain("LogThread"));
- CegoFieldValue f3b(INT_TYPE, numLogThread);
- CegoFieldValue f3c(INT_TYPE, actLogThread);
- ListT<CegoFieldValue> fl3;
- fl3.Insert(f3a);
- fl3.Insert(f3b);
- fl3.Insert(f3c);
-
- info.Insert(fl3);
-
- }
-}
-
-void CegoAdminHandler::getDbThreadInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info, Chain& format)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> threadInfoList = pRoot->getChildren(XML_THREADINFO_ELEMENT);
-
- Element **pInfo = threadInfoList.First();
-
- ListT<Element*> threadStateList = (*pInfo)->getChildren(XML_THREAD_ELEMENT);
- Element **pThreadState = threadStateList.First();
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("THREADID"), INT_TYPE, sizeof(int)));
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("NUMREQUEST"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("NUMQUERYREQ"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("THREADLOAD"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("STATUS"), VARCHAR_TYPE, 10));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("THREADINFO"), schema, Chain("THREADINFO"));
-
- format = Chain("rrrrl");
-
- while ( pThreadState )
- {
- Chain threadId = (*pThreadState)->getAttributeValue(XML_THID_ATTR);
- Chain numRequest = (*pThreadState)->getAttributeValue(XML_NUMREQUEST_ATTR);
- Chain numQueryRequest = (*pThreadState)->getAttributeValue(XML_NUMQUERYREQUEST_ATTR);
- Chain threadLoad = (*pThreadState)->getAttributeValue(XML_THREADLOAD_ATTR);
- Chain threadState = (*pThreadState)->getAttributeValue(XML_STATUS_ATTR);
-
- CegoFieldValue f1(INT_TYPE, threadId);
- CegoFieldValue f2(LONG_TYPE, numRequest);
- CegoFieldValue f3(LONG_TYPE, numQueryRequest);
- CegoFieldValue f4(LONG_TYPE, threadLoad);
- CegoFieldValue f5(VARCHAR_TYPE, threadState);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
- fl.Insert(f3);
- fl.Insert(f4);
- fl.Insert(f5);
-
- info.Insert(fl);
-
- pThreadState = threadStateList.Next();
- }
- }
-}
-
-void CegoAdminHandler::getDbThreadLastQuery(int threadId, CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info, Chain& format)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> threadInfoList = pRoot->getChildren(XML_THREADINFO_ELEMENT);
-
- Element **pInfo = threadInfoList.First();
-
- ListT<Element*> threadList = (*pInfo)->getChildren(XML_THREAD_ELEMENT);
- Element **pThread = threadList.First();
-
- unsigned int maxActionLen = 10;
-
- while ( pThread )
- {
- Chain threadAction = (*pThread)->getAttributeValue(XML_LASTACTION_ATTR);
-
- if ( threadAction.length() > maxActionLen )
- maxActionLen = threadAction.length();
-
- pThread = threadList.Next();
- }
-
- pThread = threadList.First();
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("LASTACTION"), VARCHAR_TYPE, maxActionLen));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("THREADINFO"), schema, Chain("THREADINFO"));
-
- format = Chain("l");
-
- while ( pThread )
- {
- int actThreadId = (*pThread)->getAttributeValue(XML_THID_ATTR).asInteger();
-
- if ( actThreadId == threadId )
- {
- Chain threadAction = (*pThread)->getAttributeValue(XML_LASTACTION_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, threadAction);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
-
- info.Insert(fl);
- }
- pThread = threadList.Next();
- }
- }
-}
-
-void CegoAdminHandler::getAdmThreadInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info, Chain& format)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> threadInfoList = pRoot->getChildren(XML_THREADINFO_ELEMENT);
-
- Element **pInfo = threadInfoList.First();
-
- ListT<Element*> threadStateList = (*pInfo)->getChildren(XML_THREAD_ELEMENT);
- Element **pThreadState = threadStateList.First();
-
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("THREADID"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("NUMREQUEST"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("THREADLOAD"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("STATUS"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("LASTACTION"), VARCHAR_TYPE, 50));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("THREADINFO"), schema, Chain("THREADINFO"));
-
- format = Chain("rlrrl");
-
- while ( pThreadState )
- {
- Chain threadId = (*pThreadState)->getAttributeValue(XML_THID_ATTR);
- Chain numRequest = (*pThreadState)->getAttributeValue(XML_NUMREQUEST_ATTR);
- Chain threadLoad = (*pThreadState)->getAttributeValue(XML_THREADLOAD_ATTR);
- Chain threadState = (*pThreadState)->getAttributeValue(XML_STATUS_ATTR);
- Chain threadAction = (*pThreadState)->getAttributeValue(XML_LASTACTION_ATTR);
-
- CegoFieldValue f1(LONG_TYPE, threadId);
- CegoFieldValue f2(LONG_TYPE, numRequest);
- CegoFieldValue f3(LONG_TYPE, threadLoad);
- CegoFieldValue f4(VARCHAR_TYPE, threadState);
- CegoFieldValue f5(VARCHAR_TYPE, threadAction);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
- fl.Insert(f3);
- fl.Insert(f4);
- fl.Insert(f5);
-
- info.Insert(fl);
-
- pThreadState = threadStateList.Next();
- }
- }
-}
-
-void CegoAdminHandler::getLogThreadInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info, Chain& format)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> threadInfoList = pRoot->getChildren(XML_THREADINFO_ELEMENT);
-
- Element **pInfo = threadInfoList.First();
-
- ListT<Element*> threadStateList = (*pInfo)->getChildren(XML_THREAD_ELEMENT);
- Element **pThreadState = threadStateList.First();
-
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("THREADID"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("NUMREQUEST"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("THREADLOAD"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("STATUS"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("THREADINFO"), Chain("THREADINFO"), Chain("LASTACTION"), VARCHAR_TYPE, 50));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("THREADINFO"), schema, Chain("THREADINFO"));
-
- format = Chain("rlrrl");
-
- while ( pThreadState )
- {
- Chain threadId = (*pThreadState)->getAttributeValue(XML_THID_ATTR);
- Chain numRequest = (*pThreadState)->getAttributeValue(XML_NUMREQUEST_ATTR);
- Chain threadLoad = (*pThreadState)->getAttributeValue(XML_THREADLOAD_ATTR);
- Chain threadState = (*pThreadState)->getAttributeValue(XML_STATUS_ATTR);
- Chain threadAction = (*pThreadState)->getAttributeValue(XML_LASTACTION_ATTR);
-
- CegoFieldValue f1(LONG_TYPE, threadId);
- CegoFieldValue f2(LONG_TYPE, numRequest);
- CegoFieldValue f3(LONG_TYPE, threadLoad);
- CegoFieldValue f4(VARCHAR_TYPE, threadState);
- CegoFieldValue f5(VARCHAR_TYPE, threadAction);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
- fl.Insert(f3);
- fl.Insert(f4);
- fl.Insert(f5);
-
-
- info.Insert(fl);
-
- pThreadState = threadStateList.Next();
- }
- }
-}
-
-void CegoAdminHandler::getDbSessionInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> sessionInfoList = pRoot->getChildren(XML_DBSESSIONINFO_ELEMENT);
-
- Element **pInfo = sessionInfoList.First();
-
- ListT<Element*> sessionList = (*pInfo)->getChildren(XML_DBSESSION_ELEMENT);
- Element **pSession = sessionList.First();
-
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("DBSESSION"), Chain("DBSESSION"), Chain("HOST"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("DBSESSION"), Chain("DBSESSION"), Chain("TABLESET"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("DBSESSION"), Chain("DBSESSION"), Chain("USER"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("DBSESSION"), Chain("DBSESSION"), Chain("ISUSED"), VARCHAR_TYPE, 5));
- schema.Insert(CegoField(Chain("DBSESSION"), Chain("DBSESSION"), Chain("TTL"), VARCHAR_TYPE, 5));
-
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("DBSESSIONINFO"), schema, Chain("DBSESSIONINFO"));
-
- while ( pSession )
- {
- Chain hostName = (*pSession)->getAttributeValue(XML_HOSTNAME_ATTR);
- Chain tableSet = (*pSession)->getAttributeValue(XML_TABLESET_ATTR);
- Chain userName = (*pSession)->getAttributeValue(XML_USER_ATTR);
- Chain isUsed = (*pSession)->getAttributeValue(XML_ISUSED_ATTR);
- Chain ttl = (*pSession)->getAttributeValue(XML_TTL_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, hostName);
- CegoFieldValue f2(VARCHAR_TYPE, tableSet);
- CegoFieldValue f3(VARCHAR_TYPE, userName);
- CegoFieldValue f4(VARCHAR_TYPE, isUsed);
- CegoFieldValue f5(VARCHAR_TYPE, ttl);
-
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
- fl.Insert(f3);
- fl.Insert(f4);
- fl.Insert(f5);
-
- info.Insert(fl);
-
- pSession = sessionList.Next();
- }
- }
-}
-
-void CegoAdminHandler::getCopyInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info, Chain& format)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> copyInfoList = pRoot->getChildren(XML_COPYINFO_ELEMENT);
-
- Element **pInfo = copyInfoList.First();
-
- ListT<Element*> copyList = (*pInfo)->getChildren(XML_COPY_ELEMENT);
- Element **pCopy = copyList.First();
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("COPY"), Chain("COPY"), Chain("ID"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("COPY"), Chain("COPY"), Chain("TABLESET"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("COPY"), Chain("COPY"), Chain("TARGET"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("COPY"), Chain("COPY"), Chain("STATUS"), VARCHAR_TYPE, 50));
-
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("COPYINFO"), schema, Chain("COPYINFO"));
-
- format = Chain("rlll");
-
- while ( pCopy )
- {
- Chain cid = (*pCopy)->getAttributeValue(XML_CID_ATTR);
- Chain tableSet = (*pCopy)->getAttributeValue(XML_TABLESET_ATTR);
- Chain targetHost = (*pCopy)->getAttributeValue(XML_HOSTNAME_ATTR);
- Chain status = (*pCopy)->getAttributeValue(XML_STATUS_ATTR);
-
-
- CegoFieldValue f1(VARCHAR_TYPE, cid);
- CegoFieldValue f2(VARCHAR_TYPE, tableSet);
- CegoFieldValue f3(VARCHAR_TYPE, targetHost);
- CegoFieldValue f4(VARCHAR_TYPE, status);
-
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
- fl.Insert(f3);
- fl.Insert(f4);
-
- info.Insert(fl);
-
- pCopy = copyList.Next();
- }
- }
-}
-
-void CegoAdminHandler::getLockInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("LOCKINFO"), Chain("LOCKINFO"), Chain("LOCKID"),VARCHAR_TYPE, 20));
- schema.Insert(CegoField(Chain("LOCKINFO"), Chain("LOCKINFO"), Chain("LOCKCOUNT"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("LOCKINFO"), Chain("LOCKINFO"), Chain("RD HITS"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("LOCKINFO"), Chain("LOCKINFO"), Chain("RD DELAY"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("LOCKINFO"), Chain("LOCKINFO"), Chain("WR HITS"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("LOCKINFO"), Chain("LOCKINFO"), Chain("WR DELAY"), LONG_TYPE, sizeof(long)));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("LOCKINFO"), schema, Chain("LOCKINFO"));
-
-
- ListT<Element*> lockInfoList = pRoot->getChildren(XML_LOCKINFO_ELEMENT);
- Element **pInfo = lockInfoList.First();
-
- ListT<Element*> lockEntryList = (*pInfo)->getChildren(XML_LOCKENTRY_ELEMENT);
- Element **pLockEntry = lockEntryList.First();
-
- while ( pLockEntry )
- {
-
- CegoFieldValue f1a(VARCHAR_TYPE, (*pLockEntry)->getAttributeValue(XML_LOCKID_ATTR));
- CegoFieldValue f1b(LONG_TYPE, (*pLockEntry)->getAttributeValue(XML_LOCKCOUNT_ATTR));
- CegoFieldValue f1c(LONG_TYPE, (*pLockEntry)->getAttributeValue(XML_RDLOCKHIT_ATTR));
- CegoFieldValue f1d(LONG_TYPE, (*pLockEntry)->getAttributeValue(XML_RDLOCKDELAY_ATTR));
- CegoFieldValue f1e(LONG_TYPE, (*pLockEntry)->getAttributeValue(XML_WRLOCKHIT_ATTR));
- CegoFieldValue f1f(LONG_TYPE, (*pLockEntry)->getAttributeValue(XML_WRLOCKDELAY_ATTR));
- ListT<CegoFieldValue> fl;
- fl.Insert(f1a);
- fl.Insert(f1b);
- fl.Insert(f1c);
- fl.Insert(f1d);
- fl.Insert(f1e);
- fl.Insert(f1f);
-
- info.Insert(fl);
-
- pLockEntry = lockEntryList.Next();
- }
- }
-}
-
-void CegoAdminHandler::getLockStat(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("LOCKSTAT"), Chain("LOCKSTAT"), Chain("LOCKID"),VARCHAR_TYPE, 20));
- schema.Insert(CegoField(Chain("LOCKSTAT"), Chain("LOCKSTAT"), Chain("NUMLOCK"), INT_TYPE, sizeof(int)));
- schema.Insert(CegoField(Chain("LOCKSTAT"), Chain("LOCKSTAT"), Chain("LOCKCOUNT"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("LOCKSTAT"), Chain("LOCKSTAT"), Chain("RD HITS"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("LOCKSTAT"), Chain("LOCKSTAT"), Chain("RD DELAY"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("LOCKSTAT"), Chain("LOCKSTAT"), Chain("WR HITS"), LONG_TYPE, sizeof(long)));
- schema.Insert(CegoField(Chain("LOCKSTAT"), Chain("LOCKSTAT"), Chain("WR DELAY"), LONG_TYPE, sizeof(long)));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("LOCKSTAT"), schema, Chain("LOCKSTAT"));
-
- ListT<Element*> lockInfoList = pRoot->getChildren(XML_LOCKSTAT_ELEMENT);
- Element **pInfo = lockInfoList.First();
-
- ListT<Element*> lockEntryList = (*pInfo)->getChildren(XML_LOCKENTRY_ELEMENT);
- Element **pLockEntry = lockEntryList.First();
-
- while ( pLockEntry )
- {
-
- CegoFieldValue f1a(VARCHAR_TYPE, (*pLockEntry)->getAttributeValue(XML_LOCKID_ATTR));
- CegoFieldValue f1b(INT_TYPE, (*pLockEntry)->getAttributeValue(XML_NUMLOCK_ATTR));
- CegoFieldValue f1c(LONG_TYPE, (*pLockEntry)->getAttributeValue(XML_LOCKCOUNT_ATTR));
- CegoFieldValue f1d(LONG_TYPE, (*pLockEntry)->getAttributeValue(XML_RDLOCKHIT_ATTR));
- CegoFieldValue f1e(LONG_TYPE, (*pLockEntry)->getAttributeValue(XML_RDLOCKDELAY_ATTR));
- CegoFieldValue f1f(LONG_TYPE, (*pLockEntry)->getAttributeValue(XML_WRLOCKHIT_ATTR));
- CegoFieldValue f1g(LONG_TYPE, (*pLockEntry)->getAttributeValue(XML_WRLOCKDELAY_ATTR));
- ListT<CegoFieldValue> fl;
- fl.Insert(f1a);
- fl.Insert(f1b);
- fl.Insert(f1c);
- fl.Insert(f1d);
- fl.Insert(f1e);
- fl.Insert(f1f);
- fl.Insert(f1g);
-
-
- info.Insert(fl);
-
- pLockEntry = lockEntryList.Next();
- }
- }
-}
-
-void CegoAdminHandler::getPoolInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info1,
- ListT<ListT< CegoFieldValue > > & info2)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> poolInfoList = pRoot->getChildren(XML_POOLINFO_ELEMENT);
-
- Element **pInfo = poolInfoList.First();
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("POOLINFO"), Chain("POOLINFO"), Chain("PARAMETER"),VARCHAR_TYPE, 20));
- schema.Insert(CegoField(Chain("POOLINFO"), Chain("POOLINFO"), Chain("VALUE"), VARCHAR_TYPE, 20));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("POOLINFO"), schema, Chain("POOLINFO"));
-
- Chain pageSize = (*pInfo)->getAttributeValue(XML_PAGESIZE_ATTR);
- Chain numTotal = (*pInfo)->getAttributeValue(XML_NUMTOTAL_ATTR);
- Chain numUsed = (*pInfo)->getAttributeValue(XML_NUMUSED_ATTR);
- Chain numFree = (*pInfo)->getAttributeValue(XML_NUMFREE_ATTR);
- Chain numDirty = (*pInfo)->getAttributeValue(XML_NUMDIRTY_ATTR);
- Chain numFixed = (*pInfo)->getAttributeValue(XML_NUMFIXES_ATTR);
-
- Chain numPersistent = (*pInfo)->getAttributeValue(XML_NUMPERSISTENT_ATTR);
- Chain numNoSync = (*pInfo)->getAttributeValue(XML_NUMNOSYNC_ATTR);
- Chain numDiskRead = (*pInfo)->getAttributeValue(XML_NUMDISKREAD_ATTR);
- Chain numDiskWrite = (*pInfo)->getAttributeValue(XML_NUMDISKWRITE_ATTR);
-
- long readDelay = (*pInfo)->getAttributeValue(XML_READDELAY_ATTR).asLong();
- long writeDelay = (*pInfo)->getAttributeValue(XML_WRITEDELAY_ATTR).asLong();
-
- Chain curFixCount = (*pInfo)->getAttributeValue(XML_CURFIXCOUNT_ATTR);
- Chain maxFixCount = (*pInfo)->getAttributeValue(XML_MAXFIXCOUNT_ATTR);
-
- Chain statStart = (*pInfo)->getAttributeValue(XML_STATSTART_ATTR);
-
- CegoFieldValue f1a(VARCHAR_TYPE, Chain("Page Size"));
- CegoFieldValue f1b(VARCHAR_TYPE, pageSize);
- ListT<CegoFieldValue> fl1;
- fl1.Insert(f1a);
- fl1.Insert(f1b);
- info1.Insert(fl1);
-
- CegoFieldValue f2a(VARCHAR_TYPE, Chain("Total Pages"));
- CegoFieldValue f2b(VARCHAR_TYPE, numTotal);
- ListT<CegoFieldValue> fl2;
- fl2.Insert(f2a);
- fl2.Insert(f2b);
- info1.Insert(fl2);
-
- CegoFieldValue f3a(VARCHAR_TYPE, Chain("Used Pages"));
- CegoFieldValue f3b(VARCHAR_TYPE, numUsed);
- ListT<CegoFieldValue> fl3;
- fl3.Insert(f3a);
- fl3.Insert(f3b);
- info1.Insert(fl3);
-
- CegoFieldValue f4a(VARCHAR_TYPE, Chain("Free Pages"));
- CegoFieldValue f4b(VARCHAR_TYPE, numFree);
- ListT<CegoFieldValue> fl4;
- fl4.Insert(f4a);
- fl4.Insert(f4b);
- info1.Insert(fl4);
-
- CegoFieldValue f5a(VARCHAR_TYPE, Chain("Dirty Pages"));
- CegoFieldValue f5b(VARCHAR_TYPE, numDirty);
- ListT<CegoFieldValue> fl5;
- fl5.Insert(f5a);
- fl5.Insert(f5b);
- info1.Insert(fl5);
-
- CegoFieldValue f6a(VARCHAR_TYPE, Chain("Fixed Pages"));
- CegoFieldValue f6b(VARCHAR_TYPE, numFixed);
- ListT<CegoFieldValue> fl6;
- fl6.Insert(f6a);
- fl6.Insert(f6b);
- info1.Insert(fl6);
-
- CegoFieldValue f7a(VARCHAR_TYPE, Chain("Persistent Pages"));
- CegoFieldValue f7b(VARCHAR_TYPE, numPersistent);
- ListT<CegoFieldValue> fl7;
- fl7.Insert(f7a);
- fl7.Insert(f7b);
- info1.Insert(fl7);
-
- CegoFieldValue f8a(VARCHAR_TYPE, Chain("No Sync Pages"));
- CegoFieldValue f8b(INT_TYPE, numNoSync);
- ListT<CegoFieldValue> fl8;
- fl8.Insert(f8a);
- fl8.Insert(f8b);
- info1.Insert(fl8);
-
- Datetime dt(statStart, BUPMNG_STATDTFORMAT);
- CegoFieldValue f10a(VARCHAR_TYPE, Chain("Stat Start"));
- CegoFieldValue f10b(VARCHAR_TYPE, dt.asChain(BUPMNG_STATOUTFORMAT));
- ListT<CegoFieldValue> fl10;
- fl10.Insert(f10a);
- fl10.Insert(f10b);
- info2.Insert(fl10);
-
- CegoFieldValue f11a(VARCHAR_TYPE, Chain("Cur Fix Count"));
- CegoFieldValue f11b(VARCHAR_TYPE, curFixCount);
- ListT<CegoFieldValue> fl11;
- fl11.Insert(f11a);
- fl11.Insert(f11b);
- info2.Insert(fl11);
-
- CegoFieldValue f12a(VARCHAR_TYPE, Chain("Max Fix Count"));
- CegoFieldValue f12b(VARCHAR_TYPE, maxFixCount);
- ListT<CegoFieldValue> fl12;
- fl12.Insert(f12a);
- fl12.Insert(f12b);
- info2.Insert(fl12);
-
- CegoFieldValue f13a(VARCHAR_TYPE, Chain("Disk Reads"));
- CegoFieldValue f13b(VARCHAR_TYPE, Chain(numDiskRead));
- ListT<CegoFieldValue> fl13;
- fl13.Insert(f13a);
- fl13.Insert(f13b);
- info2.Insert(fl13);
-
- CegoFieldValue f14a(VARCHAR_TYPE, Chain("Disk Writes"));
- CegoFieldValue f14b(VARCHAR_TYPE, Chain(numDiskWrite));
- ListT<CegoFieldValue> fl14;
- fl14.Insert(f14a);
- fl14.Insert(f14b);
- info2.Insert(fl14);
-
- int msecDelay;
- int usecDelay;
- Chain delayStr;
- Chain fillStr;
-
- msecDelay = readDelay / 1000;
- usecDelay = readDelay % 1000;
- fillStr = Chain("000") + Chain(usecDelay);
- delayStr = Chain(msecDelay) + Chain(".") + fillStr.subChain(fillStr.length()-3, fillStr.length()) + Chain (" msec");
-
- CegoFieldValue f15a(VARCHAR_TYPE, Chain("Read Delay"));
- CegoFieldValue f15b(VARCHAR_TYPE, Chain(delayStr));
- ListT<CegoFieldValue> fl15;
- fl15.Insert(f15a);
- fl15.Insert(f15b);
- info2.Insert(fl15);
-
- msecDelay = writeDelay / 1000;
- usecDelay = writeDelay % 1000;
- fillStr = Chain("000") + Chain(usecDelay);
- delayStr = Chain(msecDelay) + Chain(".") + fillStr.subChain(fillStr.length()-3, fillStr.length()) + Chain (" msec");
-
- CegoFieldValue f16a(VARCHAR_TYPE, Chain("Write Delay"));
- CegoFieldValue f16b(VARCHAR_TYPE, Chain(delayStr));
- ListT<CegoFieldValue> fl16;
- fl16.Insert(f16a);
- fl16.Insert(f16b);
- info2.Insert(fl16);
-
- }
-}
-
-void CegoAdminHandler::getPoolEntryList(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("PEL"), Chain("PEL"), Chain("POS"),VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("PEL"), Chain("PEL"), Chain("OCCSTATE"), VARCHAR_TYPE, 15));
- schema.Insert(CegoField(Chain("PEL"), Chain("PEL"), Chain("ISDIRTY"), VARCHAR_TYPE, 15));
- schema.Insert(CegoField(Chain("PEL"), Chain("PEL"), Chain("NUMFIXES"), VARCHAR_TYPE, 15));
- schema.Insert(CegoField(Chain("PEL"), Chain("PEL"), Chain("TABSETID"), VARCHAR_TYPE, 15));
- schema.Insert(CegoField(Chain("PEL"), Chain("PEL"), Chain("FILEID"), VARCHAR_TYPE, 15));
- schema.Insert(CegoField(Chain("PEL"), Chain("PEL"), Chain("PAGEID"), VARCHAR_TYPE, 15));
- schema.Insert(CegoField(Chain("PEL"), Chain("PEL"), Chain("FIXSTAT"), VARCHAR_TYPE, 15));
-
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("PEL"), schema, Chain("PEL"));
-
- ListT<Element*> pList = pRoot->getChildren(XML_POOLENTRYLIST_ELEMENT);
- Element **pPL = pList.First();
-
- ListT<Element*> peList = (*pPL)->getChildren(XML_POOLENTRY_ELEMENT);
- Element** pPE = peList.First();
-
- while ( pPE )
- {
-
- CegoFieldValue f1a(VARCHAR_TYPE, (*pPE)->getAttributeValue(XML_POS_ATTR));
- CegoFieldValue f1b(VARCHAR_TYPE, (*pPE)->getAttributeValue(XML_OCCSTATE_ATTR));
- CegoFieldValue f1c(VARCHAR_TYPE, (*pPE)->getAttributeValue(XML_ISDIRTY_ATTR));
- CegoFieldValue f1d(VARCHAR_TYPE, (*pPE)->getAttributeValue(XML_NUMFIXES_ATTR));
- CegoFieldValue f1e(VARCHAR_TYPE, (*pPE)->getAttributeValue(XML_TSID_ATTR));
- CegoFieldValue f1f(VARCHAR_TYPE, (*pPE)->getAttributeValue(XML_FILEID_ATTR));
- CegoFieldValue f1g(VARCHAR_TYPE, (*pPE)->getAttributeValue(XML_PAGEID_ATTR));
- CegoFieldValue f1h(VARCHAR_TYPE, (*pPE)->getAttributeValue(XML_FIXSTAT_ATTR));
-
- ListT<CegoFieldValue> fl;
- fl.Insert(f1a);
- fl.Insert(f1b);
- fl.Insert(f1c);
- fl.Insert(f1d);
- fl.Insert(f1e);
- fl.Insert(f1f);
- fl.Insert(f1g);
- fl.Insert(f1h);
-
- info.Insert(fl);
-
- pPE = peList.Next();
- }
- }
-}
-
-void CegoAdminHandler::getTableSetList(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info, bool getUsage)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> tList = pRoot->getChildren(XML_TABLESETLIST_ELEMENT);
- Element **pTL = tList.First();
-
-
- ListT<Element*> tsList = (*pTL)->getChildren(XML_TABLESET_ELEMENT);
- Element** pTS = tsList.First();
-
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("TSL"), Chain("TSL"), Chain("NAME"),VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("TSL"), Chain("TSL"), Chain("RUNSTATE"), VARCHAR_TYPE, 8));
- schema.Insert(CegoField(Chain("TSL"), Chain("TSL"), Chain("SYNCSTATE"), VARCHAR_TYPE, 12));
- if ( getUsage )
- {
- schema.Insert(CegoField(Chain("TSL"), Chain("TSL"), Chain("SYSUSAGE"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("TSL"), Chain("TSL"), Chain("TEMPUSAGE"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("TSL"), Chain("TSL"), Chain("APPUSAGE"), VARCHAR_TYPE, 10));
- }
-
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("TSL"), schema, Chain("TSL"));
-
- while ( pTS )
- {
-
- Chain tsName = (*pTS)->getAttributeValue(XML_NAME_ATTR);
- Chain tsRunState = (*pTS)->getAttributeValue(XML_RUNSTATE_ATTR);
- Chain tsSyncState = (*pTS)->getAttributeValue(XML_SYNCSTATE_ATTR);
-
- CegoFieldValue f1a(VARCHAR_TYPE, tsName);
- CegoFieldValue f1b(VARCHAR_TYPE, tsRunState);
- CegoFieldValue f1c(VARCHAR_TYPE, tsSyncState);
-
- ListT<CegoFieldValue> fl1;
- fl1.Insert(f1a);
- fl1.Insert(f1b);
- fl1.Insert(f1c);
-
-
- if ( getUsage )
- {
-
- Chain tsSysUsage = (*pTS)->getAttributeValue(XML_SYSUSAGE_ATTR);
- Chain tsTempUsage = (*pTS)->getAttributeValue(XML_TEMPUSAGE_ATTR);
- Chain tsAppUsage = (*pTS)->getAttributeValue(XML_APPUSAGE_ATTR);
-
- CegoFieldValue f1d(VARCHAR_TYPE, tsSysUsage);
- CegoFieldValue f1e(VARCHAR_TYPE, tsTempUsage);
- CegoFieldValue f1f(VARCHAR_TYPE, tsAppUsage);
-
- fl1.Insert(f1d);
- fl1.Insert(f1e);
- fl1.Insert(f1f);
- }
-
-
- info.Insert(fl1);
-
- pTS = tsList.Next();
- }
- }
-}
-
-void CegoAdminHandler::getTableSetCheck(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> tList = pRoot->getChildren(XML_TABLESETCHECK_ELEMENT);
- Element **pTL = tList.First();
-
-
- ListT<Element*> tsList = (*pTL)->getChildren(XML_ATTRCHECK_ELEMENT);
- Element** pTS = tsList.First();
-
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("CHK"), Chain("CHK"), Chain("ATTRIBUTE"),VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("CHK"), Chain("CHK"), Chain(XML_MEDIATOR_ATTR), VARCHAR_TYPE, 12));
- schema.Insert(CegoField(Chain("CHK"), Chain("CHK"), Chain(XML_PRIMARY_ATTR), VARCHAR_TYPE, 12));
- schema.Insert(CegoField(Chain("CHK"), Chain("CHK"), Chain(XML_SECONDARY_ATTR), VARCHAR_TYPE, 12));
-
- CegoFieldValue f1c(VARCHAR_TYPE, (*pTL)->getAttributeValue(XML_SECONDARY_ATTR));
-
-
- ListT<CegoFieldValue> fl1;
- fl1.Insert( CegoFieldValue(VARCHAR_TYPE, Chain("NAME")));
- fl1.Insert( CegoFieldValue(VARCHAR_TYPE, (*pTL)->getAttributeValue(XML_MEDIATOR_ATTR)));
- fl1.Insert( CegoFieldValue(VARCHAR_TYPE, (*pTL)->getAttributeValue(XML_PRIMARY_ATTR)));
- fl1.Insert( CegoFieldValue(VARCHAR_TYPE, (*pTL)->getAttributeValue(XML_SECONDARY_ATTR)));
-
- info.Insert(fl1);
-
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("CHK"), schema, Chain("CHK"));
-
- while ( pTS )
- {
-
- Chain attr = (*pTS)->getAttributeValue(XML_CHECKATTR_ATTR);
- Chain mVal = (*pTS)->getAttributeValue(XML_MVAL_ATTR);
- Chain pVal = (*pTS)->getAttributeValue(XML_PVAL_ATTR);
- Chain sVal = (*pTS)->getAttributeValue(XML_SVAL_ATTR);
-
- CegoFieldValue f1a(VARCHAR_TYPE, attr);
- CegoFieldValue f1b(VARCHAR_TYPE, mVal);
- CegoFieldValue f1c(VARCHAR_TYPE, pVal);
- CegoFieldValue f1d(VARCHAR_TYPE, sVal);
-
- ListT<CegoFieldValue> fl1;
- fl1.Insert(f1a);
- fl1.Insert(f1b);
- fl1.Insert(f1c);
- fl1.Insert(f1d);
-
- info.Insert(fl1);
-
- pTS = tsList.Next();
- }
- }
-}
-
-Element* CegoAdminHandler::getTableSetCheckInfo()
-{
-
- Element *pCheck = 0;
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> tsInfoList = pRoot->getChildren(XML_TABLESET_ELEMENT);
-
- Element **pInfo = tsInfoList.First();
-
- pCheck = new Element(XML_TABLESET_ELEMENT);
-
- pCheck->setAttribute(XML_RUNSTATE_ATTR, (*pInfo)->getAttributeValue(XML_RUNSTATE_ATTR));
- pCheck->setAttribute(XML_SYNCSTATE_ATTR, (*pInfo)->getAttributeValue(XML_SYNCSTATE_ATTR));
- pCheck->setAttribute(XML_PRIMARY_ATTR, (*pInfo)->getAttributeValue(XML_PRIMARY_ATTR));
- pCheck->setAttribute(XML_SECONDARY_ATTR, (*pInfo)->getAttributeValue(XML_SECONDARY_ATTR));
- pCheck->setAttribute(XML_MEDIATOR_ATTR, (*pInfo)->getAttributeValue(XML_MEDIATOR_ATTR));
-
- }
-
- return pCheck;
-
-}
-
-void CegoAdminHandler::getDetailedTableSetInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> tsInfoList = pRoot->getChildren(XML_TABLESET_ELEMENT);
-
- Element **pInfo = tsInfoList.First();
-
- int maxLen=20;
-
- Chain tsRunState = (*pInfo)->getAttributeValue(XML_RUNSTATE_ATTR);
- Chain tsSyncState = (*pInfo)->getAttributeValue(XML_SYNCSTATE_ATTR);
-
- Chain tsPrimary = (*pInfo)->getAttributeValue(XML_PRIMARY_ATTR);
- if ( tsPrimary.length() > maxLen )
- maxLen=tsPrimary.length();
-
- Chain tsSecondary = (*pInfo)->getAttributeValue(XML_SECONDARY_ATTR);
- if ( tsSecondary.length() > maxLen )
- maxLen=tsSecondary.length();
-
- Chain tsMediator = (*pInfo)->getAttributeValue(XML_MEDIATOR_ATTR);
- if ( tsMediator.length() > maxLen )
- maxLen=tsMediator.length();
-
- Chain tsRoot = (*pInfo)->getAttributeValue(XML_TSROOT_ATTR);
- if ( tsRoot.length() > maxLen )
- maxLen=tsRoot.length();
-
- Chain tsTicket = (*pInfo)->getAttributeValue(XML_TSTICKET_ATTR);
- if ( tsTicket.length() > maxLen )
- maxLen=tsTicket.length();
-
- Chain tsInitFile = (*pInfo)->getAttributeValue(XML_TSINITFILE_ATTR);
- if ( tsInitFile.length() > maxLen )
- maxLen=tsInitFile.length();
-
- Chain tsSysFile = (*pInfo)->getAttributeValue(XML_SYSFILE_ATTR);
- if ( tsSysFile.length() > maxLen )
- maxLen=tsSysFile.length();
-
- Chain tsTempFile = (*pInfo)->getAttributeValue(XML_TEMPFILE_ATTR);
- if ( tsTempFile.length() > maxLen )
- maxLen=tsTempFile.length();
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("TABLESETINFO"), Chain("TABLESETINFO"), Chain("PARAMETER"),VARCHAR_TYPE, 20));
- schema.Insert(CegoField(Chain("TABLESETINFO"), Chain("TABLESETINFO"), Chain("VALUE"), VARCHAR_TYPE, maxLen));
-
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("TABLESETINFO"), schema, Chain("TABLESETINFO"));
-
- Chain tableSet = (*pInfo)->getAttributeValue(XML_NAME_ATTR);
-
- Chain checkpoint = (*pInfo)->getAttributeValue(XML_CHECKPOINT_ATTR);
-
- Chain tsSysTotal = (*pInfo)->getAttributeValue(XML_SYSTOTAL_ATTR);
- Chain tsSysUsed = (*pInfo)->getAttributeValue(XML_SYSUSED_ATTR);
-
- Chain tsTempTotal = (*pInfo)->getAttributeValue(XML_TEMPTOTAL_ATTR);
- Chain tsTempUsed = (*pInfo)->getAttributeValue(XML_TEMPUSED_ATTR);
-
- long tsSysSumTotal = tsSysTotal.asLong();
- long tsSysSumUsed = tsSysUsed.asLong();
-
- long tsTmpSumTotal = tsTempTotal.asLong();
- long tsTmpSumUsed = tsTempUsed.asLong();
-
- long tsAppSumTotal = 0;
- long tsAppSumUsed = 0;
-
- ListT<Element*> dataFileList = (*pInfo)->getChildren(XML_DATAFILE_ELEMENT);
- Element **pDF = dataFileList.First();
-
- while ( pDF )
- {
- Chain fileType = (*pDF)->getAttributeValue(XML_TYPE_ATTR);
-
- if ( fileType == Chain(XML_SYSFILE_VALUE) )
- {
- Chain sfNumTotal = (*pDF)->getAttributeValue(XML_NUMTOTAL_ATTR);
- Chain sfNumUsed = (*pDF)->getAttributeValue(XML_NUMUSED_ATTR);
-
- tsSysSumTotal += sfNumTotal.asLong();
- tsSysSumUsed += sfNumUsed.asLong();
-
- }
- else if ( fileType == Chain(XML_TEMPFILE_VALUE) )
- {
-
- Chain tfNumTotal = (*pDF)->getAttributeValue(XML_NUMTOTAL_ATTR);
- Chain tfNumUsed = (*pDF)->getAttributeValue(XML_NUMUSED_ATTR);
-
- tsTmpSumTotal += tfNumTotal.asLong();
- tsTmpSumUsed += tfNumUsed.asLong();
-
- }
- else if ( fileType == Chain(XML_APPFILE_VALUE) )
- {
-
- Chain afNumTotal = (*pDF)->getAttributeValue(XML_NUMTOTAL_ATTR);
- Chain afNumUsed = (*pDF)->getAttributeValue(XML_NUMUSED_ATTR);
-
- tsAppSumTotal += afNumTotal.asLong();
- tsAppSumUsed += afNumUsed.asLong();
-
- }
- pDF = dataFileList.Next();
- }
-
- Chain sortAreaSize = (*pInfo)->getAttributeValue(XML_SORTAREASIZE_ATTR);
- Chain clsn = (*pInfo)->getAttributeValue(XML_LSN_ATTR);
- Chain tid = (*pInfo)->getAttributeValue(XML_TID_ATTR);
- Chain nextlsn = (*pInfo)->getAttributeValue(XML_NEXTLSN_ATTR);
-
- Chain archMode = (*pInfo)->getAttributeValue(XML_ARCHMODE_ATTR);
-
- CegoFieldValue f0a(VARCHAR_TYPE, Chain(INFO_TABLESET));
- CegoFieldValue f0b(VARCHAR_TYPE, tableSet);
- ListT<CegoFieldValue> fl0;
- fl0.Insert(f0a);
- fl0.Insert(f0b);
- info.Insert(fl0);
-
- CegoFieldValue f1a(VARCHAR_TYPE, Chain(INFO_RUNSTATE));
- CegoFieldValue f1b(VARCHAR_TYPE, tsRunState);
- ListT<CegoFieldValue> fl1a;
- fl1a.Insert(f1a);
- fl1a.Insert(f1b);
- info.Insert(fl1a);
-
- CegoFieldValue f1c(VARCHAR_TYPE, Chain(INFO_SYNCSTATE));
- CegoFieldValue f1d(VARCHAR_TYPE, tsSyncState);
- ListT<CegoFieldValue> fl1b;
- fl1b.Insert(f1c);
- fl1b.Insert(f1d);
- info.Insert(fl1b);
-
- CegoFieldValue f2a(VARCHAR_TYPE, Chain(INFO_PRIMARY));
- CegoFieldValue f2b(VARCHAR_TYPE, tsPrimary);
- ListT<CegoFieldValue> fl2;
- fl2.Insert(f2a);
- fl2.Insert(f2b);
- info.Insert(fl2);
-
- CegoFieldValue f3a(VARCHAR_TYPE, Chain(INFO_SECONDARY));
- CegoFieldValue f3b(VARCHAR_TYPE, tsSecondary);
- ListT<CegoFieldValue> fl3;
- fl3.Insert(f3a);
- fl3.Insert(f3b);
- info.Insert(fl3);
-
- CegoFieldValue f4a(VARCHAR_TYPE, Chain(INFO_MEDIATOR));
- CegoFieldValue f4b(VARCHAR_TYPE, tsMediator);
- ListT<CegoFieldValue> fl4;
- fl4.Insert(f4a);
- fl4.Insert(f4b);
- info.Insert(fl4);
-
- CegoFieldValue f41a(VARCHAR_TYPE, Chain(INFO_ROOTPATH));
- CegoFieldValue f41b(VARCHAR_TYPE, tsRoot);
- ListT<CegoFieldValue> fl41;
- fl41.Insert(f41a);
- fl41.Insert(f41b);
- info.Insert(fl41);
-
- CegoFieldValue f42a(VARCHAR_TYPE, Chain(INFO_TICKET));
- CegoFieldValue f42b(VARCHAR_TYPE, tsTicket);
- ListT<CegoFieldValue> fl42;
- fl42.Insert(f42a);
- fl42.Insert(f42b);
- info.Insert(fl42);
-
- CegoFieldValue f43a(VARCHAR_TYPE, Chain(INFO_TSINITFILE));
- CegoFieldValue f43b(VARCHAR_TYPE, tsInitFile);
- ListT<CegoFieldValue> fl43;
- fl43.Insert(f43a);
- fl43.Insert(f43b);
- info.Insert(fl43);
-
- CegoFieldValue f44a(VARCHAR_TYPE, Chain(INFO_CHECKPOINT));
- CegoFieldValue f44b(VARCHAR_TYPE, checkpoint);
- ListT<CegoFieldValue> fl44;
- fl44.Insert(f44a);
- fl44.Insert(f44b);
- info.Insert(fl44);
-
- CegoFieldValue f6a(VARCHAR_TYPE, Chain(INFO_SYSTEMPAGETOTAL));
- CegoFieldValue f6b(VARCHAR_TYPE, Chain(tsSysSumTotal));
- ListT<CegoFieldValue> fl6;
- fl6.Insert(f6a);
- fl6.Insert(f6b);
- info.Insert(fl6);
-
- CegoFieldValue f7a(VARCHAR_TYPE, Chain(INFO_SYSTEMPAGEUSED));
- CegoFieldValue f7b(VARCHAR_TYPE, Chain(tsSysSumUsed));
- ListT<CegoFieldValue> fl7;
- fl7.Insert(f7a);
- fl7.Insert(f7b);
- info.Insert(fl7);
-
- // id 8 not used
-
- CegoFieldValue f9a(VARCHAR_TYPE, Chain(INFO_TEMPPAGETOTAL));
- CegoFieldValue f9b(VARCHAR_TYPE, Chain(tsTmpSumTotal));
- ListT<CegoFieldValue> fl9;
- fl9.Insert(f9a);
- fl9.Insert(f9b);
- info.Insert(fl9);
-
- CegoFieldValue f10a(VARCHAR_TYPE, Chain(INFO_TEMPPAGEUSED));
- CegoFieldValue f10b(VARCHAR_TYPE, Chain(tsTmpSumUsed));
- ListT<CegoFieldValue> fl10;
- fl10.Insert(f10a);
- fl10.Insert(f10b);
- info.Insert(fl10);
-
- CegoFieldValue f11a(VARCHAR_TYPE, Chain(INFO_APPPAGETOTAL));
- CegoFieldValue f11b(VARCHAR_TYPE, Chain(tsAppSumTotal));
- ListT<CegoFieldValue> fl11;
- fl11.Insert(f11a);
- fl11.Insert(f11b);
- info.Insert(fl11);
-
- CegoFieldValue f12a(VARCHAR_TYPE, Chain(INFO_APPPAGEUSED));
- CegoFieldValue f12b(VARCHAR_TYPE, Chain(tsAppSumUsed));
- ListT<CegoFieldValue> fl12;
- fl12.Insert(f12a);
- fl12.Insert(f12b);
- info.Insert(fl12);
-
- CegoFieldValue f20a(VARCHAR_TYPE, Chain(INFO_SORTAREASIZE));
- CegoFieldValue f20b(VARCHAR_TYPE, sortAreaSize);
- ListT<CegoFieldValue> fl20;
- fl20.Insert(f20a);
- fl20.Insert(f20b);
- info.Insert(fl20);
-
- CegoFieldValue f14a(VARCHAR_TYPE, Chain(INFO_TID));
- CegoFieldValue f14b(VARCHAR_TYPE, tid);
- ListT<CegoFieldValue> fl14;
- fl14.Insert(f14a);
- fl14.Insert(f14b);
- info.Insert(fl14);
-
- CegoFieldValue f15a(VARCHAR_TYPE, Chain(INFO_CLSN));
- CegoFieldValue f15b(VARCHAR_TYPE, clsn);
- ListT<CegoFieldValue> fl15;
- fl15.Insert(f15a);
- fl15.Insert(f15b);
- info.Insert(fl15);
-
- CegoFieldValue f16a(VARCHAR_TYPE, Chain(INFO_NLSN));
- CegoFieldValue f16b(VARCHAR_TYPE, nextlsn);
- ListT<CegoFieldValue> fl16;
- fl16.Insert(f16a);
- fl16.Insert(f16b);
- info.Insert(fl16);
-
- CegoFieldValue f17a(VARCHAR_TYPE, Chain(INFO_ARCHMODE));
- CegoFieldValue f17b(VARCHAR_TYPE, archMode);
- ListT<CegoFieldValue> fl17;
- fl17.Insert(f17a);
- fl17.Insert(f17b);
- info.Insert(fl17);
-
-
- ListT<Element*> logFileList = (*pInfo)->getChildren(XML_LOGFILE_ELEMENT);
- Element **pLF = logFileList.First();
-
- if ( pLF )
- {
- Chain logSize = (*pLF)->getAttributeValue(XML_SIZE_ATTR);
- CegoFieldValue fa(VARCHAR_TYPE, Chain(INFO_LOGSIZE));
- CegoFieldValue fb(VARCHAR_TYPE, logSize);
- ListT<CegoFieldValue> fl;
- fl.Insert(fa);
- fl.Insert(fb);
- info.Insert(fl);
-
- }
- while ( pLF )
- {
-
- Chain logName = (*pLF)->getAttributeValue(XML_NAME_ATTR);
-
- CegoFieldValue fa(VARCHAR_TYPE, Chain(INFO_LOGFILE));
- CegoFieldValue fb(VARCHAR_TYPE, logName);
- ListT<CegoFieldValue> fl;
- fl.Insert(fa);
- fl.Insert(fb);
- info.Insert(fl);
-
- pLF = logFileList.Next();
- }
- }
-}
-
-Element* CegoAdminHandler::getTSInfo()
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> tList = pRoot->getChildren(XML_TABLESET_ELEMENT);
- Element **pTL = tList.First();
- if ( pTL )
- return *pTL;
- }
-
- return 0;
-}
-
-Element* CegoAdminHandler::getObjectInfo()
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> tlist = pRoot->getChildren(XML_OBJLIST_ELEMENT);
- Element **pTL = tlist.First();
- if ( pTL )
- return *pTL;
- }
-
- return 0;
-}
-
-Element* CegoAdminHandler::getTAInfo()
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> tlist = pRoot->getChildren(XML_TAINFO_ELEMENT);
- Element **pTL = tlist.First();
- if ( pTL )
- return *pTL;
- }
-
- return 0;
-}
-
-void CegoAdminHandler::getBuFileInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> tsInfoList = pRoot->getChildren(XML_TABLESET_ELEMENT);
- Element **pInfo = tsInfoList.First();
-
- Chain tsTicket = (*pInfo)->getAttributeValue(XML_TSTICKET_ATTR);
- unsigned int maxLen=tsTicket.length();
-
- CegoFieldValue b1(VARCHAR_TYPE, tsTicket);
-
- ListT<CegoFieldValue> bl;
-
- bl.Insert(b1);
- info.Insert(bl);
-
- Chain sysFile = (*pInfo)->getAttributeValue(XML_SYSFILE_ATTR);
- if ( sysFile.length() > maxLen )
- maxLen=sysFile.length();
-
- CegoFieldValue s1(VARCHAR_TYPE, sysFile);
-
- ListT<CegoFieldValue> sl;
-
- sl.Insert(s1);
- info.Insert(sl);
-
- Chain tempFile = (*pInfo)->getAttributeValue(XML_TEMPFILE_ATTR);
- if ( tempFile.length() > maxLen )
- maxLen=tempFile.length();
-
- CegoFieldValue t1(VARCHAR_TYPE, (*pInfo)->getAttributeValue(XML_TEMPFILE_ATTR));
-
- ListT<CegoFieldValue> tl;
-
- tl.Insert(t1);
-
- info.Insert(tl);
-
- ListT<Element*> dataFileList = (*pInfo)->getChildren(XML_DATAFILE_ELEMENT);
- Element **pDF = dataFileList.First();
-
- while ( pDF )
- {
- Chain fileName = (*pDF)->getAttributeValue(XML_NAME_ATTR);
- if ( fileName.length() > maxLen )
- maxLen = fileName.length();
- pDF = dataFileList.Next();
- }
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("BUFILEINFO"), Chain("BUILEINFO"), Chain("FILENAME"), VARCHAR_TYPE, maxLen));
-
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("DATAFILEINFO"), schema, Chain("DATAFILEINFO"));
-
- pDF = dataFileList.First();
- while ( pDF )
- {
- Chain fileName = (*pDF)->getAttributeValue(XML_NAME_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, fileName);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
-
- info.Insert(fl);
-
- pDF = dataFileList.Next();
- }
- }
-}
-
-
-void CegoAdminHandler::getDataFileInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info, Chain& format)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> tsInfoList = pRoot->getChildren(XML_TABLESET_ELEMENT);
- Element **pInfo = tsInfoList.First();
-
- Chain sysFile = (*pInfo)->getAttributeValue(XML_SYSFILE_ATTR);
- unsigned int maxLen=sysFile.length();
-
- CegoFieldValue s1(VARCHAR_TYPE, sysFile);
- CegoFieldValue s2(VARCHAR_TYPE, Chain(XML_SYSFILE_ATTR));
- CegoFieldValue s3(INT_TYPE, (*pInfo)->getAttributeValue(XML_SYSTOTAL_ATTR).asInteger());
- CegoFieldValue s4(INT_TYPE, (*pInfo)->getAttributeValue(XML_SYSUSED_ATTR).asInteger());
-
- ListT<CegoFieldValue> sl;
-
- sl.Insert(s1);
- sl.Insert(s2);
- sl.Insert(s3);
- sl.Insert(s4);
-
- info.Insert(sl);
-
- Chain tempFile = (*pInfo)->getAttributeValue(XML_TEMPFILE_ATTR);
- if ( tempFile.length() > maxLen )
- maxLen=tempFile.length();
-
- CegoFieldValue t1(VARCHAR_TYPE, (*pInfo)->getAttributeValue(XML_TEMPFILE_ATTR));
- CegoFieldValue t2(VARCHAR_TYPE, Chain(XML_TEMPFILE_ATTR));
- CegoFieldValue t3(INT_TYPE, (*pInfo)->getAttributeValue(XML_TEMPTOTAL_ATTR).asInteger());
- CegoFieldValue t4(INT_TYPE, (*pInfo)->getAttributeValue(XML_TEMPUSED_ATTR).asInteger());
-
- ListT<CegoFieldValue> tl;
-
- tl.Insert(t1);
- tl.Insert(t2);
- tl.Insert(t3);
- tl.Insert(t4);
-
- info.Insert(tl);
-
-
- ListT<Element*> dataFileList = (*pInfo)->getChildren(XML_DATAFILE_ELEMENT);
- Element **pDF = dataFileList.First();
-
- while ( pDF )
- {
- Chain fileName = (*pDF)->getAttributeValue(XML_NAME_ATTR);
- if ( fileName.length() > maxLen )
- maxLen = fileName.length();
- pDF = dataFileList.Next();
- }
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("DATAFILEINFO"), Chain("DATAFILEINFO"), Chain("FILENAME"), VARCHAR_TYPE, maxLen));
- schema.Insert(CegoField(Chain("DATAFILEINFO"), Chain("DATAFILEINFO"), Chain("FILETYPE"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("DATAFILEINFO"), Chain("DATAFILEINFO"), Chain("SIZE"), INT_TYPE, sizeof(int)));
- schema.Insert(CegoField(Chain("DATAFILEINFO"), Chain("DATAFILEINFO"), Chain("USED"), INT_TYPE, sizeof(int)));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("DATAFILEINFO"), schema, Chain("DATAFILEINFO"));
-
- format = Chain("llrr");
-
- pDF = dataFileList.First();
- while ( pDF )
- {
- Chain fileName = (*pDF)->getAttributeValue(XML_NAME_ATTR);
- Chain fileType = (*pDF)->getAttributeValue(XML_TYPE_ATTR);
-
- Chain numTotal = (*pDF)->getAttributeValue(XML_NUMTOTAL_ATTR);
- Chain numUsed = (*pDF)->getAttributeValue(XML_NUMUSED_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, fileName);
- CegoFieldValue f2(VARCHAR_TYPE, fileType);
- CegoFieldValue f3(INT_TYPE, numTotal);
- CegoFieldValue f4(INT_TYPE, numUsed);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
- fl.Insert(f3);
- fl.Insert(f4);
-
- info.Insert(fl);
-
- pDF = dataFileList.Next();
- }
- }
-}
-
-
-void CegoAdminHandler::getArchLogInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> tsInfoList = pRoot->getChildren(XML_TABLESET_ELEMENT);
- Element **pInfo = tsInfoList.First();
-
- ListT<Element*> archLogList = (*pInfo)->getChildren(XML_ARCHIVELOG_ELEMENT);
- Element **pAL = archLogList.First();
-
-
- unsigned int maxLen = 0;
- while ( pAL )
- {
- Chain archPath = (*pAL)->getAttributeValue(XML_ARCHPATH_ATTR);
-
- if ( maxLen < archPath.length() )
- maxLen = archPath.length();
-
- pAL = archLogList.Next();
- }
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("ARCHLOGINFO"), Chain("ARCHLOGINFO"), Chain("ARCHID"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("ARCHLOGINFO"), Chain("ARCHLOGINFO"), Chain("ARCHPATH"), VARCHAR_TYPE, maxLen));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("ARCHLOGINFO"), schema, Chain("ARCHLOGINFO"));
-
- pAL = archLogList.First();
- while ( pAL )
- {
- Chain archId = (*pAL)->getAttributeValue(XML_ARCHID_ATTR);
- Chain archPath = (*pAL)->getAttributeValue(XML_ARCHPATH_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, archId);
- CegoFieldValue f2(VARCHAR_TYPE, archPath);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
-
- info.Insert(fl);
-
- pAL = archLogList.Next();
- }
- }
-}
-
-
-void CegoAdminHandler::getObjectInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- ListT<Element*> oList = pRoot->getChildren(XML_OBJLIST_ELEMENT);
- Element **pOL = oList.First();
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("OBJINFO"), Chain("OBJINFO"), Chain("Type"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("OBJINFO"), Chain("OBJINFO"), Chain("Name"), VARCHAR_TYPE, 20));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("OBJINFO"), schema, Chain("OBJINFO"));
-
- if ( pOL )
- {
-
- ListT<Element*> oeList = (*pOL)->getChildren(XML_OBJ_ELEMENT);
-
- Element **pOE = oeList.First();
-
- while ( pOE )
- {
- Chain objType = (*pOE)->getAttributeValue(XML_OBJTYPE_ATTR);
- Chain objName = (*pOE)->getAttributeValue(XML_OBJNAME_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, objType);
- CegoFieldValue f2(VARCHAR_TYPE, objName);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
-
- info.Insert(fl);
-
- pOE = oeList.Next();
- }
- }
- }
-}
-
-void CegoAdminHandler::getTransactionInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- ListT<Element*> taList = pRoot->getChildren(XML_TAINFO_ELEMENT);
- Element **pTA = taList.First();
-
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("TAINFO"), Chain("TAINFO"), Chain("RBO"), VARCHAR_TYPE, 15));
- schema.Insert(CegoField(Chain("TAINFO"), Chain("TAINFO"), Chain("NUMOP"), INT_TYPE, sizeof(int)));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("TAINFO"), schema, Chain("TAINFO"));
-
- if ( pTA )
- {
-
- ListT<Element*> teList = (*pTA)->getChildren(XML_TAENTRY_ELEMENT);
-
- Element **pTE = teList.First();
-
- while ( pTE )
- {
- Chain rbo = (*pTE)->getAttributeValue(XML_RBO_ATTR);
- Chain numOp = (*pTE)->getAttributeValue(XML_NUMOP_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, rbo);
- CegoFieldValue f2(VARCHAR_TYPE, numOp);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
-
- info.Insert(fl);
-
- pTE = teList.Next();
- }
- }
- }
-}
-
-
-void CegoAdminHandler::getBUStatInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> busList = pRoot->getChildren(XML_BUSINFO_ELEMENT);
- Element **pBUS = busList.First();
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("BUSTAT"), Chain("BUSTAT"), Chain("TS"), VARCHAR_TYPE, 20));
- schema.Insert(CegoField(Chain("BUSTAT"), Chain("BUSTAT"), Chain("BUINFO"), VARCHAR_TYPE, 20));
- schema.Insert(CegoField(Chain("BUSTAT"), Chain("BUSTAT"), Chain("BUMSG"), VARCHAR_TYPE, 50));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("BUSTAT"), schema, Chain("BUSTAT"));
-
- if ( pBUS )
- {
-
- ListT<Element*> bueList = (*pBUS)->getChildren(XML_BUENTRY_ELEMENT);
-
- Element **pBUE = bueList.First();
-
- while ( pBUE )
- {
- Chain ts = (*pBUE)->getAttributeValue(XML_TIMESTAMP_ATTR);
- Chain buinfo = (*pBUE)->getAttributeValue(XML_BUINFO_ATTR);
- Chain bumsg = (*pBUE)->getAttributeValue(XML_BUMSG_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, ts);
- CegoFieldValue f2(VARCHAR_TYPE, buinfo);
- CegoFieldValue f3(VARCHAR_TYPE, bumsg);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
- fl.Insert(f3);
-
- info.Insert(fl);
-
- pBUE = bueList.Next();
- }
- }
- }
-}
-
-
-
-
-void CegoAdminHandler::getNodeInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> nodeInfoList = pRoot->getChildren(XML_NODEINFO_ELEMENT);
- Element **pInfo = nodeInfoList.First();
-
- ListT<Element*> nodeList = (*pInfo)->getChildren(XML_NODE_ELEMENT);
- Element **pN = nodeList.First();
-
- unsigned int maxLen = 0;
- while ( pN )
- {
- Chain hostName = (*pN)->getAttributeValue(XML_HOSTNAME_ATTR);
-
- if ( maxLen < hostName.length() )
- maxLen = hostName.length();
-
- pN = nodeList.Next();
- }
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("NODEINFO"), Chain("NODEINFO"), Chain("NAME"), VARCHAR_TYPE, maxLen));
- schema.Insert(CegoField(Chain("NODEINFO"), Chain("NODEINFO"), Chain("STATUS"), VARCHAR_TYPE, 10));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("NODEINFO"), schema, Chain("NODEINFO"));
-
- pN = nodeList.First();
- while ( pN )
- {
- Chain hostName = (*pN)->getAttributeValue(XML_HOSTNAME_ATTR);
- Chain status = (*pN)->getAttributeValue(XML_STATUS_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, hostName);
- CegoFieldValue f2(VARCHAR_TYPE, status);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
-
- info.Insert(fl);
-
- pN = nodeList.Next();
- }
- }
-}
-
-void CegoAdminHandler::getUserInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
- int userLen=10;
- int roleLen=10;
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- ListT<Element*> userInfoList = pRoot->getChildren(XML_USERINFO_ELEMENT);
- Element **pUserInfoElement = userInfoList.First();
- if ( pUserInfoElement )
- {
- ListT<Element*> userElementList = (*pUserInfoElement)->getChildren(XML_USER_ELEMENT);
- Element **pUserElement = userElementList.First();
-
- while ( pUserElement )
- {
-
- Chain userName = (*pUserElement)->getAttributeValue(XML_NAME_ATTR);
- if ( userName.length() > userLen )
- userLen=userName.length();
-
- Chain role = (*pUserElement)->getAttributeValue(XML_ROLE_ATTR);
- if ( role.length() > roleLen )
- roleLen=role.length();
-
- Chain trace = (*pUserElement)->getAttributeValue(XML_TRACE_ATTR);
-
- Chain numReq = (*pUserElement)->getAttributeValue(XML_NUMREQUEST_ATTR);
- Chain numQuery = (*pUserElement)->getAttributeValue(XML_NUMQUERY_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, userName);
- CegoFieldValue f2(VARCHAR_TYPE, role);
- CegoFieldValue f3(VARCHAR_TYPE, trace);
- CegoFieldValue f4(VARCHAR_TYPE, numReq);
- CegoFieldValue f5(VARCHAR_TYPE, numQuery);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
- fl.Insert(f3);
- fl.Insert(f4);
- fl.Insert(f5);
-
- info.Insert(fl);
-
- pUserElement = userElementList.Next();
- }
- }
- }
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("USERINFO"), Chain("USERINFO"), Chain("NAME"), VARCHAR_TYPE, userLen));
- schema.Insert(CegoField(Chain("USERINFO"), Chain("USERINFO"), Chain("ROLE"), VARCHAR_TYPE, roleLen));
- schema.Insert(CegoField(Chain("USERINFO"), Chain("USERINFO"), Chain("TRACE"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("USERINFO"), Chain("USERINFO"), Chain("NUMREQ"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("USERINFO"), Chain("USERINFO"), Chain("NUMQUERY"), VARCHAR_TYPE, 10));
-
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("USERINFO"), schema, Chain("USERINFO"));
-
-}
-
-void CegoAdminHandler::getTableSetVerificationInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("TSVERIFY"), Chain("TSVERIFY"), Chain("TYPE"), VARCHAR_TYPE, 15));
- schema.Insert(CegoField(Chain("TSVERIFY"), Chain("TSVERIFY"), Chain("NAME"), VARCHAR_TYPE, 40));
- schema.Insert(CegoField(Chain("TSVERIFY"), Chain("TSVERIFY"), Chain("STATUS"), VARCHAR_TYPE, 50));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("TSVERIFY"), schema, Chain("TSVERIFY"));
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- ListT<Element*> verifyInfoList = pRoot->getChildren(XML_VERIFICATION_ELEMENT);
- Element **pVerifyInfoElement = verifyInfoList.First();
- if ( pVerifyInfoElement )
- {
- ListT<Element*> checkElementList = (*pVerifyInfoElement)->getChildren(XML_CHECK_ELEMENT);
- Element **pCheckElement = checkElementList.First();
-
-
- while ( pCheckElement )
- {
-
- Chain checkType = (*pCheckElement)->getAttributeValue(XML_TYPE_ATTR);
- Chain checkName = (*pCheckElement)->getAttributeValue(XML_NAME_ATTR);
- Chain checkStatus = (*pCheckElement)->getAttributeValue(XML_VALUE_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, checkType);
- CegoFieldValue f2(VARCHAR_TYPE, checkName);
- CegoFieldValue f3(VARCHAR_TYPE, checkStatus);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
- fl.Insert(f3);
-
- info.Insert(fl);
-
- pCheckElement = checkElementList.Next();
- }
- }
- }
-}
-
-
-void CegoAdminHandler::getTableSetCorrectionInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("TSCORRECT"), Chain("TSCORRECT"), Chain("TYPE"), VARCHAR_TYPE, 15));
- schema.Insert(CegoField(Chain("TSCORRECT"), Chain("TSCORRECT"), Chain("NAME"), VARCHAR_TYPE, 40));
- schema.Insert(CegoField(Chain("TSCORRECT"), Chain("TSCORRECT"), Chain("STATUS"), VARCHAR_TYPE, 50));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("TSCORRECT"), schema, Chain("TSCORRECT"));
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- ListT<Element*> correctInfoList = pRoot->getChildren(XML_CORRECTION_ELEMENT);
- Element **pCorrectInfoElement = correctInfoList.First();
- if ( pCorrectInfoElement )
- {
- ListT<Element*> checkElementList = (*pCorrectInfoElement)->getChildren(XML_CHECK_ELEMENT);
- Element **pCheckElement = checkElementList.First();
-
- while ( pCheckElement )
- {
-
- Chain checkType = (*pCheckElement)->getAttributeValue(XML_TYPE_ATTR);
- Chain checkName = (*pCheckElement)->getAttributeValue(XML_NAME_ATTR);
- Chain checkStatus = (*pCheckElement)->getAttributeValue(XML_VALUE_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, checkType);
- CegoFieldValue f2(VARCHAR_TYPE, checkName);
- CegoFieldValue f3(VARCHAR_TYPE, checkStatus);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
- fl.Insert(f3);
-
- info.Insert(fl);
-
- pCheckElement = checkElementList.Next();
- }
- }
- }
-}
-
-
-void CegoAdminHandler::getRoleList(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("ROLELIST"), Chain("ROLELIST"), Chain("ROLE"), VARCHAR_TYPE, 15));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("ROLELIST"), schema, Chain("ROLELIST"));
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> roleListElementList = pRoot->getChildren(XML_ROLELIST_ELEMENT);
- Element **pRoleListElement = roleListElementList.First();
- if ( pRoleListElement )
- {
-
- ListT<Element*> roleList = (*pRoleListElement)->getChildren(XML_ROLE_ELEMENT);
- Element **pRoleElement = roleList.First();
- while ( pRoleElement )
- {
- Chain role = (*pRoleElement)->getAttributeValue(XML_NAME_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, role);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
-
- info.Insert(fl);
-
- pRoleElement = roleList.Next();
- }
- }
- }
-}
-
-void CegoAdminHandler::getRoleInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("ROLEINFO"), Chain("ROLEINFO"), Chain("PERMID"), VARCHAR_TYPE, 15));
- schema.Insert(CegoField(Chain("ROLEINFO"), Chain("ROLEINFO"), Chain("TABLESET"), VARCHAR_TYPE, 15));
- schema.Insert(CegoField(Chain("ROLEINFO"), Chain("ROLEINFO"), Chain("FILTER"), VARCHAR_TYPE, 15));
- schema.Insert(CegoField(Chain("ROLEINFO"), Chain("ROLEINFO"), Chain("PERM"), VARCHAR_TYPE, 15));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("ROLEINFO"), schema, Chain("ROLEINFO"));
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- ListT<Element*> permInfoList = pRoot->getChildren(XML_PERMINFO_ELEMENT);
-
- Element** pPermInfo = permInfoList.First();
-
- if ( pPermInfo )
- {
- ListT<Element*> permList = (*pPermInfo)->getChildren(XML_PERM_ELEMENT);
- Element **pPermElement = permList.First();
- while ( pPermElement )
- {
- Chain permid = (*pPermElement)->getAttributeValue(XML_PERMID_ATTR);
- Chain tableSet = (*pPermElement)->getAttributeValue(XML_TABLESET_ATTR);
- Chain filter = (*pPermElement)->getAttributeValue(XML_FILTER_ATTR);
- Chain perm = (*pPermElement)->getAttributeValue(XML_PERM_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, permid);
- CegoFieldValue f2(VARCHAR_TYPE, tableSet);
- CegoFieldValue f3(VARCHAR_TYPE, filter);
- CegoFieldValue f4(VARCHAR_TYPE, perm);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
- fl.Insert(f3);
- fl.Insert(f4);
-
- info.Insert(fl);
-
- pPermElement = permList.Next();
- }
- }
- }
-}
-
-void CegoAdminHandler::getLogInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
-
- ListT<Element*> tsInfoList = pRoot->getChildren(XML_TABLESET_ELEMENT);
- Element **pInfo = tsInfoList.First();
-
- ListT<Element*> logList = (*pInfo)->getChildren(XML_LOGFILE_ELEMENT);
- Element **pL = logList.First();
-
-
- unsigned int maxLen = 0;
- while ( pL )
- {
- Chain logName = (*pL)->getAttributeValue(XML_NAME_ATTR);
-
- if ( maxLen < logName.length() )
- maxLen = logName.length();
-
- pL = logList.Next();
- }
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("LOGFILE"), Chain("LOGFILE"), Chain("NAME"), VARCHAR_TYPE, maxLen));
- schema.Insert(CegoField(Chain("LOGFILE"), Chain("LOGFILE"), Chain("STATUS"), VARCHAR_TYPE, 10));
- schema.Insert(CegoField(Chain("LOGFILE"), Chain("LOGFILE"), Chain("SIZE"), VARCHAR_TYPE, 20));
- schema.Insert(CegoField(Chain("LOGFILE"), Chain("LOGFILE"), Chain("OFFSET"), VARCHAR_TYPE, 20));
- schema.Insert(CegoField(Chain("LOGFILE"), Chain("LOGFILE"), Chain("USAGE"), VARCHAR_TYPE, 20));
-
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("LOGFILE"), schema, Chain("LOGFILE"));
-
- pL = logList.First();
- while ( pL )
- {
- Chain logName = (*pL)->getAttributeValue(XML_NAME_ATTR);
- Chain logStatus = (*pL)->getAttributeValue(XML_STATUS_ATTR);
- Chain logSize = (*pL)->getAttributeValue(XML_SIZE_ATTR);
- Chain logOffset = (*pL)->getAttributeValue(XML_OFFSET_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, logName);
- CegoFieldValue f2(VARCHAR_TYPE, logStatus);
- CegoFieldValue f3(VARCHAR_TYPE, logSize);
- CegoFieldValue f4(VARCHAR_TYPE, logOffset);
- long percentUsage = logOffset.asLong() / ( logSize.asLong() / 100 );
- CegoFieldValue f5(VARCHAR_TYPE, Chain(percentUsage) + Chain("%"));
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
- fl.Insert(f3);
- fl.Insert(f4);
- fl.Insert(f5);
-
-
- info.Insert(fl);
-
- pL = logList.Next();
- }
- }
-}
-
-void CegoAdminHandler::getLogMngInfo(CegoTableObject& oe, ListT<ListT< CegoFieldValue > > & info)
-{
-
- ListT<CegoField> schema;
- schema.Insert(CegoField(Chain("LOGMNGINFO"), Chain("LOGMNGINFO"), Chain("LOGMANAGER"), VARCHAR_TYPE, 30));
- schema.Insert(CegoField(Chain("LOGMNGINFO"), Chain("LOGMNGINFO"), Chain("TIMEOUT"), VARCHAR_TYPE, 10));
- oe = CegoTableObject( 0, CegoObject::SYSTEM, Chain("LOGMNGINFO"), schema, Chain("LOGMNGINFO"));
-
- Element *pRoot = _xml.getDocument()->getRootElement();
-
- if ( pRoot )
- {
- ListT<Element*> logMngInfo = pRoot->getChildren(XML_LOGMNGINFO_ELEMENT);
-
- Element** pLogMng = logMngInfo.First();
-
- if ( pLogMng )
- {
- Chain logMng = (*pLogMng)->getAttributeValue(XML_LOGMNGPROG_ATTR);
- Chain timeout = (*pLogMng)->getAttributeValue(XML_LOGMNGTIMEOUT_ATTR);
-
- CegoFieldValue f1(VARCHAR_TYPE, logMng);
- CegoFieldValue f2(VARCHAR_TYPE, timeout);
-
- ListT<CegoFieldValue> fl;
-
- fl.Insert(f1);
- fl.Insert(f2);
-
- info.Insert(fl);
-
- }
- }
-}
-
|
[-]
[+]
|
Deleted |
cego-2.15.5.tar.bz2/src/#CegoDbThread.cc#
^
|
@@ -1,1187 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-// CegoDbThread.cc
-// ---------------
-// Cego db thread class implementation
-//
-// Design and Implementation by Bjoern Lemke
-//
-// (C)opyright 2000-2010 Bjoern Lemke
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; see the file COPYING. If not, write to
-// the Free Software Foundation, 59 Temple Place - Suite 330,
-// Boston, MA 02111-1307, USA.
-//
-// IMPLEMENTATION MODULE
-//
-// Class: CegoDbThread
-//
-// Description: This class implements the functions of a single database thread.
-// It serves a database session dispatched from the database thread pool
-// and handles subsequent requests for this session.
-// Database requests can be request from a native client but also distributed
-// requests from a different cego database node.
-//
-//
-// Status: QG-2.6
-//
-///////////////////////////////////////////////////////////////////////////////
-
-// INCLUDES
-#include <lfc/Exception.h>
-#include <lfc/Sleeper.h>
-#include <lfc/ThreadLock.h>
-
-#include "CegoXMLdef.h"
-#include "CegoDefs.h"
-#include "CegoDbThread.h"
-#include "CegoDbThreadPool.h"
-
-#include <string.h>
-#include <stdlib.h>
-
-CegoDbThread::CegoDbThread() : Thread()
-{
-}
-
-CegoDbThread::CegoDbThread(CegoDbThreadPool *pPool, CegoDatabaseManager *pDBMng, CegoDbHandler::ProtocolType protType) : Thread()
-{
- _pPool = pPool;
- _pDBMng = pDBMng;
- _protType = protType;
- _modId = _pDBMng->getModId("CegoDbThread");
- _errorCode = 0;
-
-}
-
-CegoDbThread::~CegoDbThread()
-{
- delete _pPA;
- delete _pTabMng;
-}
-
-const Chain& CegoDbThread::lastAction() const
-{
- return _lastAction;
-}
-
-void CegoDbThread::abortSession()
-{
- _pTabMng->abort();
-}
-
-int CegoDbThread::getErrorCode() const
-{
- return _errorCode;
-}
-
-void CegoDbThread::addReloadRequest(int tabSetId)
-{
- _pPool->P(_idx);
- _loadList.Insert(tabSetId);
- _pPool->V(_idx);
-}
-
-void CegoDbThread::checkReloadRequest()
-{
-
- _pPool->P(_idx);
- int *pTS = _loadList.First();
- if ( pTS )
- {
- int ts = *pTS;
- _loadList.Remove(*pTS);
- _pPool->V(_idx);
-
- _pTabMng->disableAuth();
-
- try
- {
-
- loadObjects(ts);
- }
- catch ( Exception e )
- {
-
- Chain msg;
- e.pop(msg);
- _pDBMng->log(_modId, Logger::LOGERR, Chain("Thread ") + Chain(_idx) + Chain(" reload error : ") + msg);
- }
-
- _pTabMng->enableAuth();
-
- }
- else
- {
- _pPool->V(_idx);
- }
-}
-
-void* CegoDbThread::job(void* arg)
-{
-
- try
- {
-
- _idx = *(long*)arg;
-
- _pTabMng = new CegoDistManager(_pDBMng);
- _pPA = new CegoAction(_pTabMng, _pPool);
-
- _pTim = new NanoTimer();
-
- _pTabMng->setPoolSyncInfo(_pPool, _idx);
- _pTabMng->setThreadId(getTid());
- _pPool->setTid(_idx, getTid());
- _pPool->setThreadState(_idx, CegoDbThreadPool::READY);
-
- while ( ! _pPool->isTerminated() )
- {
- try
- {
- _pTim->reset();
- _pTim->start();
-
- _pRequest = _pPool->nextRequest();
-
- if ( _pRequest )
- {
-
-#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain("Thread ") + Chain(_idx) + Chain(" : Serving service request"));
-#endif
-
- _pPool->setState(_idx, CegoDbThreadPool::CONNECTED);
- _pPool->incNumRequest(_idx);
-
- _pDBMng->increaseActiveDbThread();
-
- CegoDistDbHandler *pSH = 0;
- try {
-
- pSH = new CegoDistDbHandler(_pRequest, _protType, _pDBMng);
- serveSession(pSH);
- delete pSH;
- }
- catch ( Exception e)
- {
- if ( pSH )
- delete pSH;
-
- Chain msg;
- Chain module;
- int line;
-
- Chain exep;
- while ( e.pop(module, line, msg) )
- {
- exep += Chain("\n\t") + module + Chain("(") + Chain(line) + Chain(") : ") + msg;
- }
-
- _pDBMng->log(_modId, Logger::LOGERR, Chain("Thread ") + Chain(_idx) + Chain(" : DB session aborted : ") + exep);
-
- }
-
- // in any case, rollbak any open transactions
- _pTabMng->rollbackDistTransaction(_pPA->getTableSet());
-
- _pDBMng->decreaseActiveDbThread();
-
-#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain("Thread ") + Chain(_idx) + Chain(" : Service request finished"));
-#endif
-
- _pPool->setState(_idx, CegoDbThreadPool::READY);
-
- if ( _pTabMng->isAborted() )
- {
- _pDBMng->log(_modId, Logger::NOTICE, Chain("Thread ") + Chain(_idx) + Chain(" : Abort catched, proceed with session"));
- _pTabMng->proceed();
- }
-
- delete _pRequest;
- }
- else
- {
- Sleeper s;
- s.nanoSleep(NETMNG_QUEUE_DELAY);
-
- }
-
- checkReloadRequest();
-
- _pTim->stop();
- _pPool->addThreadIdle(_idx, _pTim->getSum());
-
- }
- catch ( Exception e)
- {
- Chain msg;
- e.pop(msg);
- _pDBMng->log(_modId, Logger::LOGERR, Chain("Thread ") + Chain(_idx) + Chain(" : ") + msg);
- }
- }
- }
- catch ( Exception e )
- {
- Chain msg;
- e.pop(msg);
- _pDBMng->log(_modId, Logger::LOGERR, Chain("Thread ") + Chain(_idx) + Chain(" : ") + msg);
- _errorCode = 1;
- }
- return 0;
-}
-
-void CegoDbThread::loadObjects(int tabSetId)
-{
-
- Chain tableSet = _pDBMng->getTabSetName(tabSetId);
-
- _pPA->setTableSet(tableSet);
-
- ListT<Chain> procList;
- _pTabMng->getObjectList(tabSetId, CegoObject::PROCEDURE, procList);
-
- Chain *pProcName = procList.First();
- while ( pProcName )
- {
-#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain("Thread ") + Chain(_idx) + Chain(" : Compiling procedure ") + *pProcName);
-#endif
-
- CegoProcObject po;
- _pTabMng->getObject(tabSetId, *pProcName, CegoObject::PROCEDURE, po);
-
- Chain loadString = Chain("load ") + po.getProcText();
-
-#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain("Thread ") + Chain(_idx) + Chain(" : Loading <<< ") + loadString + Chain(">>>"));
-#endif
-
- // cout << "Loading procedure " << loadString << endl;
-
- try
- {
- _pPA->cleanUp();
- _pPA->setCommandChain(loadString);
- _pPA->parse();
-
- CegoProcedure* pProc = _pPA->getProcedure();
- _pTabMng->addCompProcedure(tabSetId, pProc);
-
-#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain("Thread ") + Chain(_idx) + Chain(" : Procedure ") + *pProcName + Chain(" added"));
-#endif
-
-
- }
- catch ( Exception e )
- {
-
- Chain msg;
- e.pop(msg);
- _pDBMng->log(_modId, Logger::LOGERR, Chain("Thread ") + Chain(_idx) + Chain(" procedure load error : ") + msg);
- _pPA->cleanUp();
- }
-
-
- pProcName = procList.Next();
- }
-
- ListT<Chain> viewList;
- _pTabMng->getObjectList(tabSetId, CegoObject::VIEW, viewList);
-
- Chain *pViewName = viewList.First();
- while ( pViewName )
- {
-#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain("Thread ") + Chain(_idx) + Chain(" : Compiling view ") + *pViewName);
-#endif
- CegoViewObject vo;
- _pTabMng->getObject(tabSetId, *pViewName, CegoObject::VIEW, vo);
-
- Chain loadString = Chain("load ") + vo.getViewStmt();
-
-#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain("Thread ") + Chain(_idx) + Chain(" : Loading <<< ") + loadString + Chain(">>>"));
-#endif
-
-
- _pPA->cleanUp();
- _pPA->setCommandChain(loadString);
- _pPA->parse();
-
- CegoSelect* pSelect = _pPA->getSelect();
-
- CegoView *pView = new CegoView(*pViewName, pSelect);
-
- _pTabMng->addCompView(tabSetId, pView);
-
-#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain("Thread ") + Chain(_idx) + Chain(" : View ") + *pViewName + Chain(" added"));
-#endif
- pViewName = viewList.Next();
- }
-
-}
-
-void CegoDbThread::unloadObjects(int tabSetId)
-{
- try
- {
- _pTabMng->getTransactionManager()->release(tabSetId);
- _pTabMng->removeAllComp(tabSetId);
- }
- catch ( Exception e )
- {
- throw e;
- }
-}
-
-void CegoDbThread::invalidateObject(int tabSetId, const Chain& objName, CegoObject::ObjectType type)
-{
-
- if ( type == CegoObject::VIEW )
- {
- _pTabMng->removeCompView(tabSetId, objName);
- }
- else if ( type == CegoObject::PROCEDURE )
- {
- _pTabMng->removeCompProcedure(tabSetId, objName);
- }
- else
- {
- throw Exception(EXLOC, "Unknown object type for invalidation");
- }
-}
-
-void CegoDbThread::serveSession(CegoDistDbHandler *pSH)
-{
-
-#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain("Thread ") + Chain(_idx) + Chain(" : Serving session"));
-#endif
-
- if ( pSH->acceptSession() )
- {
- bool isTraceOn;
- Chain msg;
- if ( _pDBMng->checkUser(pSH->getUser(), pSH->getPassword(), msg, isTraceOn) == false )
- {
- pSH->sendError(msg);
- return;
- }
- else
- {
-
- if ( _pDBMng->tableSetExists(pSH->getTableSet()) == false )
- {
- Chain msg = Chain("Unknown tableset ") + pSH->getTableSet();
- pSH->sendError(msg);
- return;
- }
-
- _pTabMng->setActiveUser(pSH->getTableSet(), pSH->getUser(), pSH->getPassword());
-
- msg = Chain("Access granted");
- pSH->sendSessionConfirm(msg, _idx, XML_DBPRODNAME_VALUE, XML_DBPRODVERSION_VALUE);
-
-#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain("Thread ") + Chain(_idx) + Chain(" : Accepted session for tableset ") + pSH->getTableSet());
-#endif
-
- }
-
-
- _pPA->setTableSet(pSH->getTableSet());
-
- bool isTerminated = false;
-
- while ( isTerminated == false && _pPool->isTerminated() == false )
- {
-
- CegoDbHandler::RequestType reqType;
- reqType = pSH->acceptRequest();
-
- _pTim->stop();
- _pPool->addThreadIdle(_idx, _pTim->getSum());
- _pTim->reset();
- _pTim->start();
-
- if ( reqType != CegoDbHandler::REQTIMEOUT )
- {
- Chain runState = _pDBMng->getTableSetRunState(pSH->getTableSet());
- if ( runState != Chain(XML_ONLINE_VALUE) && runState != Chain(XML_BACKUP_VALUE) )
- {
- Chain msg = Chain("Tableset " + pSH->getTableSet() + " not online ( run state is " + runState + ")");
- pSH->sendError(msg);
- }
- else
- {
-
- if ( isTraceOn )
- {
- _pDBMng->incUserQuery(pSH->getUser());
- }
-
- _pPool->incNumQueryRequest(_idx);
-
- _pPool->setState(_idx, CegoDbThreadPool::BUSY);
-
-
- _pTim->stop();
- _pPool->addThreadIdle(_idx, _pTim->getSum());
-
- isTerminated = serveRequest(pSH, reqType);
-
- _pTim->reset();
- _pTim->start();
-
- _pPool->setState(_idx, CegoDbThreadPool::CONNECTED);
- }
- }
- else
- {
-
-
-#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain("Thread ") + Chain(_idx) + Chain(" : Client request timeout occured, waiting ..."));
-#endif
- }
-
- checkReloadRequest();
-
-
- }
- }
-}
-
-bool CegoDbThread::serveRequest(CegoDistDbHandler *pSH, CegoDbHandler::RequestType reqType)
-{
- bool isTerminated=false;
-
- // at the beginning of the request, in any case we reset abort status
- _pTabMng->proceed();
-
- try {
-
- switch ( reqType )
- {
-
- case CegoDbHandler::DBPRODINFO:
- {
- pSH->sendProdInfo();
- break;
- }
- case CegoDbHandler::QUERYABORT:
- {
- long idx;
-
- idx = pSH->getTid();
- _pPool->abortThread(idx);
- pSH->sendResponse(Chain("Query aborted"));
- break;
- }
- case CegoDbHandler::QUERY:
- {
-
- _lastAction = pSH->getQueryArg();
-
-#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain("Thread ") + Chain(_idx) + Chain(" : Query Arg = <<<") + _lastAction + Chain(">>>"));
-#endif
-
- _pPA->cleanUp();
- _pPA->setCommandChain( _lastAction );
- _pPA->setDbHandle(pSH);
-
- _pPA->parse();
-
-#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain("Thread ") + Chain(_idx) + Chain(" : Query request done"));
-#endif
-
- break;
- }
- case CegoDbHandler::INSERT:
- {
- Chain tableSet;
- Chain tableName;
- ListT<CegoField> fl;
-
- pSH->getInsertArg(tableSet, tableName,fl);
-
- int tabSetId = _pDBMng->getTabSetId(tableSet);
-
- CegoTableObject oe;
- _pTabMng->getObject(tabSetId, tableName, CegoObject::TABLE, oe);
- _pTabMng->insertLocalDataTable(oe, fl);
-
- pSH->sendResponse(Chain("insert ok"));
-
- break;
- }
- case CegoDbHandler::DELETETABLE:
- {
-
- Chain tableSet;
- Chain tableName;
- CegoPredDesc *pPred = 0;
-
- pSH->getDeleteArg(tableSet, tableName, pPred, _pTabMng);
-
- int tabSetId = _pDBMng->getTabSetId(tableSet);
-
- CegoTableObject oe;
- _pTabMng->getObject(tabSetId, tableName, CegoObject::TABLE, oe);
-
- long delCount = _pTabMng->deleteLocalDataTable(oe, pPred);
-
- pSH->sendResponse(Chain("delete ok"), delCount);
-
- break;
- }
- case CegoDbHandler::UPDATE:
- {
-
- Chain tableSet;
- Chain tableName;
- CegoPredDesc *pPred = 0;
- ListT<CegoField> updSchema;
- ListT<CegoExpr*> exprList;
-
- pSH->getUpdateArg(tableSet, tableName, updSchema, exprList, pPred, _pTabMng);
-
- int tabSetId = _pDBMng->getTabSetId(tableSet);
-
- CegoTableObject oe;
- _pTabMng->getObject(tabSetId, tableName, CegoObject::TABLE, oe);
-
- long updCount = _pTabMng->updateLocalDataTable(oe, pPred, updSchema, exprList);
-
- pSH->sendResponse(Chain("update ok"), updCount);
-
- break;
- }
- case CegoDbHandler::CREATETABLE:
- {
- Chain tableSet;
- Chain tableName;
- ListT<CegoField> fl;
- ListT<CegoField> idxList;
-
- pSH->getCreateTableArg(tableSet, tableName, fl, idxList);
- int tabSetId = _pDBMng->getTabSetId(tableSet);
- _pTabMng->createLocalDataTable(tabSetId, tableName, CegoObject::TABLE, fl, idxList);
-
- _pDBMng->addObject(tabSetId, tableName, CegoObject::TABLE);
- if ( ! idxList.isEmpty() )
- {
- Chain idxName = tableName + Chain(TABMNG_PIDX_SUFFIX);
- _pDBMng->addObject(tabSetId, idxName, CegoObject::INDEX);
- }
-
- pSH->sendResponse(Chain("create ok"));
- break;
- }
- case CegoDbHandler::CREATEVIEW:
- {
- Chain tableSet;
- Chain viewName;
- Chain viewText;
- ListT<CegoField> fl;
-
- pSH->getCreateViewArg(tableSet, viewName, fl, viewText);
- int tabSetId = _pDBMng->getTabSetId(tableSet);
- _pTabMng->createLocalView(tabSetId, viewName, fl, viewText);
-
- _pDBMng->addObject(tabSetId, viewName, CegoObject::VIEW);
-
- pSH->sendResponse(Chain("create view ok"));
- break;
- }
- case CegoDbHandler::CREATEPROCEDURE:
- {
- Chain tableSet;
- Chain procName;
- Chain procText;
-
- pSH->getCreateProcedureArg(tableSet, procName, procText);
- int tabSetId = _pDBMng->getTabSetId(tableSet);
- _pTabMng->createLocalProc(tabSetId, procName, procText);
-
- _pDBMng->addObject(tabSetId, procName, CegoObject::PROCEDURE);
-
- pSH->sendResponse(Chain("create procedure ok"));
- break;
- }
- case CegoDbHandler::CREATECHECK:
- {
- Chain tableSet;
- Chain checkName;
- Chain tableName;
- CegoPredDesc *pPred;
-
- pSH->getCreateCheckArg(tableSet, checkName, tableName, pPred, _pTabMng);
-
- int tabSetId = _pDBMng->getTabSetId(tableSet);
- _pTabMng->createLocalCheck(tabSetId, checkName, tableName, pPred);
-
- _pDBMng->addObject(tabSetId, checkName, CegoObject::CHECK);
-
- pSH->sendResponse(Chain("create check ok"));
- break;
- }
-
- case CegoDbHandler::ALTERTABLE:
- {
- Chain tableSet;
- Chain tableName;
- ListT<CegoAlterDesc> alterList;
-
- pSH->getAlterTableArg(tableSet, tableName, alterList);
- int tabSetId = _pDBMng->getTabSetId(tableSet);
- _pTabMng->alterDataTable(tabSetId, tableName, CegoObject::TABLE, alterList);
- pSH->sendResponse(Chain("alter ok"));
- break;
- }
- case CegoDbHandler::DROPOBJECT:
- {
- Chain tableSet;
- CegoObject::ObjectType objType;
- Chain objName;
-
- pSH->getDropTableArg(tableSet, objName, objType);
- int tabSetId = _pDBMng->getTabSetId(tableSet);
- _pTabMng->dropLocalObject(tabSetId, objName, objType);
- pSH->sendResponse(Chain("Drop ok"));
- break;
- }
- case CegoDbHandler::CREATEINDEX:
- {
- Chain tableSet;
- Chain indexName;
- Chain tableName;
- ListT<CegoField> idxList;
- CegoObject::ObjectType type;
- pSH->getCreateIndexArg(tableSet, indexName, tableName, idxList, type);
- int tabSetId = _pDBMng->getTabSetId(tableSet);
- _pTabMng->createLocalIndexTable(tabSetId, indexName, tableName, type, idxList);
-
- _pDBMng->addObject(tabSetId, indexName, type);
-
- pSH->sendResponse(Chain("create ok"));
- break;
- }
- case CegoDbHandler::OBJECTINFO:
- {
- int tabSetId;
- Chain objName;
- CegoObject::ObjectType objType;
-
- pSH->getObjectInfoArg(tabSetId, objName, objType);
-
- switch ( objType )
- {
- case CegoObject::SYSTEM:
- case CegoObject::TABLE:
- case CegoObject::PINDEX:
- case CegoObject::UINDEX:
- case CegoObject::INDEX:
- {
- CegoTableObject to;
- _pTabMng->getLocalObject(tabSetId, objName, objType, to);
- pSH->sendObjInfo(to);
- break;
- }
- case CegoObject::VIEW:
- {
- CegoViewObject vo;
- _pTabMng->getLocalObject(tabSetId, objName, objType, vo);
- pSH->sendObjInfo(vo);
- break;
- }
- case CegoObject::PROCEDURE:
- {
- CegoProcObject po;
- _pTabMng->getLocalObject(tabSetId, objName, objType, po);
- pSH->sendObjInfo(po);
- break;
- }
- case CegoObject::FKEY:
- {
- CegoKeyObject ko;
- _pTabMng->getLocalObject(tabSetId, objName, objType, ko);
- pSH->sendObjInfo(ko);
- break;
- }
- case CegoObject::CHECK:
- {
- CegoCheckObject co;
- _pTabMng->getLocalObject(tabSetId, objName, objType, co);
- pSH->sendObjInfo(co);
- break;
- }
- case CegoObject::JOIN:
- case CegoObject::RBSEG:
- case CegoObject::UNDEFINED:
- {
- throw Exception(EXLOC, "Objectinfo not supported for this object type");
- break;
- }
- }
- break;
- }
- case CegoDbHandler::GETTABLE:
- {
- int tabSetId;
- Chain tableName;
- CegoObject::ObjectType type;
-
- pSH->getGetTableArg(tabSetId, tableName, type);
-
- CegoTableObject oe;
- _pTabMng->getLocalObject(tabSetId, tableName, type, oe);
-
- ListT<CegoField> schema = oe.getSchema();
-
- pSH->collectSchema(schema);
-
- CegoObjectCursor *pOC = _pTabMng->getObjectCursor(tabSetId, tableName, tableName, type);
-
- int tupleCount=0;
-
- CegoDataPointer dp;
- bool moreTuple = _pTabMng->getFirstTuple(pOC, schema, dp);
-
- while ( moreTuple )
- {
- pSH->collectData(schema);
- tupleCount++;
-
- if ( tupleCount == NETMNG_MAXTUPLECOUNT )
- {
- pSH->sendCollectedData();
- tupleCount=0;
- }
- moreTuple = _pTabMng->getNextTuple(pOC, schema, dp);
- }
-
- if ( tupleCount > 0)
- {
- pSH->sendCollectedData();
- }
-
- pSH->sendFinishData();
-
- break;
- }
- case CegoDbHandler::GETOBJLIST:
- {
- int tabSetId;
- CegoObject::ObjectType type;
-
- pSH->getGetObjectListArg(tabSetId, type);
-
- ListT<Chain> objList;
- _pTabMng->getObjectList(tabSetId, type, objList);
-
- pSH->sendObjList(objList);
-
- break;
-
- }
- case CegoDbHandler::GETOBJLISTBYTABLE:
- {
- Chain tableSet;
- Chain tableName;
-
- pSH->getGetObjectByTableListArg(tableSet, tableName);
-
- int tabSetId = _pDBMng->getTabSetId(tableSet);
-
-
- ListT<CegoTableObject> idxList;
- ListT<CegoKeyObject> keyList;
- ListT<CegoCheckObject> checkList;
-
- _pTabMng->getObjectListByTable(tabSetId, tableName, idxList, keyList, checkList);
-
- pSH->sendObjByTableList(idxList, keyList, checkList);
-
- break;
-
- }
- case CegoDbHandler::OBJRENAME:
- {
- Chain tableSet;
- CegoObject::ObjectType type;
- Chain objName;
- Chain newObjName;
-
- pSH->getRenameArg(tableSet, objName, type, newObjName);
-
- int tabSetId = _pDBMng->getTabSetId(tableSet);
-
- _pTabMng->renameObject(tabSetId, objName, type, newObjName);
-
- pSH->sendResponse(Chain("rename ok"));
-
- break;
-
- }
- case CegoDbHandler::REORGOBJ:
- {
- Chain tableSet;
- CegoObject::ObjectType type;
- Chain objName;
- Chain newObjName;
-
- pSH->getReorgArg(tableSet, objName, type);
-
- int tabSetId = _pDBMng->getTabSetId(tableSet);
-
- _pTabMng->reorgObject(tabSetId, objName, type);
-
- pSH->sendResponse(Chain("reorg ok"));
-
- break;
-
- }
-
- case CegoDbHandler::SYNC:
- {
- Chain tableSet;
- Chain escCmd;
- int timeout;
-
- pSH->getSyncArg(tableSet, escCmd, timeout);
-
- int tabSetId = _pDBMng->getTabSetId(tableSet);
-
- _pTabMng->writeCheckPoint(tabSetId, true, true, escCmd, timeout);
-
- pSH->sendResponse(Chain("sync ok"));
-
- break;
-
- }
- case CegoDbHandler::GETPAGECOUNT:
- {
- Chain tableSet;
- Chain objName;
- CegoObject::ObjectType type;
-
- pSH->getPageCountArg(tableSet, objName, type);
-
- int tabSetId = _pDBMng->getTabSetId(tableSet);
-
- int pageCount = 0;
- _pTabMng->getPageCount(tabSetId, objName, type);
-
- pSH->sendPageCount(pageCount);
-
- break;
-
- }
- case CegoDbHandler::PUTBLOB:
- {
-
- _lastAction = Chain("put blob");
-
- Chain tableSet;
- long blobSize;
-
- pSH->getPutBlobArg(tableSet, blobSize);
-
- int tabSetId = _pDBMng->getTabSetId(tableSet);
-
- NetHandler *pN = pSH->getNetHandler();
-
- int fileId = 0;
- int pageId = 0;
-
- CegoBufferPage bp;
-
- try
- {
-
- _pTabMng->getNewFilePage(bp, tabSetId, CegoObject::TABLE);
- bp.initPage(CegoBufferPage::BLOB);
-
- fileId = bp.getFileId();
- pageId = bp.getPageId();
-
-
-#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain(" Thread ") + Chain(_idx) + Chain(" : Sending blob info [") + Chain(fileId) + Chain(",") + Chain(pageId) + Chain("]"));
-#endif
- pSH->sendBlobInfo(fileId, pageId);
-
- int freeInPage = bp.getChunkLen();
- char* pagePtr = bp.getBlobEntry();
-
- memcpy(pagePtr, &blobSize, sizeof(long));
- pagePtr += sizeof(long);
- freeInPage -= sizeof(long);
-
- char *bufPtr = 0;
- int availFromBuf = 0;
-
- long recvSize = 0;
- while ( recvSize < blobSize )
- {
- if ( availFromBuf == 0 )
- {
- if ( pN->waitMsg(NETMNG_WAITMSG_TIMEOUT) == false )
- throw Exception(EXLOC, "Timeout exceeded for blob chunk");
- pN->readMsg();
- pN->sendAck();
- bufPtr = pN->getMsg();
- availFromBuf = pN->getMsgSize();
- }
-
- if ( freeInPage == 0 )
- {
- CegoBufferPage nextPage;
- _pTabMng->getNewFilePage(nextPage, tabSetId, CegoObject::TABLE);
- nextPage.initPage(CegoBufferPage::BLOB);
-
- bp.setNextFileId(nextPage.getFileId());
- bp.setNextPageId(nextPage.getPageId());
-
- _pDBMng->bufferUnfix(bp, true, _pTabMng->getLockHandler());
-
- bp = nextPage;
-
- freeInPage = bp.getChunkLen();
- pagePtr = bp.getBlobEntry();
- }
-
- if ( freeInPage >= availFromBuf )
- {
- memcpy(pagePtr, bufPtr, availFromBuf);
- recvSize += availFromBuf;
- pagePtr += availFromBuf;
- freeInPage -= availFromBuf;
- availFromBuf = 0;
- }
- else if ( freeInPage < availFromBuf )
- {
- memcpy(pagePtr, bufPtr, freeInPage);
- recvSize += freeInPage;
- bufPtr += freeInPage;
- availFromBuf -= freeInPage;
- freeInPage = 0;
- }
- }
- _pDBMng->bufferUnfix(bp, true, _pTabMng->getLockHandler());
- }
- catch ( Exception e )
- {
- if ( bp.isFixed() )
- _pDBMng->bufferUnfix(bp, true, _pTabMng->getLockHandler());
- if ( fileId || pageId )
- {
- _pTabMng->releaseBlob(tabSetId, fileId, pageId);
- }
- }
-
-#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain(" Thread ") + Chain(_idx) + Chain(" : Blob transfer finished"));
-#endif
-
- break;
-
- }
- case CegoDbHandler::GETBLOB:
- {
-
- _lastAction = Chain("get blob");
-
- Chain tableSet;
- int fileId;
- int pageId;
-
- pSH->getGetBlobArg(tableSet, fileId, pageId);
-
- int tabSetId = _pDBMng->getTabSetId(tableSet);
-
- NetHandler *pN = pSH->getNetHandler();
-
- bool isFixed = false;
- CegoBufferPage bp;
- try
- {
-
- _pDBMng->bufferFix(bp, tabSetId, fileId, pageId, CegoBufferPool::SYNC,
- _pTabMng->getLockHandler());
-
-
- long blobSize;
- memcpy (&blobSize, bp.getBlobEntry(), sizeof(long));
-
- pSH->sendBlobSize(blobSize);
-
- long sentByte = 0;
-
- while ( bp.isFixed() )
- {
- pN->recvAck();
-
- int chunkSize;
- if ( bp.getChunkLen() < blobSize - sentByte )
- {
- chunkSize = bp.getChunkLen();
- if ( sentByte == 0 )
- chunkSize -= sizeof(long);
- }
- else
- {
- chunkSize = blobSize - sentByte;
- }
-
- if ( sentByte == 0 )
- {
- pN->setMsg(bp.getBlobEntry() + sizeof(long), chunkSize );
- }
- else
- {
- pN->setMsg(bp.getBlobEntry(), chunkSize);
- }
- sentByte += chunkSize;
-
- pN->writeMsg();
-
- fileId = bp.getNextFileId();
- pageId = bp.getNextPageId();
-
- _pDBMng->bufferUnfix(bp, false, _pTabMng->getLockHandler());
-
- if ( fileId || pageId )
- {
- _pDBMng->bufferFix(bp, tabSetId, fileId, pageId, CegoBufferPool::SYNC,
- _pTabMng->getLockHandler());
- }
- }
- }
- catch ( Exception e )
- {
- if ( bp.isFixed() )
- _pDBMng->bufferUnfix(bp, true, _pTabMng->getLockHandler());
- }
-
- break;
-
- }
- case CegoDbHandler::DELBLOB:
- {
-
- _lastAction = Chain("del blob");
-
- Chain tableSet;
- int fileId;
- int pageId;
-
- pSH->getGetBlobArg(tableSet, fileId, pageId);
-
- int tabSetId = _pDBMng->getTabSetId(tableSet);
-
- _pTabMng->releaseBlob(tabSetId, fileId, pageId);
-
- pSH->sendResponse(Chain("Blob deleted"));
-
- break;
-
- }
- case CegoDbHandler::STARTTRANSACTION:
- {
- _lastAction = Chain("start transaction");
-
- Chain tableSet;
- pSH->getArgValue(XML_TABLESET_ATTR, tableSet);
- int tabSetId = _pDBMng->getTabSetId(tableSet);
- _pTabMng->beginTransaction(tabSetId);
- pSH->sendResponse(Chain("Transaction started"));
- break;
- }
- case CegoDbHandler::COMMITTRANSACTION:
- {
- _lastAction = Chain("commit transaction");
- Chain tableSet;
- pSH->getArgValue(XML_TABLESET_ATTR, tableSet);
- int tabSetId = _pDBMng->getTabSetId(tableSet);
- _pTabMng->commitTransaction(tabSetId);
- pSH->sendResponse(Chain("Transaction committed"));
- break;
- }
- case CegoDbHandler::ROLLBACKTRANSACTION:
- {
- _lastAction = Chain("rollback transaction");
- Chain tableSet;
- pSH->getArgValue(XML_TABLESET_ATTR, tableSet);
- int tabSetId = _pDBMng->getTabSetId(tableSet);
- _pTabMng->rollbackTransaction(tabSetId);
- pSH->sendResponse(Chain("Transaction rollbacked"));
- break;
- }
- case CegoDbHandler::GETTID:
- {
- _lastAction = Chain("get tid");
- Chain tableSet;
- pSH->getArgValue(XML_TABLESET_ATTR, tableSet);
- int tabSetId = _pDBMng->getTabSetId(tableSet);
- pSH->sendTID(_pTabMng->getTID(tabSetId));
- break;
- }
- case CegoDbHandler::SESSION_CLOSE:
- {
- isTerminated=true;
- pSH->sendResponse(Chain("Session Closed"));
- break;
- }
- case CegoDbHandler::REQTIMEOUT:
- case CegoDbHandler::UNKNOWN:
- {
- break;
- }
- }
- }
- catch ( Exception e)
- {
-
- Chain msg;
- Chain module;
- int line;
-
- Chain exep;
- while ( e.pop(module, line, msg) )
- {
- exep += Chain("\n\t") + module + Chain("(") + Chain(line) + Chain(") : ") + msg;
- }
-
- _pDBMng->log(_modId, Logger::LOGERR, Chain("Thread ") + Chain(_idx) + Chain(" : DB request failed : ") + exep);
-
- if ( _pTabMng->isAborted() )
- {
- _pDBMng->log(_modId, Logger::NOTICE, Chain("Thread ") + Chain(_idx) + Chain(" : Abort catched, proceed with session"));
- _pTabMng->proceed();
- }
-
- pSH->sendError(e.getBaseMsg());
- }
-
- return isTerminated;
-}
-
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/README
^
|
@@ -4,7 +4,7 @@
----
A relational and transactional database system
- Version 2.15.5
+ Version 2.15.6
(C)opyright 2006,2007,2008,2009,2010,2011,2012,2013 by Bjoern Lemke
@@ -14,7 +14,7 @@
-----------
To build Cego, you need the following library packages available from www.lemke-it.com:
- lfc-1.3.4.tar.gz
+ lfc-1.3.7.tar.gz
lfcxml-1.0.27.tar.gz
Furthermore, you need the GNU readline library available via http://tiswww.case.edu/php/chet/readline/rltop.html
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/samples/chkdb/chkup
^
|
@@ -1,5 +1,8 @@
#!/bin/sh
+CGEXESHELL=/bin/bash
+export CGEXESHELL
+
if [ $# -eq 0 ]
then
../../src/cego --mode=daemon --forceload --numdbthread=30 --dbxml=./db/chkdb.xml --poolsize=3000 --protocol=serial
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/samples/chkdb/pid
^
|
@@ -1 +1 @@
-75487
\ No newline at end of file
+13816
\ No newline at end of file
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/#CegoDistManager.cc#
^
|
@@ -1,3 +1,4 @@
+
///////////////////////////////////////////////////////////////////////////////
//
// CegoDistManager.cc
@@ -275,7 +276,7 @@
long lsn;
int ts = 0;
- CegoRecoveryManager recoveryMng(this);
+ CegoRecoveryManager recoveryMng(this, CegoRecoveryManager::LOCAL);
recoveryMng.recoverCurrentTransactionLog(tabSetId, 0, lsn, ts);
if ( lsn != maxlsn )
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoAdm.cc
^
|
@@ -2036,79 +2036,59 @@
}
void CegoAdm::loadParser0()
{
- _actionMap[355][SEMICOLON] = ActionEntry(REDUCE, 84);
- _actionMap[350][SEMICOLON] = ActionEntry(REDUCE, 39);
- _actionMap[351][SEMICOLON] = ActionEntry(REDUCE, 81);
- _actionMap[352][NOLOGGING] = ActionEntry(SHIFT, 344);
- _actionMap[352][SEMICOLON] = ActionEntry(REDUCE, 94);
- _jumpMap[352][LogOpt] = 355;
- _actionMap[353][SEMICOLON] = ActionEntry(REDUCE, 86);
- _actionMap[354][SEMICOLON] = ActionEntry(REDUCE, 53);
- _actionMap[328][SEMICOLON] = ActionEntry(REDUCE, 64);
- _actionMap[329][IDENTIFIER] = ActionEntry(SHIFT, 350);
- _actionMap[330][SEMICOLON] = ActionEntry(REDUCE, 115);
- _actionMap[330][PRIMARY] = ActionEntry(REDUCE, 115);
- _actionMap[330][SECONDARY] = ActionEntry(REDUCE, 115);
- _actionMap[330][SYSSIZE] = ActionEntry(REDUCE, 115);
- _actionMap[330][TMPSIZE] = ActionEntry(REDUCE, 115);
- _actionMap[330][LOGSIZE] = ActionEntry(REDUCE, 115);
- _actionMap[330][LOGNUM] = ActionEntry(REDUCE, 115);
- _actionMap[330][SORTAREASIZE] = ActionEntry(REDUCE, 115);
- _actionMap[330][TSROOT] = ActionEntry(REDUCE, 115);
- _actionMap[330][TSTICKET] = ActionEntry(REDUCE, 115);
- _actionMap[331][SEMICOLON] = ActionEntry(REDUCE, 112);
- _actionMap[331][PRIMARY] = ActionEntry(REDUCE, 112);
- _actionMap[331][SECONDARY] = ActionEntry(REDUCE, 112);
- _actionMap[331][SYSSIZE] = ActionEntry(REDUCE, 112);
- _actionMap[331][TMPSIZE] = ActionEntry(REDUCE, 112);
- _actionMap[331][LOGSIZE] = ActionEntry(REDUCE, 112);
- _actionMap[331][LOGNUM] = ActionEntry(REDUCE, 112);
- _actionMap[331][SORTAREASIZE] = ActionEntry(REDUCE, 112);
- _actionMap[331][TSROOT] = ActionEntry(REDUCE, 112);
- _actionMap[331][TSTICKET] = ActionEntry(REDUCE, 112);
- _actionMap[332][SEMICOLON] = ActionEntry(REDUCE, 111);
- _actionMap[332][PRIMARY] = ActionEntry(REDUCE, 111);
- _actionMap[332][SECONDARY] = ActionEntry(REDUCE, 111);
- _actionMap[332][SYSSIZE] = ActionEntry(REDUCE, 111);
- _actionMap[332][TMPSIZE] = ActionEntry(REDUCE, 111);
- _actionMap[332][LOGSIZE] = ActionEntry(REDUCE, 111);
- _actionMap[332][LOGNUM] = ActionEntry(REDUCE, 111);
- _actionMap[332][SORTAREASIZE] = ActionEntry(REDUCE, 111);
- _actionMap[332][TSROOT] = ActionEntry(REDUCE, 111);
- _actionMap[332][TSTICKET] = ActionEntry(REDUCE, 111);
- _actionMap[333][SEMICOLON] = ActionEntry(REDUCE, 107);
- _actionMap[333][PRIMARY] = ActionEntry(REDUCE, 107);
- _actionMap[333][SECONDARY] = ActionEntry(REDUCE, 107);
- _actionMap[333][SYSSIZE] = ActionEntry(REDUCE, 107);
- _actionMap[333][TMPSIZE] = ActionEntry(REDUCE, 107);
- _actionMap[333][LOGSIZE] = ActionEntry(REDUCE, 107);
- _actionMap[333][LOGNUM] = ActionEntry(REDUCE, 107);
- _actionMap[333][SORTAREASIZE] = ActionEntry(REDUCE, 107);
- _actionMap[333][TSROOT] = ActionEntry(REDUCE, 107);
- _actionMap[333][TSTICKET] = ActionEntry(REDUCE, 107);
+ _actionMap[357][SEMICOLON] = ActionEntry(REDUCE, 85);
+ _actionMap[352][SEMICOLON] = ActionEntry(REDUCE, 40);
+ _actionMap[353][SEMICOLON] = ActionEntry(REDUCE, 82);
+ _actionMap[354][NOLOGGING] = ActionEntry(SHIFT, 346);
+ _actionMap[354][SEMICOLON] = ActionEntry(REDUCE, 95);
+ _jumpMap[354][LogOpt] = 357;
+ _actionMap[355][SEMICOLON] = ActionEntry(REDUCE, 87);
+ _actionMap[356][SEMICOLON] = ActionEntry(REDUCE, 54);
+ _actionMap[330][SEMICOLON] = ActionEntry(REDUCE, 65);
+ _actionMap[331][IDENTIFIER] = ActionEntry(SHIFT, 352);
+ _actionMap[332][SEMICOLON] = ActionEntry(REDUCE, 116);
+ _actionMap[332][PRIMARY] = ActionEntry(REDUCE, 116);
+ _actionMap[332][SECONDARY] = ActionEntry(REDUCE, 116);
+ _actionMap[332][SYSSIZE] = ActionEntry(REDUCE, 116);
+ _actionMap[332][TMPSIZE] = ActionEntry(REDUCE, 116);
+ _actionMap[332][LOGSIZE] = ActionEntry(REDUCE, 116);
+ _actionMap[332][LOGNUM] = ActionEntry(REDUCE, 116);
+ _actionMap[332][SORTAREASIZE] = ActionEntry(REDUCE, 116);
+ _actionMap[332][TSROOT] = ActionEntry(REDUCE, 116);
+ _actionMap[332][TSTICKET] = ActionEntry(REDUCE, 116);
+ _actionMap[333][SEMICOLON] = ActionEntry(REDUCE, 113);
+ _actionMap[333][PRIMARY] = ActionEntry(REDUCE, 113);
+ _actionMap[333][SECONDARY] = ActionEntry(REDUCE, 113);
+ _actionMap[333][SYSSIZE] = ActionEntry(REDUCE, 113);
+ _actionMap[333][TMPSIZE] = ActionEntry(REDUCE, 113);
+ _actionMap[333][LOGSIZE] = ActionEntry(REDUCE, 113);
+ _actionMap[333][LOGNUM] = ActionEntry(REDUCE, 113);
+ _actionMap[333][SORTAREASIZE] = ActionEntry(REDUCE, 113);
+ _actionMap[333][TSROOT] = ActionEntry(REDUCE, 113);
+ _actionMap[333][TSTICKET] = ActionEntry(REDUCE, 113);
+ _actionMap[334][SEMICOLON] = ActionEntry(REDUCE, 112);
+ _actionMap[334][PRIMARY] = ActionEntry(REDUCE, 112);
+ _actionMap[334][SECONDARY] = ActionEntry(REDUCE, 112);
+ _actionMap[334][SYSSIZE] = ActionEntry(REDUCE, 112);
+ _actionMap[334][TMPSIZE] = ActionEntry(REDUCE, 112);
+ _actionMap[334][LOGSIZE] = ActionEntry(REDUCE, 112);
+ _actionMap[334][LOGNUM] = ActionEntry(REDUCE, 112);
+ _actionMap[334][SORTAREASIZE] = ActionEntry(REDUCE, 112);
+ _actionMap[334][TSROOT] = ActionEntry(REDUCE, 112);
+ _actionMap[334][TSTICKET] = ActionEntry(REDUCE, 112);
+ _actionMap[335][SEMICOLON] = ActionEntry(REDUCE, 108);
+ _actionMap[335][PRIMARY] = ActionEntry(REDUCE, 108);
+ _actionMap[335][SECONDARY] = ActionEntry(REDUCE, 108);
+ _actionMap[335][SYSSIZE] = ActionEntry(REDUCE, 108);
+ _actionMap[335][TMPSIZE] = ActionEntry(REDUCE, 108);
+ _actionMap[335][LOGSIZE] = ActionEntry(REDUCE, 108);
+ _actionMap[335][LOGNUM] = ActionEntry(REDUCE, 108);
+ _actionMap[335][SORTAREASIZE] = ActionEntry(REDUCE, 108);
+ _actionMap[335][TSROOT] = ActionEntry(REDUCE, 108);
+ _actionMap[335][TSTICKET] = ActionEntry(REDUCE, 108);
}
void CegoAdm::loadParser1()
{
- _actionMap[334][SEMICOLON] = ActionEntry(REDUCE, 108);
- _actionMap[334][PRIMARY] = ActionEntry(REDUCE, 108);
- _actionMap[334][SECONDARY] = ActionEntry(REDUCE, 108);
- _actionMap[334][SYSSIZE] = ActionEntry(REDUCE, 108);
- _actionMap[334][TMPSIZE] = ActionEntry(REDUCE, 108);
- _actionMap[334][LOGSIZE] = ActionEntry(REDUCE, 108);
- _actionMap[334][LOGNUM] = ActionEntry(REDUCE, 108);
- _actionMap[334][SORTAREASIZE] = ActionEntry(REDUCE, 108);
- _actionMap[334][TSROOT] = ActionEntry(REDUCE, 108);
- _actionMap[334][TSTICKET] = ActionEntry(REDUCE, 108);
- _actionMap[335][SEMICOLON] = ActionEntry(REDUCE, 113);
- _actionMap[335][PRIMARY] = ActionEntry(REDUCE, 113);
- _actionMap[335][SECONDARY] = ActionEntry(REDUCE, 113);
- _actionMap[335][SYSSIZE] = ActionEntry(REDUCE, 113);
- _actionMap[335][TMPSIZE] = ActionEntry(REDUCE, 113);
- _actionMap[335][LOGSIZE] = ActionEntry(REDUCE, 113);
- _actionMap[335][LOGNUM] = ActionEntry(REDUCE, 113);
- _actionMap[335][SORTAREASIZE] = ActionEntry(REDUCE, 113);
- _actionMap[335][TSROOT] = ActionEntry(REDUCE, 113);
- _actionMap[335][TSTICKET] = ActionEntry(REDUCE, 113);
_actionMap[336][SEMICOLON] = ActionEntry(REDUCE, 109);
_actionMap[336][PRIMARY] = ActionEntry(REDUCE, 109);
_actionMap[336][SECONDARY] = ActionEntry(REDUCE, 109);
@@ -2119,102 +2099,120 @@
_actionMap[336][SORTAREASIZE] = ActionEntry(REDUCE, 109);
_actionMap[336][TSROOT] = ActionEntry(REDUCE, 109);
_actionMap[336][TSTICKET] = ActionEntry(REDUCE, 109);
- _actionMap[337][SEMICOLON] = ActionEntry(REDUCE, 110);
- _actionMap[337][PRIMARY] = ActionEntry(REDUCE, 110);
- _actionMap[337][SECONDARY] = ActionEntry(REDUCE, 110);
- _actionMap[337][SYSSIZE] = ActionEntry(REDUCE, 110);
- _actionMap[337][TMPSIZE] = ActionEntry(REDUCE, 110);
- _actionMap[337][LOGSIZE] = ActionEntry(REDUCE, 110);
- _actionMap[337][LOGNUM] = ActionEntry(REDUCE, 110);
- _actionMap[337][SORTAREASIZE] = ActionEntry(REDUCE, 110);
- _actionMap[337][TSROOT] = ActionEntry(REDUCE, 110);
- _actionMap[337][TSTICKET] = ActionEntry(REDUCE, 110);
- _actionMap[338][SEMICOLON] = ActionEntry(REDUCE, 114);
- _actionMap[338][PRIMARY] = ActionEntry(REDUCE, 114);
- _actionMap[338][SECONDARY] = ActionEntry(REDUCE, 114);
- _actionMap[338][SYSSIZE] = ActionEntry(REDUCE, 114);
- _actionMap[338][TMPSIZE] = ActionEntry(REDUCE, 114);
- _actionMap[338][LOGSIZE] = ActionEntry(REDUCE, 114);
- _actionMap[338][LOGNUM] = ActionEntry(REDUCE, 114);
- _actionMap[338][SORTAREASIZE] = ActionEntry(REDUCE, 114);
- _actionMap[338][TSROOT] = ActionEntry(REDUCE, 114);
- _actionMap[338][TSTICKET] = ActionEntry(REDUCE, 114);
+ _actionMap[337][SEMICOLON] = ActionEntry(REDUCE, 114);
+ _actionMap[337][PRIMARY] = ActionEntry(REDUCE, 114);
+ _actionMap[337][SECONDARY] = ActionEntry(REDUCE, 114);
+ _actionMap[337][SYSSIZE] = ActionEntry(REDUCE, 114);
+ _actionMap[337][TMPSIZE] = ActionEntry(REDUCE, 114);
+ _actionMap[337][LOGSIZE] = ActionEntry(REDUCE, 114);
+ _actionMap[337][LOGNUM] = ActionEntry(REDUCE, 114);
+ _actionMap[337][SORTAREASIZE] = ActionEntry(REDUCE, 114);
+ _actionMap[337][TSROOT] = ActionEntry(REDUCE, 114);
+ _actionMap[337][TSTICKET] = ActionEntry(REDUCE, 114);
+ _actionMap[338][SEMICOLON] = ActionEntry(REDUCE, 110);
+ _actionMap[338][PRIMARY] = ActionEntry(REDUCE, 110);
+ _actionMap[338][SECONDARY] = ActionEntry(REDUCE, 110);
+ _actionMap[338][SYSSIZE] = ActionEntry(REDUCE, 110);
+ _actionMap[338][TMPSIZE] = ActionEntry(REDUCE, 110);
+ _actionMap[338][LOGSIZE] = ActionEntry(REDUCE, 110);
+ _actionMap[338][LOGNUM] = ActionEntry(REDUCE, 110);
+ _actionMap[338][SORTAREASIZE] = ActionEntry(REDUCE, 110);
+ _actionMap[338][TSROOT] = ActionEntry(REDUCE, 110);
+ _actionMap[338][TSTICKET] = ActionEntry(REDUCE, 110);
+ _actionMap[339][SEMICOLON] = ActionEntry(REDUCE, 111);
+ _actionMap[339][PRIMARY] = ActionEntry(REDUCE, 111);
+ _actionMap[339][SECONDARY] = ActionEntry(REDUCE, 111);
+ _actionMap[339][SYSSIZE] = ActionEntry(REDUCE, 111);
+ _actionMap[339][TMPSIZE] = ActionEntry(REDUCE, 111);
+ _actionMap[339][LOGSIZE] = ActionEntry(REDUCE, 111);
+ _actionMap[339][LOGNUM] = ActionEntry(REDUCE, 111);
+ _actionMap[339][SORTAREASIZE] = ActionEntry(REDUCE, 111);
+ _actionMap[339][TSROOT] = ActionEntry(REDUCE, 111);
+ _actionMap[339][TSTICKET] = ActionEntry(REDUCE, 111);
+ _actionMap[340][SEMICOLON] = ActionEntry(REDUCE, 115);
+ _actionMap[340][PRIMARY] = ActionEntry(REDUCE, 115);
+ _actionMap[340][SECONDARY] = ActionEntry(REDUCE, 115);
+ _actionMap[340][SYSSIZE] = ActionEntry(REDUCE, 115);
+ _actionMap[340][TMPSIZE] = ActionEntry(REDUCE, 115);
+ _actionMap[340][LOGSIZE] = ActionEntry(REDUCE, 115);
+ _actionMap[340][LOGNUM] = ActionEntry(REDUCE, 115);
+ _actionMap[340][SORTAREASIZE] = ActionEntry(REDUCE, 115);
+ _actionMap[340][TSROOT] = ActionEntry(REDUCE, 115);
+ _actionMap[340][TSTICKET] = ActionEntry(REDUCE, 115);
}
void CegoAdm::loadParser2()
{
- _actionMap[339][STRINGVAL] = ActionEntry(SHIFT, 351);
- _actionMap[340][SEMICOLON] = ActionEntry(REDUCE, 83);
- _actionMap[341][STRINGVAL] = ActionEntry(SHIFT, 352);
- _actionMap[342][NOLOGGING] = ActionEntry(SHIFT, 344);
- _actionMap[342][SEMICOLON] = ActionEntry(REDUCE, 94);
- _jumpMap[342][LogOpt] = 353;
- _actionMap[343][SEMICOLON] = ActionEntry(REDUCE, 85);
- _actionMap[344][SEMICOLON] = ActionEntry(REDUCE, 93);
- _actionMap[345][IDENTIFIER] = ActionEntry(SHIFT, 354);
- _actionMap[346][KSEP] = ActionEntry(REDUCE, 54);
- _actionMap[346][TO] = ActionEntry(REDUCE, 54);
- _actionMap[347][KSEP] = ActionEntry(REDUCE, 57);
- _actionMap[347][TO] = ActionEntry(REDUCE, 57);
- _actionMap[348][KSEP] = ActionEntry(REDUCE, 58);
- _actionMap[348][TO] = ActionEntry(REDUCE, 58);
- _actionMap[349][KSEP] = ActionEntry(REDUCE, 56);
- _actionMap[349][TO] = ActionEntry(REDUCE, 56);
- _actionMap[299][IDENTIFIER] = ActionEntry(SHIFT, 328);
- _actionMap[300][SEMICOLON] = ActionEntry(REDUCE, 43);
- _actionMap[301][TO] = ActionEntry(SHIFT, 329);
- _actionMap[302][STRINGVAL] = ActionEntry(SHIFT, 330);
- _actionMap[303][INTVAL] = ActionEntry(SHIFT, 331);
- _actionMap[304][INTVAL] = ActionEntry(SHIFT, 332);
- _actionMap[305][STRINGVAL] = ActionEntry(SHIFT, 333);
- _actionMap[306][STRINGVAL] = ActionEntry(SHIFT, 334);
- _actionMap[307][INTVAL] = ActionEntry(SHIFT, 335);
- _actionMap[308][INTVAL] = ActionEntry(SHIFT, 336);
+ _actionMap[341][STRINGVAL] = ActionEntry(SHIFT, 353);
+ _actionMap[342][SEMICOLON] = ActionEntry(REDUCE, 84);
+ _actionMap[343][STRINGVAL] = ActionEntry(SHIFT, 354);
+ _actionMap[344][NOLOGGING] = ActionEntry(SHIFT, 346);
+ _actionMap[344][SEMICOLON] = ActionEntry(REDUCE, 95);
+ _jumpMap[344][LogOpt] = 355;
+ _actionMap[345][SEMICOLON] = ActionEntry(REDUCE, 86);
+ _actionMap[346][SEMICOLON] = ActionEntry(REDUCE, 94);
+ _actionMap[347][IDENTIFIER] = ActionEntry(SHIFT, 356);
+ _actionMap[348][KSEP] = ActionEntry(REDUCE, 55);
+ _actionMap[348][TO] = ActionEntry(REDUCE, 55);
+ _actionMap[349][KSEP] = ActionEntry(REDUCE, 58);
+ _actionMap[349][TO] = ActionEntry(REDUCE, 58);
+ _actionMap[350][KSEP] = ActionEntry(REDUCE, 59);
+ _actionMap[350][TO] = ActionEntry(REDUCE, 59);
+ _actionMap[351][KSEP] = ActionEntry(REDUCE, 57);
+ _actionMap[351][TO] = ActionEntry(REDUCE, 57);
+ _actionMap[301][IDENTIFIER] = ActionEntry(SHIFT, 330);
+ _actionMap[302][SEMICOLON] = ActionEntry(REDUCE, 44);
+ _actionMap[303][TO] = ActionEntry(SHIFT, 331);
+ _actionMap[304][STRINGVAL] = ActionEntry(SHIFT, 332);
+ _actionMap[305][INTVAL] = ActionEntry(SHIFT, 333);
+ _actionMap[306][INTVAL] = ActionEntry(SHIFT, 334);
+ _actionMap[307][STRINGVAL] = ActionEntry(SHIFT, 335);
+ _actionMap[308][STRINGVAL] = ActionEntry(SHIFT, 336);
_actionMap[309][INTVAL] = ActionEntry(SHIFT, 337);
- _actionMap[310][STRINGVAL] = ActionEntry(SHIFT, 338);
- _actionMap[311][SEMICOLON] = ActionEntry(REDUCE, 87);
- _actionMap[312][TO] = ActionEntry(SHIFT, 339);
- _actionMap[313][STRINGVAL] = ActionEntry(SHIFT, 340);
- _actionMap[314][SEMICOLON] = ActionEntry(REDUCE, 82);
- _actionMap[315][FROM] = ActionEntry(SHIFT, 341);
- _actionMap[316][STRINGVAL] = ActionEntry(SHIFT, 342);
- _actionMap[317][NOLOGGING] = ActionEntry(SHIFT, 344);
- _actionMap[317][SEMICOLON] = ActionEntry(REDUCE, 94);
- _jumpMap[317][LogOpt] = 343;
- _actionMap[318][SEMICOLON] = ActionEntry(REDUCE, 46);
- _actionMap[319][SEMICOLON] = ActionEntry(REDUCE, 36);
- _actionMap[320][SEMICOLON] = ActionEntry(REDUCE, 35);
- _actionMap[321][SEMICOLON] = ActionEntry(REDUCE, 59);
- _actionMap[322][ROLE] = ActionEntry(SHIFT, 345);
- _actionMap[323][TABLESET] = ActionEntry(SHIFT, 288);
- _actionMap[323][FILTER] = ActionEntry(SHIFT, 286);
- _actionMap[323][RIGHT] = ActionEntry(SHIFT, 287);
- _jumpMap[323][PermEntry] = 346;
- _actionMap[324][STRINGVAL] = ActionEntry(SHIFT, 347);
- _actionMap[325][IDENTIFIER] = ActionEntry(SHIFT, 348);
- _actionMap[326][IDENTIFIER] = ActionEntry(SHIFT, 349);
+ _actionMap[310][INTVAL] = ActionEntry(SHIFT, 338);
+ _actionMap[311][INTVAL] = ActionEntry(SHIFT, 339);
+ _actionMap[312][STRINGVAL] = ActionEntry(SHIFT, 340);
+ _actionMap[313][SEMICOLON] = ActionEntry(REDUCE, 88);
+ _actionMap[314][TO] = ActionEntry(SHIFT, 341);
+ _actionMap[315][STRINGVAL] = ActionEntry(SHIFT, 342);
+ _actionMap[316][SEMICOLON] = ActionEntry(REDUCE, 83);
+ _actionMap[317][FROM] = ActionEntry(SHIFT, 343);
+ _actionMap[318][STRINGVAL] = ActionEntry(SHIFT, 344);
+ _actionMap[319][NOLOGGING] = ActionEntry(SHIFT, 346);
+ _actionMap[319][SEMICOLON] = ActionEntry(REDUCE, 95);
+ _jumpMap[319][LogOpt] = 345;
+ _actionMap[320][SEMICOLON] = ActionEntry(REDUCE, 47);
+ _actionMap[321][SEMICOLON] = ActionEntry(REDUCE, 36);
+ _actionMap[322][SEMICOLON] = ActionEntry(REDUCE, 35);
+ _actionMap[323][SEMICOLON] = ActionEntry(REDUCE, 60);
+ _actionMap[324][ROLE] = ActionEntry(SHIFT, 347);
+ _actionMap[325][TABLESET] = ActionEntry(SHIFT, 290);
+ _actionMap[325][FILTER] = ActionEntry(SHIFT, 288);
+ _actionMap[325][RIGHT] = ActionEntry(SHIFT, 289);
+ _jumpMap[325][PermEntry] = 348;
+ _actionMap[326][STRINGVAL] = ActionEntry(SHIFT, 349);
+ _actionMap[327][IDENTIFIER] = ActionEntry(SHIFT, 350);
+ _actionMap[328][IDENTIFIER] = ActionEntry(SHIFT, 351);
}
void CegoAdm::loadParser3()
{
- _actionMap[327][MESSAGE] = ActionEntry(REDUCE, 89);
- _actionMap[327][KEEP] = ActionEntry(REDUCE, 89);
- _actionMap[327][SEMICOLON] = ActionEntry(REDUCE, 89);
- _actionMap[245][TO] = ActionEntry(SHIFT, 299);
- _actionMap[246][STRINGVAL] = ActionEntry(SHIFT, 300);
- _actionMap[247][INTVAL] = ActionEntry(SHIFT, 301);
- _actionMap[248][SEMICOLON] = ActionEntry(REDUCE, 47);
- _actionMap[249][SEMICOLON] = ActionEntry(REDUCE, 66);
- _actionMap[250][SEMICOLON] = ActionEntry(REDUCE, 105);
- _actionMap[250][PRIMARY] = ActionEntry(REDUCE, 105);
- _actionMap[250][SECONDARY] = ActionEntry(REDUCE, 105);
- _actionMap[250][SYSSIZE] = ActionEntry(REDUCE, 105);
- _actionMap[250][TMPSIZE] = ActionEntry(REDUCE, 105);
- _actionMap[250][LOGSIZE] = ActionEntry(REDUCE, 105);
- _actionMap[250][LOGNUM] = ActionEntry(REDUCE, 105);
- _actionMap[250][SORTAREASIZE] = ActionEntry(REDUCE, 105);
- _actionMap[250][TSROOT] = ActionEntry(REDUCE, 105);
- _actionMap[250][TSTICKET] = ActionEntry(REDUCE, 105);
- _actionMap[251][EQU] = ActionEntry(SHIFT, 302);
- _actionMap[252][EQU] = ActionEntry(SHIFT, 303);
+ _actionMap[329][MESSAGE] = ActionEntry(REDUCE, 90);
+ _actionMap[329][KEEP] = ActionEntry(REDUCE, 90);
+ _actionMap[329][SEMICOLON] = ActionEntry(REDUCE, 90);
+ _actionMap[247][TO] = ActionEntry(SHIFT, 301);
+ _actionMap[248][STRINGVAL] = ActionEntry(SHIFT, 302);
+ _actionMap[249][INTVAL] = ActionEntry(SHIFT, 303);
+ _actionMap[250][SEMICOLON] = ActionEntry(REDUCE, 48);
+ _actionMap[251][SEMICOLON] = ActionEntry(REDUCE, 67);
+ _actionMap[252][SEMICOLON] = ActionEntry(REDUCE, 106);
+ _actionMap[252][PRIMARY] = ActionEntry(REDUCE, 106);
+ _actionMap[252][SECONDARY] = ActionEntry(REDUCE, 106);
+ _actionMap[252][SYSSIZE] = ActionEntry(REDUCE, 106);
+ _actionMap[252][TMPSIZE] = ActionEntry(REDUCE, 106);
+ _actionMap[252][LOGSIZE] = ActionEntry(REDUCE, 106);
+ _actionMap[252][LOGNUM] = ActionEntry(REDUCE, 106);
+ _actionMap[252][SORTAREASIZE] = ActionEntry(REDUCE, 106);
+ _actionMap[252][TSROOT] = ActionEntry(REDUCE, 106);
+ _actionMap[252][TSTICKET] = ActionEntry(REDUCE, 106);
_actionMap[253][EQU] = ActionEntry(SHIFT, 304);
_actionMap[254][EQU] = ActionEntry(SHIFT, 305);
_actionMap[255][EQU] = ActionEntry(SHIFT, 306);
@@ -2222,350 +2220,354 @@
_actionMap[257][EQU] = ActionEntry(SHIFT, 308);
_actionMap[258][EQU] = ActionEntry(SHIFT, 309);
_actionMap[259][EQU] = ActionEntry(SHIFT, 310);
- _actionMap[260][SEMICOLON] = ActionEntry(REDUCE, 123);
- _actionMap[261][SEMICOLON] = ActionEntry(REDUCE, 122);
- _actionMap[262][SEMICOLON] = ActionEntry(REDUCE, 67);
- _actionMap[263][KEEP] = ActionEntry(SHIFT, 264);
- _actionMap[263][SEMICOLON] = ActionEntry(REDUCE, 88);
- _jumpMap[263][KeepTicketOpt] = 262;
- _actionMap[264][TSTICKET] = ActionEntry(SHIFT, 311);
- _actionMap[265][IDENTIFIER] = ActionEntry(SHIFT, 312);
- _actionMap[266][TO] = ActionEntry(SHIFT, 313);
- _actionMap[267][STRINGVAL] = ActionEntry(SHIFT, 314);
- _actionMap[268][IDENTIFIER] = ActionEntry(SHIFT, 315);
- _actionMap[269][FROM] = ActionEntry(SHIFT, 316);
- _actionMap[270][STRINGVAL] = ActionEntry(SHIFT, 317);
- _actionMap[271][STRINGVAL] = ActionEntry(SHIFT, 318);
+ _actionMap[260][EQU] = ActionEntry(SHIFT, 311);
+ _actionMap[261][EQU] = ActionEntry(SHIFT, 312);
+ _actionMap[262][SEMICOLON] = ActionEntry(REDUCE, 124);
+ _actionMap[263][SEMICOLON] = ActionEntry(REDUCE, 123);
+ _actionMap[264][SEMICOLON] = ActionEntry(REDUCE, 68);
+ _actionMap[265][KEEP] = ActionEntry(SHIFT, 266);
+ _actionMap[265][SEMICOLON] = ActionEntry(REDUCE, 89);
+ _jumpMap[265][KeepTicketOpt] = 264;
+ _actionMap[266][TSTICKET] = ActionEntry(SHIFT, 313);
+ _actionMap[267][IDENTIFIER] = ActionEntry(SHIFT, 314);
+ _actionMap[268][TO] = ActionEntry(SHIFT, 315);
+ _actionMap[269][STRINGVAL] = ActionEntry(SHIFT, 316);
+ _actionMap[270][IDENTIFIER] = ActionEntry(SHIFT, 317);
+ _actionMap[271][FROM] = ActionEntry(SHIFT, 318);
_actionMap[272][STRINGVAL] = ActionEntry(SHIFT, 319);
_actionMap[273][STRINGVAL] = ActionEntry(SHIFT, 320);
- _actionMap[274][SEMICOLON] = ActionEntry(REDUCE, 65);
- _actionMap[275][IDENTIFIER] = ActionEntry(SHIFT, 321);
- _actionMap[276][SEMICOLON] = ActionEntry(REDUCE, 48);
- _actionMap[277][SEMICOLON] = ActionEntry(REDUCE, 116);
- _actionMap[278][SEMICOLON] = ActionEntry(REDUCE, 77);
- _actionMap[279][SEMICOLON] = ActionEntry(REDUCE, 73);
- _actionMap[280][SEMICOLON] = ActionEntry(REDUCE, 72);
+ _actionMap[274][STRINGVAL] = ActionEntry(SHIFT, 321);
+ _actionMap[275][STRINGVAL] = ActionEntry(SHIFT, 322);
+ _actionMap[276][SEMICOLON] = ActionEntry(REDUCE, 66);
+ _actionMap[277][IDENTIFIER] = ActionEntry(SHIFT, 323);
+ _actionMap[278][SEMICOLON] = ActionEntry(REDUCE, 49);
+ _actionMap[279][SEMICOLON] = ActionEntry(REDUCE, 117);
+ _actionMap[280][SEMICOLON] = ActionEntry(REDUCE, 78);
+ _actionMap[281][SEMICOLON] = ActionEntry(REDUCE, 74);
+ _actionMap[282][SEMICOLON] = ActionEntry(REDUCE, 73);
}
void CegoAdm::loadParser4()
{
- _actionMap[281][MESSAGE] = ActionEntry(REDUCE, 91);
- _actionMap[281][KEEP] = ActionEntry(REDUCE, 91);
- _actionMap[281][SEMICOLON] = ActionEntry(REDUCE, 91);
- _actionMap[282][SEMICOLON] = ActionEntry(REDUCE, 78);
- _actionMap[283][SEMICOLON] = ActionEntry(REDUCE, 79);
- _actionMap[284][TO] = ActionEntry(SHIFT, 322);
- _actionMap[284][KSEP] = ActionEntry(SHIFT, 323);
- _actionMap[285][KSEP] = ActionEntry(REDUCE, 55);
- _actionMap[285][TO] = ActionEntry(REDUCE, 55);
- _actionMap[286][EQU] = ActionEntry(SHIFT, 324);
- _actionMap[287][EQU] = ActionEntry(SHIFT, 325);
+ _actionMap[283][MESSAGE] = ActionEntry(REDUCE, 92);
+ _actionMap[283][KEEP] = ActionEntry(REDUCE, 92);
+ _actionMap[283][SEMICOLON] = ActionEntry(REDUCE, 92);
+ _actionMap[284][SEMICOLON] = ActionEntry(REDUCE, 79);
+ _actionMap[285][SEMICOLON] = ActionEntry(REDUCE, 80);
+ _actionMap[286][TO] = ActionEntry(SHIFT, 324);
+ _actionMap[286][KSEP] = ActionEntry(SHIFT, 325);
+ _actionMap[287][KSEP] = ActionEntry(REDUCE, 56);
+ _actionMap[287][TO] = ActionEntry(REDUCE, 56);
_actionMap[288][EQU] = ActionEntry(SHIFT, 326);
- _actionMap[289][SEMICOLON] = ActionEntry(REDUCE, 80);
- _actionMap[290][SEMICOLON] = ActionEntry(REDUCE, 74);
- _actionMap[291][SEMICOLON] = ActionEntry(REDUCE, 75);
- _actionMap[292][SEMICOLON] = ActionEntry(REDUCE, 76);
- _actionMap[293][SEMICOLON] = ActionEntry(REDUCE, 120);
- _actionMap[294][SEMICOLON] = ActionEntry(REDUCE, 97);
- _actionMap[294][CLEANUP] = ActionEntry(REDUCE, 97);
- _actionMap[294][FORCELOAD] = ActionEntry(REDUCE, 97);
- _actionMap[295][SEMICOLON] = ActionEntry(REDUCE, 99);
- _actionMap[295][CLEANUP] = ActionEntry(REDUCE, 99);
- _actionMap[295][FORCELOAD] = ActionEntry(REDUCE, 99);
- _actionMap[296][SEMICOLON] = ActionEntry(REDUCE, 100);
- _actionMap[296][CLEANUP] = ActionEntry(REDUCE, 100);
- _actionMap[296][FORCELOAD] = ActionEntry(REDUCE, 100);
- _actionMap[297][KEEP] = ActionEntry(REDUCE, 95);
- _actionMap[297][SEMICOLON] = ActionEntry(REDUCE, 95);
- _actionMap[298][TIMEOUT] = ActionEntry(SHIFT, 227);
- _actionMap[298][MESSAGE] = ActionEntry(REDUCE, 92);
- _actionMap[298][KEEP] = ActionEntry(REDUCE, 92);
- _actionMap[298][SEMICOLON] = ActionEntry(REDUCE, 92);
- _jumpMap[298][TimeoutOpt] = 327;
- _actionMap[188][SEMICOLON] = ActionEntry(REDUCE, 25);
- _actionMap[189][STRINGVAL] = ActionEntry(SHIFT, 245);
- _actionMap[190][BY] = ActionEntry(SHIFT, 246);
- _actionMap[191][SIZE] = ActionEntry(SHIFT, 247);
- _actionMap[192][IDENTIFIER] = ActionEntry(SHIFT, 248);
- _actionMap[193][MESSAGE] = ActionEntry(SHIFT, 241);
- _actionMap[193][SEMICOLON] = ActionEntry(REDUCE, 96);
- _jumpMap[193][MsgOption] = 249;
- _actionMap[194][SEMICOLON] = ActionEntry(REDUCE, 27);
- _actionMap[194][PRIMARY] = ActionEntry(SHIFT, 254);
- _actionMap[194][SECONDARY] = ActionEntry(SHIFT, 255);
- _actionMap[194][SYSSIZE] = ActionEntry(SHIFT, 257);
- _actionMap[194][TMPSIZE] = ActionEntry(SHIFT, 258);
- _actionMap[194][LOGSIZE] = ActionEntry(SHIFT, 253);
- _actionMap[194][LOGNUM] = ActionEntry(SHIFT, 252);
- _actionMap[194][SORTAREASIZE] = ActionEntry(SHIFT, 256);
- _actionMap[194][TSROOT] = ActionEntry(SHIFT, 259);
+ _actionMap[289][EQU] = ActionEntry(SHIFT, 327);
+ _actionMap[290][EQU] = ActionEntry(SHIFT, 328);
+ _actionMap[291][SEMICOLON] = ActionEntry(REDUCE, 81);
+ _actionMap[292][SEMICOLON] = ActionEntry(REDUCE, 75);
+ _actionMap[293][SEMICOLON] = ActionEntry(REDUCE, 76);
+ _actionMap[294][SEMICOLON] = ActionEntry(REDUCE, 77);
+ _actionMap[295][SEMICOLON] = ActionEntry(REDUCE, 121);
+ _actionMap[296][SEMICOLON] = ActionEntry(REDUCE, 98);
+ _actionMap[296][CLEANUP] = ActionEntry(REDUCE, 98);
+ _actionMap[296][FORCELOAD] = ActionEntry(REDUCE, 98);
+ _actionMap[297][SEMICOLON] = ActionEntry(REDUCE, 100);
+ _actionMap[297][CLEANUP] = ActionEntry(REDUCE, 100);
+ _actionMap[297][FORCELOAD] = ActionEntry(REDUCE, 100);
+ _actionMap[298][SEMICOLON] = ActionEntry(REDUCE, 101);
+ _actionMap[298][CLEANUP] = ActionEntry(REDUCE, 101);
+ _actionMap[298][FORCELOAD] = ActionEntry(REDUCE, 101);
+ _actionMap[299][KEEP] = ActionEntry(REDUCE, 96);
+ _actionMap[299][SEMICOLON] = ActionEntry(REDUCE, 96);
+ _actionMap[300][TIMEOUT] = ActionEntry(SHIFT, 229);
+ _actionMap[300][MESSAGE] = ActionEntry(REDUCE, 93);
+ _actionMap[300][KEEP] = ActionEntry(REDUCE, 93);
+ _actionMap[300][SEMICOLON] = ActionEntry(REDUCE, 93);
+ _jumpMap[300][TimeoutOpt] = 329;
+ _actionMap[190][SEMICOLON] = ActionEntry(REDUCE, 25);
+ _actionMap[191][STRINGVAL] = ActionEntry(SHIFT, 247);
+ _actionMap[192][BY] = ActionEntry(SHIFT, 248);
+ _actionMap[193][SIZE] = ActionEntry(SHIFT, 249);
+ _actionMap[194][IDENTIFIER] = ActionEntry(SHIFT, 250);
+ _actionMap[195][MESSAGE] = ActionEntry(SHIFT, 243);
+ _actionMap[195][SEMICOLON] = ActionEntry(REDUCE, 97);
+ _jumpMap[195][MsgOption] = 251;
+ _actionMap[196][SEMICOLON] = ActionEntry(REDUCE, 27);
+ _actionMap[196][PRIMARY] = ActionEntry(SHIFT, 256);
+ _actionMap[196][SECONDARY] = ActionEntry(SHIFT, 257);
+ _actionMap[196][SYSSIZE] = ActionEntry(SHIFT, 259);
+ _actionMap[196][TMPSIZE] = ActionEntry(SHIFT, 260);
+ _actionMap[196][LOGSIZE] = ActionEntry(SHIFT, 255);
+ _actionMap[196][LOGNUM] = ActionEntry(SHIFT, 254);
+ _actionMap[196][SORTAREASIZE] = ActionEntry(SHIFT, 258);
+ _actionMap[196][TSROOT] = ActionEntry(SHIFT, 261);
}
void CegoAdm::loadParser5()
{
- _actionMap[194][TSTICKET] = ActionEntry(SHIFT, 251);
- _jumpMap[194][Attr] = 250;
- _actionMap[195][SEMICOLON] = ActionEntry(REDUCE, 63);
- _actionMap[196][IDENTIFIER] = ActionEntry(SHIFT, 260);
- _actionMap[197][IDENTIFIER] = ActionEntry(SHIFT, 261);
- _actionMap[198][SEMICOLON] = ActionEntry(REDUCE, 62);
- _actionMap[199][MESSAGE] = ActionEntry(SHIFT, 241);
- _actionMap[199][KEEP] = ActionEntry(REDUCE, 96);
- _actionMap[199][SEMICOLON] = ActionEntry(REDUCE, 96);
- _jumpMap[199][MsgOption] = 263;
- _jumpMap[199][KeepTicketOpt] = 262;
- _actionMap[200][FROM] = ActionEntry(SHIFT, 265);
- _actionMap[201][IDENTIFIER] = ActionEntry(SHIFT, 266);
- _actionMap[202][TO] = ActionEntry(SHIFT, 267);
- _actionMap[203][TO] = ActionEntry(SHIFT, 268);
- _actionMap[204][IDENTIFIER] = ActionEntry(SHIFT, 269);
- _actionMap[205][FROM] = ActionEntry(SHIFT, 270);
- _actionMap[206][SEMICOLON] = ActionEntry(REDUCE, 9);
- _actionMap[207][SEMICOLON] = ActionEntry(REDUCE, 14);
- _actionMap[208][SEMICOLON] = ActionEntry(REDUCE, 15);
- _actionMap[209][SEMICOLON] = ActionEntry(REDUCE, 8);
- _actionMap[210][SEMICOLON] = ActionEntry(REDUCE, 10);
- _actionMap[211][SEMICOLON] = ActionEntry(REDUCE, 11);
- _actionMap[212][SEMICOLON] = ActionEntry(REDUCE, 24);
- _actionMap[213][BY] = ActionEntry(SHIFT, 271);
- _actionMap[214][TO] = ActionEntry(SHIFT, 272);
- _actionMap[215][TO] = ActionEntry(SHIFT, 273);
- _actionMap[216][IDENTIFIER] = ActionEntry(SHIFT, 274);
- _actionMap[217][ROLE] = ActionEntry(SHIFT, 275);
+ _actionMap[196][TSTICKET] = ActionEntry(SHIFT, 253);
+ _jumpMap[196][Attr] = 252;
+ _actionMap[197][SEMICOLON] = ActionEntry(REDUCE, 64);
+ _actionMap[198][IDENTIFIER] = ActionEntry(SHIFT, 262);
+ _actionMap[199][IDENTIFIER] = ActionEntry(SHIFT, 263);
+ _actionMap[200][SEMICOLON] = ActionEntry(REDUCE, 63);
+ _actionMap[201][MESSAGE] = ActionEntry(SHIFT, 243);
+ _actionMap[201][KEEP] = ActionEntry(REDUCE, 97);
+ _actionMap[201][SEMICOLON] = ActionEntry(REDUCE, 97);
+ _jumpMap[201][MsgOption] = 265;
+ _jumpMap[201][KeepTicketOpt] = 264;
+ _actionMap[202][FROM] = ActionEntry(SHIFT, 267);
+ _actionMap[203][IDENTIFIER] = ActionEntry(SHIFT, 268);
+ _actionMap[204][TO] = ActionEntry(SHIFT, 269);
+ _actionMap[205][TO] = ActionEntry(SHIFT, 270);
+ _actionMap[206][IDENTIFIER] = ActionEntry(SHIFT, 271);
+ _actionMap[207][FROM] = ActionEntry(SHIFT, 272);
+ _actionMap[208][SEMICOLON] = ActionEntry(REDUCE, 9);
+ _actionMap[209][SEMICOLON] = ActionEntry(REDUCE, 14);
+ _actionMap[210][SEMICOLON] = ActionEntry(REDUCE, 15);
+ _actionMap[211][SEMICOLON] = ActionEntry(REDUCE, 8);
+ _actionMap[212][SEMICOLON] = ActionEntry(REDUCE, 10);
+ _actionMap[213][SEMICOLON] = ActionEntry(REDUCE, 11);
+ _actionMap[214][SEMICOLON] = ActionEntry(REDUCE, 24);
+ _actionMap[215][BY] = ActionEntry(SHIFT, 273);
+ _actionMap[216][TO] = ActionEntry(SHIFT, 274);
+ _actionMap[217][TO] = ActionEntry(SHIFT, 275);
_actionMap[218][IDENTIFIER] = ActionEntry(SHIFT, 276);
- _actionMap[219][SEMICOLON] = ActionEntry(REDUCE, 69);
- _actionMap[220][STRINGVAL] = ActionEntry(SHIFT, 277);
- _actionMap[221][SEMICOLON] = ActionEntry(REDUCE, 16);
- _actionMap[222][SEMICOLON] = ActionEntry(REDUCE, 26);
- _actionMap[223][IDENTIFIER] = ActionEntry(SHIFT, 278);
- _actionMap[224][IDENTIFIER] = ActionEntry(SHIFT, 279);
+ _actionMap[219][ROLE] = ActionEntry(SHIFT, 277);
+ _actionMap[220][IDENTIFIER] = ActionEntry(SHIFT, 278);
+ _actionMap[221][SEMICOLON] = ActionEntry(REDUCE, 70);
+ _actionMap[222][STRINGVAL] = ActionEntry(SHIFT, 279);
+ _actionMap[223][SEMICOLON] = ActionEntry(REDUCE, 16);
+ _actionMap[224][SEMICOLON] = ActionEntry(REDUCE, 26);
_actionMap[225][IDENTIFIER] = ActionEntry(SHIFT, 280);
- _actionMap[226][SEMICOLON] = ActionEntry(REDUCE, 70);
- _actionMap[227][INTVAL] = ActionEntry(SHIFT, 281);
- _actionMap[228][IDENTIFIER] = ActionEntry(SHIFT, 282);
- _actionMap[229][IDENTIFIER] = ActionEntry(SHIFT, 283);
- _actionMap[230][TABLESET] = ActionEntry(SHIFT, 288);
- _actionMap[230][FILTER] = ActionEntry(SHIFT, 286);
- _actionMap[230][RIGHT] = ActionEntry(SHIFT, 287);
- _jumpMap[230][PermEntry] = 285;
- _jumpMap[230][PermList] = 284;
- _actionMap[231][IDENTIFIER] = ActionEntry(SHIFT, 289);
- _actionMap[232][IDENTIFIER] = ActionEntry(SHIFT, 290);
+ _actionMap[226][IDENTIFIER] = ActionEntry(SHIFT, 281);
+ _actionMap[227][IDENTIFIER] = ActionEntry(SHIFT, 282);
+ _actionMap[228][SEMICOLON] = ActionEntry(REDUCE, 71);
+ _actionMap[229][INTVAL] = ActionEntry(SHIFT, 283);
+ _actionMap[230][IDENTIFIER] = ActionEntry(SHIFT, 284);
+ _actionMap[231][IDENTIFIER] = ActionEntry(SHIFT, 285);
+ _actionMap[232][TABLESET] = ActionEntry(SHIFT, 290);
+ _actionMap[232][FILTER] = ActionEntry(SHIFT, 288);
+ _actionMap[232][RIGHT] = ActionEntry(SHIFT, 289);
+ _jumpMap[232][PermEntry] = 287;
+ _jumpMap[232][PermList] = 286;
_actionMap[233][IDENTIFIER] = ActionEntry(SHIFT, 291);
_actionMap[234][IDENTIFIER] = ActionEntry(SHIFT, 292);
+ _actionMap[235][IDENTIFIER] = ActionEntry(SHIFT, 293);
+ _actionMap[236][IDENTIFIER] = ActionEntry(SHIFT, 294);
}
void CegoAdm::loadParser6()
{
- _actionMap[235][IDENTIFIER] = ActionEntry(SHIFT, 293);
- _actionMap[236][SEMICOLON] = ActionEntry(REDUCE, 29);
- _actionMap[236][CLEANUP] = ActionEntry(SHIFT, 295);
- _actionMap[236][FORCELOAD] = ActionEntry(SHIFT, 296);
- _jumpMap[236][StartOpt] = 294;
- _actionMap[237][SEMICOLON] = ActionEntry(REDUCE, 34);
- _actionMap[238][SEMICOLON] = ActionEntry(REDUCE, 33);
- _actionMap[239][MESSAGE] = ActionEntry(SHIFT, 241);
- _actionMap[239][SEMICOLON] = ActionEntry(REDUCE, 96);
- _jumpMap[239][MsgOption] = 240;
- _actionMap[240][SEMICOLON] = ActionEntry(REDUCE, 68);
- _actionMap[241][STRINGVAL] = ActionEntry(SHIFT, 297);
- _actionMap[242][STRINGVAL] = ActionEntry(SHIFT, 298);
- _actionMap[243][SEMICOLON] = ActionEntry(REDUCE, 61);
- _actionMap[244][SEMICOLON] = ActionEntry(REDUCE, 60);
- _actionMap[121][INTVAL] = ActionEntry(SHIFT, 188);
- _actionMap[122][PATH] = ActionEntry(SHIFT, 189);
- _actionMap[123][IDENTIFIED] = ActionEntry(SHIFT, 190);
- _actionMap[124][STRINGVAL] = ActionEntry(SHIFT, 191);
- _actionMap[125][TO] = ActionEntry(SHIFT, 192);
- _actionMap[126][IDENTIFIER] = ActionEntry(SHIFT, 193);
- _actionMap[127][SEMICOLON] = ActionEntry(REDUCE, 40);
- _actionMap[128][SEMICOLON] = ActionEntry(REDUCE, 121);
- _actionMap[129][SEMICOLON] = ActionEntry(REDUCE, 31);
- _actionMap[130][SEMICOLON] = ActionEntry(REDUCE, 42);
- _actionMap[131][SEMICOLON] = ActionEntry(REDUCE, 51);
- _actionMap[132][SEMICOLON] = ActionEntry(REDUCE, 28);
- _actionMap[133][PRIMARY] = ActionEntry(REDUCE, 106);
- _actionMap[133][SECONDARY] = ActionEntry(REDUCE, 106);
- _actionMap[133][SYSSIZE] = ActionEntry(REDUCE, 106);
- _actionMap[133][TMPSIZE] = ActionEntry(REDUCE, 106);
- _actionMap[133][LOGSIZE] = ActionEntry(REDUCE, 106);
- _actionMap[133][LOGNUM] = ActionEntry(REDUCE, 106);
- _actionMap[133][SORTAREASIZE] = ActionEntry(REDUCE, 106);
- _actionMap[133][TSROOT] = ActionEntry(REDUCE, 106);
- _actionMap[133][TSTICKET] = ActionEntry(REDUCE, 106);
- _actionMap[133][SEMICOLON] = ActionEntry(REDUCE, 106);
- _jumpMap[133][AttrList] = 194;
- _actionMap[134][IDENTIFIER] = ActionEntry(SHIFT, 195);
- _actionMap[135][SEMICOLON] = ActionEntry(REDUCE, 52);
- _actionMap[136][SEMICOLON] = ActionEntry(REDUCE, 37);
- _actionMap[137][SEMICOLON] = ActionEntry(REDUCE, 45);
- _actionMap[138][FOR] = ActionEntry(SHIFT, 196);
- _actionMap[139][FOR] = ActionEntry(SHIFT, 197);
- _actionMap[140][IDENTIFIER] = ActionEntry(SHIFT, 198);
- _actionMap[141][IDENTIFIER] = ActionEntry(SHIFT, 199);
- _actionMap[142][IDENTIFIER] = ActionEntry(SHIFT, 200);
+ _actionMap[237][IDENTIFIER] = ActionEntry(SHIFT, 295);
+ _actionMap[238][SEMICOLON] = ActionEntry(REDUCE, 29);
+ _actionMap[238][CLEANUP] = ActionEntry(SHIFT, 297);
+ _actionMap[238][FORCELOAD] = ActionEntry(SHIFT, 298);
+ _jumpMap[238][StartOpt] = 296;
+ _actionMap[239][SEMICOLON] = ActionEntry(REDUCE, 34);
+ _actionMap[240][SEMICOLON] = ActionEntry(REDUCE, 33);
+ _actionMap[241][MESSAGE] = ActionEntry(SHIFT, 243);
+ _actionMap[241][SEMICOLON] = ActionEntry(REDUCE, 97);
+ _jumpMap[241][MsgOption] = 242;
+ _actionMap[242][SEMICOLON] = ActionEntry(REDUCE, 69);
+ _actionMap[243][STRINGVAL] = ActionEntry(SHIFT, 299);
+ _actionMap[244][STRINGVAL] = ActionEntry(SHIFT, 300);
+ _actionMap[245][SEMICOLON] = ActionEntry(REDUCE, 62);
+ _actionMap[246][SEMICOLON] = ActionEntry(REDUCE, 61);
+ _actionMap[122][INTVAL] = ActionEntry(SHIFT, 190);
+ _actionMap[123][PATH] = ActionEntry(SHIFT, 191);
+ _actionMap[124][IDENTIFIED] = ActionEntry(SHIFT, 192);
+ _actionMap[125][STRINGVAL] = ActionEntry(SHIFT, 193);
+ _actionMap[126][TO] = ActionEntry(SHIFT, 194);
+ _actionMap[127][IDENTIFIER] = ActionEntry(SHIFT, 195);
+ _actionMap[128][SEMICOLON] = ActionEntry(REDUCE, 41);
+ _actionMap[129][SEMICOLON] = ActionEntry(REDUCE, 122);
+ _actionMap[130][SEMICOLON] = ActionEntry(REDUCE, 31);
+ _actionMap[131][SEMICOLON] = ActionEntry(REDUCE, 43);
+ _actionMap[132][SEMICOLON] = ActionEntry(REDUCE, 52);
+ _actionMap[133][SEMICOLON] = ActionEntry(REDUCE, 28);
+ _actionMap[134][PRIMARY] = ActionEntry(REDUCE, 107);
+ _actionMap[134][SECONDARY] = ActionEntry(REDUCE, 107);
+ _actionMap[134][SYSSIZE] = ActionEntry(REDUCE, 107);
+ _actionMap[134][TMPSIZE] = ActionEntry(REDUCE, 107);
+ _actionMap[134][LOGSIZE] = ActionEntry(REDUCE, 107);
+ _actionMap[134][LOGNUM] = ActionEntry(REDUCE, 107);
+ _actionMap[134][SORTAREASIZE] = ActionEntry(REDUCE, 107);
+ _actionMap[134][TSROOT] = ActionEntry(REDUCE, 107);
+ _actionMap[134][TSTICKET] = ActionEntry(REDUCE, 107);
+ _actionMap[134][SEMICOLON] = ActionEntry(REDUCE, 107);
+ _jumpMap[134][AttrList] = 196;
+ _actionMap[135][IDENTIFIER] = ActionEntry(SHIFT, 197);
+ _actionMap[136][SEMICOLON] = ActionEntry(REDUCE, 53);
+ _actionMap[137][SEMICOLON] = ActionEntry(REDUCE, 37);
+ _actionMap[138][SEMICOLON] = ActionEntry(REDUCE, 46);
+ _actionMap[139][FOR] = ActionEntry(SHIFT, 198);
+ _actionMap[140][FOR] = ActionEntry(SHIFT, 199);
+ _actionMap[141][IDENTIFIER] = ActionEntry(SHIFT, 200);
+ _actionMap[142][IDENTIFIER] = ActionEntry(SHIFT, 201);
_actionMap[143][IDENTIFIER] = ActionEntry(SHIFT, 202);
- _actionMap[143][STRUCTURE] = ActionEntry(SHIFT, 201);
- _actionMap[144][IDENTIFIER] = ActionEntry(SHIFT, 203);
+ _actionMap[144][IDENTIFIER] = ActionEntry(SHIFT, 204);
+ _actionMap[144][STRUCTURE] = ActionEntry(SHIFT, 203);
+ _actionMap[145][IDENTIFIER] = ActionEntry(SHIFT, 205);
}
void CegoAdm::loadParser7()
{
- _actionMap[145][IDENTIFIER] = ActionEntry(SHIFT, 205);
- _actionMap[145][STRUCTURE] = ActionEntry(SHIFT, 204);
- _actionMap[146][IDENTIFIER] = ActionEntry(SHIFT, 206);
- _actionMap[147][IDENTIFIER] = ActionEntry(SHIFT, 207);
- _actionMap[148][IDENTIFIER] = ActionEntry(SHIFT, 208);
- _actionMap[149][IDENTIFIER] = ActionEntry(SHIFT, 209);
- _actionMap[150][IDENTIFIER] = ActionEntry(SHIFT, 210);
- _actionMap[151][IDENTIFIER] = ActionEntry(SHIFT, 211);
- _actionMap[152][IDENTIFIER] = ActionEntry(SHIFT, 212);
- _actionMap[153][SEMICOLON] = ActionEntry(REDUCE, 6);
- _actionMap[154][IDENTIFIED] = ActionEntry(SHIFT, 213);
- _actionMap[155][IDENTIFIER] = ActionEntry(SHIFT, 214);
- _actionMap[156][IDENTIFIER] = ActionEntry(SHIFT, 215);
- _actionMap[157][FROM] = ActionEntry(SHIFT, 216);
- _actionMap[158][FROM] = ActionEntry(SHIFT, 217);
- _actionMap[159][FROM] = ActionEntry(SHIFT, 218);
- _actionMap[160][SEMICOLON] = ActionEntry(REDUCE, 38);
- _actionMap[161][TO] = ActionEntry(SHIFT, 220);
- _actionMap[161][SEMICOLON] = ActionEntry(REDUCE, 117);
- _jumpMap[161][PitOption] = 219;
- _actionMap[162][IDENTIFIER] = ActionEntry(SHIFT, 221);
- _actionMap[163][STRINGVAL] = ActionEntry(SHIFT, 222);
- _actionMap[164][FOR] = ActionEntry(SHIFT, 223);
- _actionMap[165][FOR] = ActionEntry(SHIFT, 224);
+ _actionMap[146][IDENTIFIER] = ActionEntry(SHIFT, 207);
+ _actionMap[146][STRUCTURE] = ActionEntry(SHIFT, 206);
+ _actionMap[147][IDENTIFIER] = ActionEntry(SHIFT, 208);
+ _actionMap[148][IDENTIFIER] = ActionEntry(SHIFT, 209);
+ _actionMap[149][IDENTIFIER] = ActionEntry(SHIFT, 210);
+ _actionMap[150][IDENTIFIER] = ActionEntry(SHIFT, 211);
+ _actionMap[151][IDENTIFIER] = ActionEntry(SHIFT, 212);
+ _actionMap[152][IDENTIFIER] = ActionEntry(SHIFT, 213);
+ _actionMap[153][IDENTIFIER] = ActionEntry(SHIFT, 214);
+ _actionMap[154][SEMICOLON] = ActionEntry(REDUCE, 6);
+ _actionMap[155][IDENTIFIED] = ActionEntry(SHIFT, 215);
+ _actionMap[156][IDENTIFIER] = ActionEntry(SHIFT, 216);
+ _actionMap[157][IDENTIFIER] = ActionEntry(SHIFT, 217);
+ _actionMap[158][FROM] = ActionEntry(SHIFT, 218);
+ _actionMap[159][FROM] = ActionEntry(SHIFT, 219);
+ _actionMap[160][FROM] = ActionEntry(SHIFT, 220);
+ _actionMap[161][SEMICOLON] = ActionEntry(REDUCE, 38);
+ _actionMap[162][TO] = ActionEntry(SHIFT, 222);
+ _actionMap[162][SEMICOLON] = ActionEntry(REDUCE, 118);
+ _jumpMap[162][PitOption] = 221;
+ _actionMap[163][IDENTIFIER] = ActionEntry(SHIFT, 223);
+ _actionMap[164][SEMICOLON] = ActionEntry(REDUCE, 39);
+ _actionMap[165][STRINGVAL] = ActionEntry(SHIFT, 224);
_actionMap[166][FOR] = ActionEntry(SHIFT, 225);
- _actionMap[167][TIMEOUT] = ActionEntry(SHIFT, 227);
- _actionMap[167][SEMICOLON] = ActionEntry(REDUCE, 92);
- _jumpMap[167][TimeoutOpt] = 226;
- _actionMap[168][FOR] = ActionEntry(SHIFT, 228);
- _actionMap[169][FOR] = ActionEntry(SHIFT, 229);
- _actionMap[170][WITH] = ActionEntry(SHIFT, 230);
+ _actionMap[167][FOR] = ActionEntry(SHIFT, 226);
+ _actionMap[168][FOR] = ActionEntry(SHIFT, 227);
+ _actionMap[169][TIMEOUT] = ActionEntry(SHIFT, 229);
+ _actionMap[169][SEMICOLON] = ActionEntry(REDUCE, 93);
+ _jumpMap[169][TimeoutOpt] = 228;
+ _actionMap[170][FOR] = ActionEntry(SHIFT, 230);
_actionMap[171][FOR] = ActionEntry(SHIFT, 231);
- _actionMap[172][FOR] = ActionEntry(SHIFT, 232);
+ _actionMap[172][WITH] = ActionEntry(SHIFT, 232);
_actionMap[173][FOR] = ActionEntry(SHIFT, 233);
_actionMap[174][FOR] = ActionEntry(SHIFT, 234);
- _actionMap[175][IDENTIFIER] = ActionEntry(SHIFT, 235);
- _actionMap[176][SEMICOLON] = ActionEntry(REDUCE, 50);
- _actionMap[177][SEMICOLON] = ActionEntry(REDUCE, 2);
- _actionMap[178][CLEANUP] = ActionEntry(REDUCE, 98);
- _actionMap[178][FORCELOAD] = ActionEntry(REDUCE, 98);
- _actionMap[178][SEMICOLON] = ActionEntry(REDUCE, 98);
- _jumpMap[178][StartOptList] = 236;
- _actionMap[179][SEMICOLON] = ActionEntry(REDUCE, 30);
- _actionMap[180][IDENTIFIER] = ActionEntry(SHIFT, 237);
- _actionMap[181][IDENTIFIER] = ActionEntry(SHIFT, 238);
- _actionMap[182][SEMICOLON] = ActionEntry(REDUCE, 32);
- _actionMap[183][WITH] = ActionEntry(SHIFT, 242);
- _actionMap[183][MESSAGE] = ActionEntry(REDUCE, 90);
- _actionMap[183][KEEP] = ActionEntry(REDUCE, 90);
- _actionMap[183][SEMICOLON] = ActionEntry(REDUCE, 90);
+ _actionMap[175][FOR] = ActionEntry(SHIFT, 235);
+ _actionMap[176][FOR] = ActionEntry(SHIFT, 236);
+ _actionMap[177][IDENTIFIER] = ActionEntry(SHIFT, 237);
+ _actionMap[178][SEMICOLON] = ActionEntry(REDUCE, 51);
+ _actionMap[179][SEMICOLON] = ActionEntry(REDUCE, 2);
+ _actionMap[180][CLEANUP] = ActionEntry(REDUCE, 99);
+ _actionMap[180][FORCELOAD] = ActionEntry(REDUCE, 99);
+ _actionMap[180][SEMICOLON] = ActionEntry(REDUCE, 99);
+ _jumpMap[180][StartOptList] = 238;
+ _actionMap[181][SEMICOLON] = ActionEntry(REDUCE, 30);
+ _actionMap[182][IDENTIFIER] = ActionEntry(SHIFT, 239);
+ _actionMap[183][IDENTIFIER] = ActionEntry(SHIFT, 240);
+ _actionMap[184][SEMICOLON] = ActionEntry(REDUCE, 32);
+ _actionMap[185][WITH] = ActionEntry(SHIFT, 244);
+ _actionMap[185][MESSAGE] = ActionEntry(REDUCE, 91);
+ _actionMap[185][KEEP] = ActionEntry(REDUCE, 91);
}
void CegoAdm::loadParser8()
{
- _jumpMap[183][MsgOption] = 240;
- _jumpMap[183][SyncCmdOption] = 239;
- _actionMap[184][SEMICOLON] = ActionEntry(REDUCE, 20);
- _actionMap[185][IDENTIFIER] = ActionEntry(SHIFT, 243);
- _actionMap[186][IDENTIFIER] = ActionEntry(SHIFT, 244);
- _actionMap[187][SEMICOLON] = ActionEntry(REDUCE, 41);
+ _actionMap[185][SEMICOLON] = ActionEntry(REDUCE, 91);
+ _jumpMap[185][MsgOption] = 242;
+ _jumpMap[185][SyncCmdOption] = 241;
+ _actionMap[186][SEMICOLON] = ActionEntry(REDUCE, 20);
+ _actionMap[187][IDENTIFIER] = ActionEntry(SHIFT, 245);
+ _actionMap[188][IDENTIFIER] = ActionEntry(SHIFT, 246);
+ _actionMap[189][SEMICOLON] = ActionEntry(REDUCE, 42);
_actionMap[39][ENDTOKEN] = ActionEntry(ACCEPT, 0);
- _actionMap[40][THREAD] = ActionEntry(SHIFT, 121);
- _actionMap[41][IDENTIFIER] = ActionEntry(SHIFT, 122);
- _actionMap[42][IDENTIFIER] = ActionEntry(SHIFT, 123);
- _actionMap[43][DATAFILE] = ActionEntry(SHIFT, 124);
- _actionMap[44][IDENTIFIER] = ActionEntry(SHIFT, 125);
- _actionMap[45][FOR] = ActionEntry(SHIFT, 126);
- _actionMap[46][IDENTIFIER] = ActionEntry(SHIFT, 127);
- _actionMap[47][STRINGVAL] = ActionEntry(SHIFT, 128);
- _actionMap[48][IDENTIFIER] = ActionEntry(SHIFT, 129);
- _actionMap[49][IDENTIFIER] = ActionEntry(SHIFT, 130);
- _actionMap[50][IDENTIFIER] = ActionEntry(SHIFT, 131);
- _actionMap[51][IDENTIFIER] = ActionEntry(SHIFT, 132);
- _actionMap[52][IDENTIFIER] = ActionEntry(SHIFT, 133);
- _actionMap[53][FOR] = ActionEntry(SHIFT, 134);
- _actionMap[54][IDENTIFIER] = ActionEntry(SHIFT, 135);
- _actionMap[55][IDENTIFIER] = ActionEntry(SHIFT, 136);
- _actionMap[56][IDENTIFIER] = ActionEntry(SHIFT, 137);
- _actionMap[57][IDENTIFIER] = ActionEntry(SHIFT, 138);
- _actionMap[58][IDENTIFIER] = ActionEntry(SHIFT, 139);
- _actionMap[59][FOR] = ActionEntry(SHIFT, 140);
- _actionMap[60][FOR] = ActionEntry(SHIFT, 141);
- _actionMap[61][TABLESET] = ActionEntry(SHIFT, 143);
- _actionMap[61][TABLE] = ActionEntry(SHIFT, 142);
- _actionMap[62][TABLESET] = ActionEntry(REDUCE, 102);
- _actionMap[62][TABLE] = ActionEntry(REDUCE, 102);
- _actionMap[63][TABLESET] = ActionEntry(REDUCE, 103);
- _actionMap[63][TABLE] = ActionEntry(REDUCE, 103);
- _actionMap[64][TABLESET] = ActionEntry(REDUCE, 101);
- _actionMap[64][TABLE] = ActionEntry(REDUCE, 101);
- _actionMap[65][TABLESET] = ActionEntry(SHIFT, 145);
- _actionMap[65][TABLE] = ActionEntry(SHIFT, 144);
- _actionMap[66][FOR] = ActionEntry(SHIFT, 146);
- _actionMap[67][FOR] = ActionEntry(SHIFT, 147);
- _actionMap[68][FOR] = ActionEntry(SHIFT, 148);
+ _actionMap[40][THREAD] = ActionEntry(SHIFT, 122);
+ _actionMap[41][IDENTIFIER] = ActionEntry(SHIFT, 123);
+ _actionMap[42][IDENTIFIER] = ActionEntry(SHIFT, 124);
+ _actionMap[43][DATAFILE] = ActionEntry(SHIFT, 125);
+ _actionMap[44][IDENTIFIER] = ActionEntry(SHIFT, 126);
+ _actionMap[45][FOR] = ActionEntry(SHIFT, 127);
+ _actionMap[46][IDENTIFIER] = ActionEntry(SHIFT, 128);
+ _actionMap[47][STRINGVAL] = ActionEntry(SHIFT, 129);
+ _actionMap[48][IDENTIFIER] = ActionEntry(SHIFT, 130);
+ _actionMap[49][IDENTIFIER] = ActionEntry(SHIFT, 131);
+ _actionMap[50][IDENTIFIER] = ActionEntry(SHIFT, 132);
+ _actionMap[51][IDENTIFIER] = ActionEntry(SHIFT, 133);
+ _actionMap[52][IDENTIFIER] = ActionEntry(SHIFT, 134);
+ _actionMap[53][FOR] = ActionEntry(SHIFT, 135);
+ _actionMap[54][IDENTIFIER] = ActionEntry(SHIFT, 136);
+ _actionMap[55][IDENTIFIER] = ActionEntry(SHIFT, 137);
+ _actionMap[56][IDENTIFIER] = ActionEntry(SHIFT, 138);
+ _actionMap[57][IDENTIFIER] = ActionEntry(SHIFT, 139);
+ _actionMap[58][IDENTIFIER] = ActionEntry(SHIFT, 140);
+ _actionMap[59][FOR] = ActionEntry(SHIFT, 141);
+ _actionMap[60][FOR] = ActionEntry(SHIFT, 142);
+ _actionMap[61][TABLESET] = ActionEntry(SHIFT, 144);
+ _actionMap[61][TABLE] = ActionEntry(SHIFT, 143);
+ _actionMap[62][TABLESET] = ActionEntry(REDUCE, 103);
+ _actionMap[62][TABLE] = ActionEntry(REDUCE, 103);
+ _actionMap[63][TABLESET] = ActionEntry(REDUCE, 104);
+ _actionMap[63][TABLE] = ActionEntry(REDUCE, 104);
+ _actionMap[64][TABLESET] = ActionEntry(REDUCE, 102);
+ _actionMap[64][TABLE] = ActionEntry(REDUCE, 102);
+ _actionMap[65][TABLESET] = ActionEntry(SHIFT, 146);
+ _actionMap[65][TABLE] = ActionEntry(SHIFT, 145);
+ _actionMap[66][FOR] = ActionEntry(SHIFT, 147);
+ _actionMap[67][FOR] = ActionEntry(SHIFT, 148);
+ _actionMap[68][FOR] = ActionEntry(SHIFT, 149);
_actionMap[69][SEMICOLON] = ActionEntry(REDUCE, 23);
- _actionMap[70][FOR] = ActionEntry(SHIFT, 149);
- _actionMap[71][FOR] = ActionEntry(SHIFT, 150);
+ _actionMap[70][FOR] = ActionEntry(SHIFT, 150);
+ _actionMap[71][FOR] = ActionEntry(SHIFT, 151);
_actionMap[72][SEMICOLON] = ActionEntry(REDUCE, 12);
- _actionMap[73][FOR] = ActionEntry(SHIFT, 151);
+ _actionMap[73][FOR] = ActionEntry(SHIFT, 152);
_actionMap[74][SEMICOLON] = ActionEntry(REDUCE, 3);
- _actionMap[75][SEMICOLON] = ActionEntry(REDUCE, 49);
+ _actionMap[75][SEMICOLON] = ActionEntry(REDUCE, 50);
_actionMap[76][SEMICOLON] = ActionEntry(REDUCE, 13);
- _actionMap[77][SEMICOLON] = ActionEntry(REDUCE, 7);
}
void CegoAdm::loadParser9()
{
- _actionMap[78][FOR] = ActionEntry(SHIFT, 152);
- _actionMap[79][SEMICOLON] = ActionEntry(REDUCE, 44);
- _actionMap[80][LOCK] = ActionEntry(SHIFT, 153);
- _actionMap[81][IDENTIFIER] = ActionEntry(SHIFT, 154);
+ _actionMap[77][SEMICOLON] = ActionEntry(REDUCE, 7);
+ _actionMap[78][FOR] = ActionEntry(SHIFT, 153);
+ _actionMap[79][SEMICOLON] = ActionEntry(REDUCE, 45);
+ _actionMap[80][LOCK] = ActionEntry(SHIFT, 154);
+ _actionMap[81][IDENTIFIER] = ActionEntry(SHIFT, 155);
_actionMap[82][SEMICOLON] = ActionEntry(REDUCE, 5);
_actionMap[83][SEMICOLON] = ActionEntry(REDUCE, 4);
- _actionMap[84][FOR] = ActionEntry(SHIFT, 155);
- _actionMap[85][FOR] = ActionEntry(SHIFT, 156);
- _actionMap[86][IDENTIFIER] = ActionEntry(SHIFT, 157);
- _actionMap[87][IDENTIFIER] = ActionEntry(SHIFT, 158);
- _actionMap[88][IDENTIFIER] = ActionEntry(SHIFT, 159);
- _actionMap[89][IDENTIFIER] = ActionEntry(SHIFT, 160);
- _actionMap[90][IDENTIFIER] = ActionEntry(SHIFT, 161);
- _actionMap[91][FOR] = ActionEntry(SHIFT, 162);
- _actionMap[92][FROM] = ActionEntry(SHIFT, 163);
- _actionMap[93][STRINGVAL] = ActionEntry(SHIFT, 164);
- _actionMap[94][INTVAL] = ActionEntry(SHIFT, 165);
- _actionMap[95][STRINGVAL] = ActionEntry(SHIFT, 166);
- _actionMap[96][STRINGVAL] = ActionEntry(SHIFT, 167);
- _actionMap[97][INTVAL] = ActionEntry(SHIFT, 168);
- _actionMap[98][INTVAL] = ActionEntry(SHIFT, 169);
- _actionMap[99][IDENTIFIER] = ActionEntry(SHIFT, 170);
- _actionMap[100][INTVAL] = ActionEntry(SHIFT, 171);
- _actionMap[101][INTVAL] = ActionEntry(SHIFT, 172);
- _actionMap[102][INTVAL] = ActionEntry(SHIFT, 173);
- _actionMap[103][STRINGVAL] = ActionEntry(SHIFT, 174);
- _actionMap[104][IDENTIFIER] = ActionEntry(SHIFT, 175);
- _actionMap[105][SEMICOLON] = ActionEntry(REDUCE, 71);
- _actionMap[106][SEMICOLON] = ActionEntry(REDUCE, 1);
- _actionMap[107][IDENTIFIER] = ActionEntry(SHIFT, 176);
- _actionMap[108][IDENTIFIER] = ActionEntry(SHIFT, 177);
- _actionMap[109][IDENTIFIER] = ActionEntry(SHIFT, 178);
- _actionMap[110][IDENTIFIER] = ActionEntry(SHIFT, 179);
- _actionMap[111][FOR] = ActionEntry(SHIFT, 180);
- _actionMap[112][FOR] = ActionEntry(SHIFT, 181);
- _actionMap[113][IDENTIFIER] = ActionEntry(SHIFT, 182);
- _actionMap[114][IDENTIFIER] = ActionEntry(SHIFT, 183);
- _actionMap[115][SEMICOLON] = ActionEntry(REDUCE, 21);
- _actionMap[116][INTVAL] = ActionEntry(SHIFT, 184);
- _actionMap[116][SEMICOLON] = ActionEntry(REDUCE, 19);
- _actionMap[117][SEMICOLON] = ActionEntry(REDUCE, 22);
- _actionMap[118][USER] = ActionEntry(SHIFT, 185);
- _actionMap[119][USER] = ActionEntry(SHIFT, 186);
- _actionMap[120][IDENTIFIER] = ActionEntry(SHIFT, 187);
+ _actionMap[84][FOR] = ActionEntry(SHIFT, 156);
+ _actionMap[85][FOR] = ActionEntry(SHIFT, 157);
+ _actionMap[86][IDENTIFIER] = ActionEntry(SHIFT, 158);
+ _actionMap[87][IDENTIFIER] = ActionEntry(SHIFT, 159);
+ _actionMap[88][IDENTIFIER] = ActionEntry(SHIFT, 160);
+ _actionMap[89][IDENTIFIER] = ActionEntry(SHIFT, 161);
+ _actionMap[90][IDENTIFIER] = ActionEntry(SHIFT, 162);
+ _actionMap[91][FOR] = ActionEntry(SHIFT, 163);
+ _actionMap[92][IDENTIFIER] = ActionEntry(SHIFT, 164);
+ _actionMap[93][FROM] = ActionEntry(SHIFT, 165);
+ _actionMap[94][STRINGVAL] = ActionEntry(SHIFT, 166);
+ _actionMap[95][INTVAL] = ActionEntry(SHIFT, 167);
+ _actionMap[96][STRINGVAL] = ActionEntry(SHIFT, 168);
+ _actionMap[97][STRINGVAL] = ActionEntry(SHIFT, 169);
+ _actionMap[98][INTVAL] = ActionEntry(SHIFT, 170);
+ _actionMap[99][INTVAL] = ActionEntry(SHIFT, 171);
+ _actionMap[100][IDENTIFIER] = ActionEntry(SHIFT, 172);
+ _actionMap[101][INTVAL] = ActionEntry(SHIFT, 173);
+ _actionMap[102][INTVAL] = ActionEntry(SHIFT, 174);
+ _actionMap[103][INTVAL] = ActionEntry(SHIFT, 175);
+ _actionMap[104][STRINGVAL] = ActionEntry(SHIFT, 176);
+ _actionMap[105][IDENTIFIER] = ActionEntry(SHIFT, 177);
+ _actionMap[106][SEMICOLON] = ActionEntry(REDUCE, 72);
+ _actionMap[107][SEMICOLON] = ActionEntry(REDUCE, 1);
+ _actionMap[108][IDENTIFIER] = ActionEntry(SHIFT, 178);
+ _actionMap[109][IDENTIFIER] = ActionEntry(SHIFT, 179);
+ _actionMap[110][IDENTIFIER] = ActionEntry(SHIFT, 180);
+ _actionMap[111][IDENTIFIER] = ActionEntry(SHIFT, 181);
+ _actionMap[112][FOR] = ActionEntry(SHIFT, 182);
+ _actionMap[113][FOR] = ActionEntry(SHIFT, 183);
+ _actionMap[114][IDENTIFIER] = ActionEntry(SHIFT, 184);
+ _actionMap[115][IDENTIFIER] = ActionEntry(SHIFT, 185);
+ _actionMap[116][SEMICOLON] = ActionEntry(REDUCE, 21);
+ _actionMap[117][INTVAL] = ActionEntry(SHIFT, 186);
+ _actionMap[117][SEMICOLON] = ActionEntry(REDUCE, 19);
+ _actionMap[118][SEMICOLON] = ActionEntry(REDUCE, 22);
+ _actionMap[119][USER] = ActionEntry(SHIFT, 187);
+ _actionMap[120][USER] = ActionEntry(SHIFT, 188);
+ _actionMap[121][IDENTIFIER] = ActionEntry(SHIFT, 189);
_actionMap[1][SEMICOLON] = ActionEntry(SHIFT, 39);
_actionMap[2][DB] = ActionEntry(SHIFT, 40);
_actionMap[3][IDENTIFIER] = ActionEntry(SHIFT, 43);
_actionMap[3][USER] = ActionEntry(SHIFT, 42);
- _actionMap[3][ARCHLOG] = ActionEntry(SHIFT, 41);
- _actionMap[4][ROLE] = ActionEntry(SHIFT, 44);
}
void CegoAdm::loadParser10()
{
+ _actionMap[3][ARCHLOG] = ActionEntry(SHIFT, 41);
+ _actionMap[4][ROLE] = ActionEntry(SHIFT, 44);
_actionMap[5][BACKUP] = ActionEntry(SHIFT, 45);
_actionMap[6][TABLESET] = ActionEntry(SHIFT, 46);
_actionMap[7][TABLESET] = ActionEntry(SHIFT, 48);
@@ -2585,16 +2587,16 @@
_actionMap[16][XML] = ActionEntry(SHIFT, 64);
_actionMap[16][BINARY] = ActionEntry(SHIFT, 62);
_actionMap[16][PLAIN] = ActionEntry(SHIFT, 63);
- _actionMap[16][TABLE] = ActionEntry(REDUCE, 104);
- _actionMap[16][TABLESET] = ActionEntry(REDUCE, 104);
+ _actionMap[16][TABLE] = ActionEntry(REDUCE, 105);
+ _actionMap[16][TABLESET] = ActionEntry(REDUCE, 105);
_jumpMap[16][XPMode] = 61;
- _actionMap[17][SEMICOLON] = ActionEntry(REDUCE, 118);
- _actionMap[18][SEMICOLON] = ActionEntry(REDUCE, 119);
+ _actionMap[17][SEMICOLON] = ActionEntry(REDUCE, 119);
+ _actionMap[18][SEMICOLON] = ActionEntry(REDUCE, 120);
_actionMap[19][XML] = ActionEntry(SHIFT, 64);
_actionMap[19][BINARY] = ActionEntry(SHIFT, 62);
_actionMap[19][PLAIN] = ActionEntry(SHIFT, 63);
- _actionMap[19][TABLE] = ActionEntry(REDUCE, 104);
- _actionMap[19][TABLESET] = ActionEntry(REDUCE, 104);
+ _actionMap[19][TABLE] = ActionEntry(REDUCE, 105);
+ _actionMap[19][TABLESET] = ActionEntry(REDUCE, 105);
_jumpMap[19][XPMode] = 65;
_actionMap[20][POOL] = ActionEntry(SHIFT, 74);
_actionMap[20][IDENTIFIER] = ActionEntry(SHIFT, 80);
@@ -2614,11 +2616,11 @@
_actionMap[21][SEMICOLON] = ActionEntry(REDUCE, 18);
_actionMap[22][USER] = ActionEntry(SHIFT, 81);
_actionMap[23][ON] = ActionEntry(SHIFT, 83);
- _actionMap[23][OFF] = ActionEntry(SHIFT, 82);
- _actionMap[24][SECONDARY] = ActionEntry(SHIFT, 85);
}
void CegoAdm::loadParser11()
{
+ _actionMap[23][OFF] = ActionEntry(SHIFT, 82);
+ _actionMap[24][SECONDARY] = ActionEntry(SHIFT, 85);
_actionMap[24][MEDIATOR] = ActionEntry(SHIFT, 84);
_actionMap[25][TABLESET] = ActionEntry(SHIFT, 89);
_actionMap[25][ROLE] = ActionEntry(SHIFT, 88);
@@ -2626,36 +2628,37 @@
_actionMap[25][ARCHLOG] = ActionEntry(SHIFT, 86);
_actionMap[26][TABLESET] = ActionEntry(SHIFT, 90);
_actionMap[27][BUSTAT] = ActionEntry(SHIFT, 91);
- _actionMap[28][TABLESET] = ActionEntry(SHIFT, 92);
- _actionMap[29][PERMISSION] = ActionEntry(SHIFT, 99);
- _actionMap[29][LOGMNG] = ActionEntry(SHIFT, 96);
- _actionMap[29][INITFILE] = ActionEntry(SHIFT, 95);
- _actionMap[29][CHECKPOINT] = ActionEntry(SHIFT, 94);
- _actionMap[29][SYSSIZE] = ActionEntry(SHIFT, 101);
- _actionMap[29][TMPSIZE] = ActionEntry(SHIFT, 102);
- _actionMap[29][TSROOT] = ActionEntry(SHIFT, 103);
- _actionMap[29][TSTICKET] = ActionEntry(SHIFT, 93);
- _actionMap[29][LOGNUM] = ActionEntry(SHIFT, 97);
- _actionMap[29][LOGSIZE] = ActionEntry(SHIFT, 98);
- _actionMap[29][SORTAREASIZE] = ActionEntry(SHIFT, 100);
- _actionMap[30][IDENTIFIER] = ActionEntry(SHIFT, 104);
- _actionMap[31][POOL] = ActionEntry(SHIFT, 106);
- _actionMap[31][TABLESET] = ActionEntry(SHIFT, 108);
- _actionMap[31][ROLE] = ActionEntry(SHIFT, 107);
- _actionMap[31][LOGMNG] = ActionEntry(SHIFT, 105);
- _actionMap[32][TABLESET] = ActionEntry(SHIFT, 109);
- _actionMap[33][TABLESET] = ActionEntry(SHIFT, 110);
- _actionMap[34][TABLESET] = ActionEntry(SHIFT, 113);
- _actionMap[34][SECONDARY] = ActionEntry(SHIFT, 112);
- _actionMap[34][MEDIATOR] = ActionEntry(SHIFT, 111);
- _actionMap[35][TABLESET] = ActionEntry(SHIFT, 114);
+ _actionMap[27][TABLESET] = ActionEntry(SHIFT, 92);
+ _actionMap[28][TABLESET] = ActionEntry(SHIFT, 93);
+ _actionMap[29][PERMISSION] = ActionEntry(SHIFT, 100);
+ _actionMap[29][LOGMNG] = ActionEntry(SHIFT, 97);
+ _actionMap[29][INITFILE] = ActionEntry(SHIFT, 96);
+ _actionMap[29][CHECKPOINT] = ActionEntry(SHIFT, 95);
+ _actionMap[29][SYSSIZE] = ActionEntry(SHIFT, 102);
+ _actionMap[29][TMPSIZE] = ActionEntry(SHIFT, 103);
+ _actionMap[29][TSROOT] = ActionEntry(SHIFT, 104);
+ _actionMap[29][TSTICKET] = ActionEntry(SHIFT, 94);
+ _actionMap[29][LOGNUM] = ActionEntry(SHIFT, 98);
+ _actionMap[29][LOGSIZE] = ActionEntry(SHIFT, 99);
+ _actionMap[29][SORTAREASIZE] = ActionEntry(SHIFT, 101);
+ _actionMap[30][IDENTIFIER] = ActionEntry(SHIFT, 105);
+ _actionMap[31][POOL] = ActionEntry(SHIFT, 107);
+ _actionMap[31][TABLESET] = ActionEntry(SHIFT, 109);
+ _actionMap[31][ROLE] = ActionEntry(SHIFT, 108);
+ _actionMap[31][LOGMNG] = ActionEntry(SHIFT, 106);
+ _actionMap[32][TABLESET] = ActionEntry(SHIFT, 110);
+ _actionMap[33][TABLESET] = ActionEntry(SHIFT, 111);
+ _actionMap[34][TABLESET] = ActionEntry(SHIFT, 114);
+ _actionMap[34][SECONDARY] = ActionEntry(SHIFT, 113);
+ _actionMap[34][MEDIATOR] = ActionEntry(SHIFT, 112);
+ _actionMap[35][TABLESET] = ActionEntry(SHIFT, 115);
_actionMap[36][SEMICOLON] = ActionEntry(REDUCE, 17);
- _actionMap[36][DB] = ActionEntry(SHIFT, 116);
- _actionMap[36][ADM] = ActionEntry(SHIFT, 115);
- _actionMap[36][LOG] = ActionEntry(SHIFT, 117);
- _actionMap[37][ON] = ActionEntry(SHIFT, 119);
- _actionMap[37][OFF] = ActionEntry(SHIFT, 118);
- _actionMap[38][TABLESET] = ActionEntry(SHIFT, 120);
+ _actionMap[36][DB] = ActionEntry(SHIFT, 117);
+ _actionMap[36][ADM] = ActionEntry(SHIFT, 116);
+ _actionMap[36][LOG] = ActionEntry(SHIFT, 118);
+ _actionMap[37][ON] = ActionEntry(SHIFT, 120);
+ _actionMap[37][OFF] = ActionEntry(SHIFT, 119);
+ _actionMap[38][TABLESET] = ActionEntry(SHIFT, 121);
_actionMap[0][SHOW] = ActionEntry(SHIFT, 31);
_actionMap[0][LIST] = ActionEntry(SHIFT, 20);
_actionMap[0][RAWMODE] = ActionEntry(SHIFT, 23);
@@ -2666,12 +2669,12 @@
_actionMap[0][RETRIEVE] = ActionEntry(SHIFT, 28);
_actionMap[0][DEFINE] = ActionEntry(SHIFT, 10);
_actionMap[0][CREATE] = ActionEntry(SHIFT, 9);
- _actionMap[0][START_TOK] = ActionEntry(SHIFT, 32);
- _actionMap[0][STOP_TOK] = ActionEntry(SHIFT, 33);
- _actionMap[0][COPY] = ActionEntry(SHIFT, 7);
}
void CegoAdm::loadParser12()
{
+ _actionMap[0][START_TOK] = ActionEntry(SHIFT, 32);
+ _actionMap[0][STOP_TOK] = ActionEntry(SHIFT, 33);
+ _actionMap[0][COPY] = ActionEntry(SHIFT, 7);
_actionMap[0][SWITCH] = ActionEntry(SHIFT, 34);
_actionMap[0][RELOCATE] = ActionEntry(SHIFT, 24);
_actionMap[0][DROP] = ActionEntry(SHIFT, 12);
@@ -2700,14 +2703,15 @@
}
void CegoAdm::loadParser13()
{
+ _prodInfo.Insert(ProdEntry(124, Statement, 5));
_prodInfo.Insert(ProdEntry(123, Statement, 5));
- _prodInfo.Insert(ProdEntry(122, Statement, 5));
- _prodInfo.Insert(ProdEntry(121, Statement, 3));
- _prodInfo.Insert(ProdEntry(120, Statement, 5));
+ _prodInfo.Insert(ProdEntry(122, Statement, 3));
+ _prodInfo.Insert(ProdEntry(121, Statement, 5));
+ _prodInfo.Insert(ProdEntry(120, Statement, 1));
_prodInfo.Insert(ProdEntry(119, Statement, 1));
- _prodInfo.Insert(ProdEntry(118, Statement, 1));
- _prodInfo.Insert(ProdEntry(117, PitOption, 0));
- _prodInfo.Insert(ProdEntry(116, PitOption, 2));
+ _prodInfo.Insert(ProdEntry(118, PitOption, 0));
+ _prodInfo.Insert(ProdEntry(117, PitOption, 2));
+ _prodInfo.Insert(ProdEntry(116, Attr, 3));
_prodInfo.Insert(ProdEntry(115, Attr, 3));
_prodInfo.Insert(ProdEntry(114, Attr, 3));
_prodInfo.Insert(ProdEntry(113, Attr, 3));
@@ -2716,33 +2720,33 @@
_prodInfo.Insert(ProdEntry(110, Attr, 3));
_prodInfo.Insert(ProdEntry(109, Attr, 3));
_prodInfo.Insert(ProdEntry(108, Attr, 3));
- _prodInfo.Insert(ProdEntry(107, Attr, 3));
- _prodInfo.Insert(ProdEntry(106, AttrList, 0));
- _prodInfo.Insert(ProdEntry(105, AttrList, 2));
- _prodInfo.Insert(ProdEntry(104, XPMode, 0));
+ _prodInfo.Insert(ProdEntry(107, AttrList, 0));
+ _prodInfo.Insert(ProdEntry(106, AttrList, 2));
+ _prodInfo.Insert(ProdEntry(105, XPMode, 0));
+ _prodInfo.Insert(ProdEntry(104, XPMode, 1));
_prodInfo.Insert(ProdEntry(103, XPMode, 1));
_prodInfo.Insert(ProdEntry(102, XPMode, 1));
- _prodInfo.Insert(ProdEntry(101, XPMode, 1));
+ _prodInfo.Insert(ProdEntry(101, StartOpt, 1));
_prodInfo.Insert(ProdEntry(100, StartOpt, 1));
- _prodInfo.Insert(ProdEntry(99, StartOpt, 1));
- _prodInfo.Insert(ProdEntry(98, StartOptList, 0));
- _prodInfo.Insert(ProdEntry(97, StartOptList, 2));
- _prodInfo.Insert(ProdEntry(96, MsgOption, 0));
- _prodInfo.Insert(ProdEntry(95, MsgOption, 2));
- _prodInfo.Insert(ProdEntry(94, LogOpt, 0));
- _prodInfo.Insert(ProdEntry(93, LogOpt, 1));
- _prodInfo.Insert(ProdEntry(92, TimeoutOpt, 0));
- _prodInfo.Insert(ProdEntry(91, TimeoutOpt, 2));
- _prodInfo.Insert(ProdEntry(90, SyncCmdOption, 0));
- _prodInfo.Insert(ProdEntry(89, SyncCmdOption, 3));
- _prodInfo.Insert(ProdEntry(88, KeepTicketOpt, 0));
- _prodInfo.Insert(ProdEntry(87, KeepTicketOpt, 2));
- _prodInfo.Insert(ProdEntry(86, Statement, 8));
- _prodInfo.Insert(ProdEntry(85, Statement, 7));
- _prodInfo.Insert(ProdEntry(84, Statement, 9));
- _prodInfo.Insert(ProdEntry(83, Statement, 7));
- _prodInfo.Insert(ProdEntry(82, Statement, 6));
- _prodInfo.Insert(ProdEntry(81, Statement, 8));
+ _prodInfo.Insert(ProdEntry(99, StartOptList, 0));
+ _prodInfo.Insert(ProdEntry(98, StartOptList, 2));
+ _prodInfo.Insert(ProdEntry(97, MsgOption, 0));
+ _prodInfo.Insert(ProdEntry(96, MsgOption, 2));
+ _prodInfo.Insert(ProdEntry(95, LogOpt, 0));
+ _prodInfo.Insert(ProdEntry(94, LogOpt, 1));
+ _prodInfo.Insert(ProdEntry(93, TimeoutOpt, 0));
+ _prodInfo.Insert(ProdEntry(92, TimeoutOpt, 2));
+ _prodInfo.Insert(ProdEntry(91, SyncCmdOption, 0));
+ _prodInfo.Insert(ProdEntry(90, SyncCmdOption, 3));
+ _prodInfo.Insert(ProdEntry(89, KeepTicketOpt, 0));
+ _prodInfo.Insert(ProdEntry(88, KeepTicketOpt, 2));
+ _prodInfo.Insert(ProdEntry(87, Statement, 8));
+ _prodInfo.Insert(ProdEntry(86, Statement, 7));
+ _prodInfo.Insert(ProdEntry(85, Statement, 9));
+ _prodInfo.Insert(ProdEntry(84, Statement, 7));
+ _prodInfo.Insert(ProdEntry(83, Statement, 6));
+ _prodInfo.Insert(ProdEntry(82, Statement, 8));
+ _prodInfo.Insert(ProdEntry(81, Statement, 5));
_prodInfo.Insert(ProdEntry(80, Statement, 5));
_prodInfo.Insert(ProdEntry(79, Statement, 5));
_prodInfo.Insert(ProdEntry(78, Statement, 5));
@@ -2751,40 +2755,40 @@
_prodInfo.Insert(ProdEntry(75, Statement, 5));
_prodInfo.Insert(ProdEntry(74, Statement, 5));
_prodInfo.Insert(ProdEntry(73, Statement, 5));
- _prodInfo.Insert(ProdEntry(72, Statement, 5));
- _prodInfo.Insert(ProdEntry(71, Statement, 2));
+ _prodInfo.Insert(ProdEntry(72, Statement, 2));
+ _prodInfo.Insert(ProdEntry(71, Statement, 4));
_prodInfo.Insert(ProdEntry(70, Statement, 4));
- _prodInfo.Insert(ProdEntry(69, Statement, 4));
- _prodInfo.Insert(ProdEntry(68, Statement, 5));
- _prodInfo.Insert(ProdEntry(67, Statement, 6));
+ _prodInfo.Insert(ProdEntry(69, Statement, 5));
+ _prodInfo.Insert(ProdEntry(68, Statement, 6));
+ _prodInfo.Insert(ProdEntry(67, Statement, 5));
_prodInfo.Insert(ProdEntry(66, Statement, 5));
- _prodInfo.Insert(ProdEntry(65, Statement, 5));
- _prodInfo.Insert(ProdEntry(64, Statement, 7));
+ _prodInfo.Insert(ProdEntry(65, Statement, 7));
+ _prodInfo.Insert(ProdEntry(64, Statement, 4));
_prodInfo.Insert(ProdEntry(63, Statement, 4));
_prodInfo.Insert(ProdEntry(62, Statement, 4));
_prodInfo.Insert(ProdEntry(61, Statement, 4));
- _prodInfo.Insert(ProdEntry(60, Statement, 4));
- _prodInfo.Insert(ProdEntry(59, Statement, 6));
+ _prodInfo.Insert(ProdEntry(60, Statement, 6));
+ _prodInfo.Insert(ProdEntry(59, PermEntry, 3));
_prodInfo.Insert(ProdEntry(58, PermEntry, 3));
_prodInfo.Insert(ProdEntry(57, PermEntry, 3));
- _prodInfo.Insert(ProdEntry(56, PermEntry, 3));
- _prodInfo.Insert(ProdEntry(55, PermList, 1));
- _prodInfo.Insert(ProdEntry(54, PermList, 3));
- _prodInfo.Insert(ProdEntry(53, Statement, 8));
+ _prodInfo.Insert(ProdEntry(56, PermList, 1));
+ _prodInfo.Insert(ProdEntry(55, PermList, 3));
+ _prodInfo.Insert(ProdEntry(54, Statement, 8));
+ _prodInfo.Insert(ProdEntry(53, Statement, 3));
_prodInfo.Insert(ProdEntry(52, Statement, 3));
_prodInfo.Insert(ProdEntry(51, Statement, 3));
- _prodInfo.Insert(ProdEntry(50, Statement, 3));
- _prodInfo.Insert(ProdEntry(49, Statement, 2));
+ _prodInfo.Insert(ProdEntry(50, Statement, 2));
+ _prodInfo.Insert(ProdEntry(49, Statement, 5));
_prodInfo.Insert(ProdEntry(48, Statement, 5));
- _prodInfo.Insert(ProdEntry(47, Statement, 5));
- _prodInfo.Insert(ProdEntry(46, Statement, 6));
- _prodInfo.Insert(ProdEntry(45, Statement, 3));
- _prodInfo.Insert(ProdEntry(44, Statement, 2));
- _prodInfo.Insert(ProdEntry(43, Statement, 6));
+ _prodInfo.Insert(ProdEntry(47, Statement, 6));
+ _prodInfo.Insert(ProdEntry(46, Statement, 3));
+ _prodInfo.Insert(ProdEntry(45, Statement, 2));
+ _prodInfo.Insert(ProdEntry(44, Statement, 6));
+ _prodInfo.Insert(ProdEntry(43, Statement, 3));
_prodInfo.Insert(ProdEntry(42, Statement, 3));
_prodInfo.Insert(ProdEntry(41, Statement, 3));
- _prodInfo.Insert(ProdEntry(40, Statement, 3));
- _prodInfo.Insert(ProdEntry(39, Statement, 8));
+ _prodInfo.Insert(ProdEntry(40, Statement, 8));
+ _prodInfo.Insert(ProdEntry(39, Statement, 3));
_prodInfo.Insert(ProdEntry(38, Statement, 3));
_prodInfo.Insert(ProdEntry(37, Statement, 3));
_prodInfo.Insert(ProdEntry(36, Statement, 6));
@@ -2829,7 +2833,7 @@
CegoAdm::CegoAdm()
{
loadScanner();
- for ( int i=0; i < 356; i++)
+ for ( int i=0; i < 358; i++)
{
int j;
for ( j = 0; j < 107; j++)
@@ -2912,222 +2916,225 @@
}
switch (num)
{
- case 123:
+ case 124:
dumpUIndex();
break;
- case 122:
+ case 123:
dumpTable();
break;
- case 121:
+ case 122:
copyFileAction();
break;
- case 120:
+ case 121:
setTableSetNodeAction();
break;
- case 119:
+ case 120:
getDbInfoAction();
break;
- case 118:
+ case 119:
getDbSpecAction();
break;
- case 116:
+ case 117:
storePit();
break;
- case 115:
+ case 116:
storeTSTicketAttr();
break;
- case 114:
+ case 115:
storeTSRootAttr();
break;
- case 113:
+ case 114:
storeSortAreaAttr();
break;
- case 112:
+ case 113:
storeLogNumAttr();
break;
- case 111:
+ case 112:
storeLogSizeAttr();
break;
- case 110:
+ case 111:
storeTmpSizeAttr();
break;
- case 109:
+ case 110:
storeSysSizeAttr();
break;
- case 108:
+ case 109:
storeSecondaryAttr();
break;
- case 107:
+ case 108:
storePrimaryAttr();
break;
- case 103:
+ case 104:
plainModeAction();
break;
- case 102:
+ case 103:
binModeAction();
break;
- case 101:
+ case 102:
xmlModeAction();
break;
- case 100:
+ case 101:
forceloadAction();
break;
- case 99:
+ case 100:
cleanupAction();
break;
- case 95:
+ case 96:
msgAction();
break;
- case 93:
+ case 94:
nologAction();
break;
- case 91:
+ case 92:
timeoutAction();
break;
- case 89:
+ case 90:
syncCmdAction();
break;
- case 87:
+ case 88:
keepTicketAction();
break;
- case 86:
+ case 87:
importTableSetStructureAction();
break;
- case 85:
+ case 86:
importTableSetAction();
break;
- case 84:
+ case 85:
importTableAction();
break;
- case 83:
+ case 84:
exportTableSetStructureAction();
break;
- case 82:
+ case 83:
exportTableSetAction();
break;
- case 81:
+ case 82:
exportTableAction();
break;
- case 80:
+ case 81:
setTSSortAreaSizeAction();
break;
- case 79:
+ case 80:
setTSLogSizeAction();
break;
- case 78:
+ case 79:
setTSLogNumAction();
break;
- case 77:
+ case 78:
setTSTicketAction();
break;
- case 76:
+ case 77:
setTSRootPathAction();
break;
- case 75:
+ case 76:
setTSTmpSizeAction();
break;
- case 74:
+ case 75:
setTSSysSizeAction();
break;
- case 73:
+ case 74:
setCheckpointAction();
break;
- case 72:
+ case 73:
setTSInitFileAction();
break;
- case 71:
+ case 72:
showLogMngAction();
break;
- case 70:
+ case 71:
setLogMngAction();
break;
- case 69:
+ case 70:
recoverTableSetAction();
break;
- case 68:
+ case 69:
syncTableSetAction();
break;
- case 67:
+ case 68:
endBackupAction();
break;
- case 66:
+ case 67:
beginBackupAction();
break;
- case 65:
+ case 66:
removeArchLogAction();
break;
- case 64:
+ case 65:
addArchLogAction();
break;
- case 63:
+ case 64:
disableArchLogAction();
break;
- case 62:
+ case 63:
enableArchLogAction();
break;
- case 61:
+ case 62:
traceOffAction();
break;
- case 60:
+ case 61:
traceOnAction();
break;
- case 59:
+ case 60:
removePermAction();
break;
- case 58:
+ case 59:
setRightPerm();
break;
- case 57:
+ case 58:
setFilterPerm();
break;
- case 56:
+ case 57:
setTableSetPerm();
break;
- case 53:
+ case 54:
setPermAction();
break;
- case 52:
+ case 53:
dropRoleAction();
break;
- case 51:
+ case 52:
createRoleAction();
break;
- case 50:
+ case 51:
showRoleAction();
break;
- case 49:
+ case 50:
listRoleAction();
break;
- case 48:
+ case 49:
removeRoleAction();
break;
- case 47:
+ case 48:
assignRoleAction();
break;
- case 46:
+ case 47:
changePwdAction();
break;
- case 45:
+ case 46:
removeUserAction();
break;
- case 44:
+ case 45:
listUserAction();
break;
- case 43:
+ case 44:
addUserAction();
break;
- case 42:
+ case 43:
correctTableSetAction();
break;
- case 41:
+ case 42:
verifyTableSetAction();
break;
- case 40:
+ case 41:
checkTableSetAction();
break;
- case 39:
+ case 40:
addDataFileAction();
break;
+ case 39:
+ resetTableSetAction();
+ break;
case 38:
removeTableSetAction();
break;
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoAdm.def
^
|
@@ -1,10 +1,9 @@
-
@
@ Cego admin language definition
@ ------------------------------
@ by Bjoern Lemke
@
-@ (C)opyright 2006.2007,2008,2009 by Bjoern Lemke
+@ (C)opyright 2006-2013 by Bjoern Lemke
@
@ This language defintion can be used with Dragon(c)
@ for parser code generation
@@ -180,6 +179,7 @@
Statement : RELOCATE MEDIATOR FOR IDENTIFIER TO STRINGVAL ; relocateMediatorAction
Statement : DROP TABLESET IDENTIFIER ; dropTableSetAction
Statement : REMOVE TABLESET IDENTIFIER ; removeTableSetAction
+Statement : RESET TABLESET IDENTIFIER ; resetTableSetAction
Statement : ADD IDENTIFIER DATAFILE STRINGVAL SIZE INTVAL TO IDENTIFIER ; addDataFileAction
Statement : CHECK TABLESET IDENTIFIER ; checkTableSetAction
Statement : VERIFY TABLESET IDENTIFIER ; verifyTableSetAction
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoAdm.h
^
|
@@ -61,6 +61,7 @@
virtual void relocateMediatorAction() = 0;
virtual void dropTableSetAction() = 0;
virtual void removeTableSetAction() = 0;
+ virtual void resetTableSetAction() = 0;
virtual void addDataFileAction() = 0;
virtual void checkTableSetAction() = 0;
virtual void verifyTableSetAction() = 0;
@@ -378,8 +379,8 @@
int _num;
};
- ActionEntry _actionMap[356][107];
- int _jumpMap[356][16];
+ ActionEntry _actionMap[358][107];
+ int _jumpMap[358][16];
class ProdEntry {
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoAdmAction.cc
^
|
@@ -830,7 +830,6 @@
}
-
void CegoAdmAction::removeTableSetAction()
{
CegoAdminHandler::ResultType res;
@@ -850,6 +849,24 @@
}
+void CegoAdmAction::resetTableSetAction()
+{
+ CegoAdminHandler::ResultType res;
+ Chain tableSet;
+ Chain* pS = getTokenList().First();
+ if ( pS )
+ {
+ tableSet = *pS;
+ }
+ res = _pAH->medResetTableSet(tableSet);
+ handleMedResult(res);
+
+ Chain msg;
+ _pAH->getMsg(msg);
+ if ( _rawMode == false )
+ cout << msg << endl;
+
+}
void CegoAdmAction::createTableSetAction()
{
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoAdmAction.h
^
|
@@ -105,6 +105,7 @@
void defineTableSetAction();
void dropTableSetAction();
void removeTableSetAction();
+ void resetTableSetAction();
void createTableSetAction();
void switchTableSetAction();
void copyTableSetAction();
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoAdmin.cc
^
|
@@ -546,6 +546,7 @@
cout << " [t30] list logfile for <tableset>" << endl;
cout << " [t31] list transaction for <tableset>" << endl;
cout << " [t32] list object for <tableset>" << endl;
+ cout << " [t33] reset tableset <tableset>" << endl;
cout << endl;
cout << " User and role administration" << endl;
@@ -1221,6 +1222,17 @@
cout << endl;
cout << endl;
}
+ else if ( topic == Chain("t33"))
+ {
+ cout << endl;
+ cout << "reset tableset <tableset>" << endl;
+ cout << "-------------------------------------------------------------" << endl;
+ cout << endl;
+ cout << " Tries to reset a tableset to a defined offline state on the primary node." << endl;
+ cout << " The command just should be executed in case of any undetermined exception." << endl;
+ cout << endl;
+ }
+
else if ( topic == Chain("b0"))
{
cout << endl;
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoAdminHandler.cc
^
|
@@ -355,6 +355,10 @@
{
return CegoAdminHandler::REMOVE_TABLESET;
}
+ else if ( docType == Chain(XML_RESET_TABLESET_REQUEST) )
+ {
+ return CegoAdminHandler::RESET_TABLESET;
+ }
else if ( docType == Chain(XML_CREATE_TABLESET_REQUEST) )
{
return CegoAdminHandler::CREATE_TABLESET;
@@ -615,6 +619,10 @@
{
return CegoAdminHandler::MED_REMOVE_TABLESET;
}
+ else if ( docType == Chain(XML_MED_RESET_TABLESET_REQUEST) )
+ {
+ return CegoAdminHandler::MED_RESET_TABLESET;
+ }
else if ( docType == Chain(XML_MED_CREATE_TABLESET_REQUEST) )
{
return CegoAdminHandler::MED_CREATE_TABLESET;
@@ -846,6 +854,12 @@
return sendReq(XML_REMOVE_TABLESET_REQUEST, pRoot);
}
+CegoAdminHandler::ResultType CegoAdminHandler::reqResetTableSet(const Chain& tableSet)
+{
+ Element* pRoot = new Element(XML_FRAME_ELEMENT);
+ pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
+ return sendReq(XML_RESET_TABLESET_REQUEST, pRoot);
+}
CegoAdminHandler::ResultType CegoAdminHandler::reqCreateTableSet(const Chain& tableSet)
{
@@ -1594,6 +1608,13 @@
return sendReq(XML_MED_REMOVE_TABLESET_REQUEST, pRoot);
}
+CegoAdminHandler::ResultType CegoAdminHandler::medResetTableSet(const Chain& tableSet)
+{
+ Element* pRoot = new Element(XML_FRAME_ELEMENT);
+ pRoot->setAttribute(XML_TABLESET_ATTR, tableSet);
+ return sendReq(XML_MED_RESET_TABLESET_REQUEST, pRoot);
+}
+
CegoAdminHandler::ResultType CegoAdminHandler::medCreateTableSet(const Chain& tableSet)
{
Element* pRoot = new Element(XML_FRAME_ELEMENT);
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoAdminHandler.h
^
|
@@ -63,6 +63,7 @@
COPYINFO,
DEFINE_TABLESET,
REMOVE_TABLESET,
+ RESET_TABLESET,
CREATE_TABLESET,
DROP_TABLESET,
START_TABLESET,
@@ -129,6 +130,7 @@
MED_NOTIFY,
MED_DEFINE_TABLESET,
MED_REMOVE_TABLESET,
+ MED_RESET_TABLESET,
MED_CREATE_TABLESET,
MED_DROP_TABLESET,
MED_COPY_TABLESET,
@@ -201,6 +203,7 @@
int sysFileId, int tempFileId, int sysFileSize, int tempFileSize,
int logFileSize, int logFileNum, long sortAreaSize);
ResultType reqRemoveTableSet(const Chain& tableSet);
+ ResultType reqResetTableSet(const Chain& tableSet);
ResultType reqCreateTableSet(const Chain& tableSet);
ResultType reqDropTableSet(const Chain& tableSet);
ResultType reqStartTableSet(const Chain& tableSet, bool cleanIt, bool forceload);
@@ -311,6 +314,7 @@
ResultType medDropTableSet(const Chain& tableSet);
ResultType medRemoveTableSet(const Chain& tableSet);
+ ResultType medResetTableSet(const Chain& tableSet);
ResultType medCreateTableSet(const Chain& tableSet);
ResultType medCopyTableSet(const Chain& tableSet);
ResultType medSwitchTableSet(const Chain& tableSet);
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoAdminThread.cc
^
|
@@ -391,6 +391,11 @@
srvRemoveTableSet(pAH);
break;
}
+ case CegoAdminHandler::RESET_TABLESET:
+ {
+ srvResetTableSet(pAH);
+ break;
+ }
case CegoAdminHandler::CREATE_TABLESET:
{
srvCreateTableSet(pAH);
@@ -710,6 +715,11 @@
medRemoveTableSet(pAH);
break;
}
+ case CegoAdminHandler::MED_RESET_TABLESET:
+ {
+ medResetTableSet(pAH);
+ break;
+ }
case CegoAdminHandler::MED_CREATE_TABLESET:
{
medCreateTableSet(pAH);
@@ -983,7 +993,7 @@
}
else
{
- res = pAHS->reqSetLSN(tableSet,_pDBMng->getCommittedLSN(tableSet));
+ res = pAHS->reqSetLSN(tableSet, _pDBMng->getCommittedLSN(tableSet));
if ( res == CegoAdminHandler::ADM_OK )
{
Chain msg;
@@ -1957,6 +1967,16 @@
pAH->sendResponse(Chain("Table set removed"));
}
+void CegoAdminThread::srvResetTableSet(CegoAdminHandler *pAH)
+{
+ Chain tableSet;
+ pAH->getTableSet(tableSet);
+ _pTabMng->resetTableSet(tableSet);
+ _lastAction = Chain("Reset TableSet ") + tableSet;
+ pAH->sendResponse(Chain("Table set reset"));
+}
+
+
void CegoAdminThread::srvCreateTableSet(CegoAdminHandler *pAH)
{
@@ -3278,6 +3298,61 @@
}
+void CegoAdminThread::medResetTableSet(CegoAdminHandler *pAH)
+{
+
+ Chain tableSet;
+ pAH->getTableSet(tableSet);
+
+ Chain primary;
+ Chain secondary;
+ Chain mediator;
+ Chain status;
+
+ Host h;
+
+ primary = _pDBMng->getPrimary(tableSet);
+ secondary = _pDBMng->getSecondary(tableSet);
+ mediator = _pDBMng->getMediator(tableSet);
+ status = _pDBMng->getTableSetRunState(tableSet);
+
+ if ( h.getName() != mediator )
+ {
+ Chain msg = Chain("Invalid mediator host ") + h.getName() + Chain(" for tableset ") + tableSet;
+ throw Exception(EXLOC, msg);
+ }
+
+
+ if ( h.getName() != primary )
+ {
+ CegoAdminHandler* pPrimaryAH = 0;
+ pPrimaryAH = getSession(Chain("primary"), primary, pAH->getUser(), pAH->getPassword());
+
+ CegoAdminHandler::ResultType res;
+ res = pPrimaryAH->reqResetTableSet(tableSet);
+ Chain msg;
+ pPrimaryAH->getMsg(msg);
+ closeSession(pPrimaryAH);
+
+ if ( res != CegoAdminHandler::ADM_OK)
+ {
+ throw Exception(EXLOC, msg);
+ }
+
+ pAH->syncWithInfo(Chain("primary"), primary, msg);
+
+ }
+ else
+ {
+ _pTabMng->resetTableSet(tableSet);
+ }
+
+ Chain msg = Chain("Tableset ") + tableSet + Chain(" reset");
+ pAH->sendResponse(msg);
+
+}
+
+
void CegoAdminThread::medCreateTableSet(CegoAdminHandler *pAH)
{
@@ -6863,6 +6938,12 @@
Element* CegoAdminThread::getBUStatInfo(const Chain& tableSet)
{
+ Chain status = _pDBMng->getTableSetRunState(tableSet);
+ if ( status != Chain(XML_ONLINE_VALUE) )
+ {
+ throw Exception(EXLOC, "Tableset must be online to list backup statistics");
+ }
+
Element *pBUS = new Element(XML_BUSINFO_ELEMENT);
int tabSetId = _pDBMng->getTabSetId(tableSet);
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoAdminThread.h
^
|
@@ -84,6 +84,7 @@
void srvDefineTableSet(CegoAdminHandler *pAH);
void srvRemoveTableSet(CegoAdminHandler *pAH);
+ void srvResetTableSet(CegoAdminHandler *pAH);
void srvCreateTableSet(CegoAdminHandler *pAH);
void srvDropTableSet(CegoAdminHandler *pAH);
void srvStartTableSet(CegoAdminHandler *pAH);
@@ -156,6 +157,7 @@
void medNotify(CegoAdminHandler *pAH);
void medDefineTableSet(CegoAdminHandler *pAH);
void medRemoveTableSet(CegoAdminHandler *pAH);
+ void medResetTableSet(CegoAdminHandler *pAH);
void medCreateTableSet(CegoAdminHandler *pAH);
void medDropTableSet(CegoAdminHandler *pAH);
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoDatabaseManager.cc
^
|
@@ -1084,18 +1084,22 @@
getLogFileInfo(tableSet, lfList, sizeList, statusList);
Chain *pLog = lfList.First();
- int *pSize = sizeList.First();
+ Chain *pStatus = statusList.First();
- while ( pLog )
+ while ( pLog && pStatus )
{
- setLogFile(tabSetId, *pLog, true);
- long minlsn = getMinLSN(tabSetId);
- if ( minlsn > 0 )
+ if ( *pStatus == Chain(XML_ACTIVE_VALUE) )
{
- log(_modId, Logger::NOTICE, Chain("Releasing logfile ") + *pLog + Chain(" LSN=") + Chain(minlsn));
- setLogFileStatus(tableSet, *pLog, XML_OCCUPIED_VALUE);
- }
+ setLogFile(tabSetId, *pLog, true);
+ long minlsn = getMinLSN(tabSetId);
+ if ( minlsn > 0 )
+ {
+ log(_modId, Logger::NOTICE, Chain("Releasing logfile ") + *pLog + Chain(" LSN=") + Chain(minlsn));
+ setLogFileStatus(tableSet, *pLog, XML_OCCUPIED_VALUE);
+ }
+ }
+ pStatus = statusList.Next();
pLog = lfList.Next();
}
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoDbThread.cc
^
|
@@ -692,54 +692,60 @@
pSH->getObjectInfoArg(tabSetId, objName, objType);
- switch ( objType )
+ if ( _pDBMng->objectExists(tabSetId, objName, objType) == false )
+ pSH->sendError(Chain("Object does not exist"));
+ else
{
- case CegoObject::SYSTEM:
- case CegoObject::TABLE:
- case CegoObject::PINDEX:
- case CegoObject::UINDEX:
- case CegoObject::INDEX:
- {
- CegoTableObject to;
- _pTabMng->getLocalObject(tabSetId, objName, objType, to);
- pSH->sendObjInfo(to);
- break;
- }
- case CegoObject::VIEW:
- {
- CegoViewObject vo;
- _pTabMng->getLocalObject(tabSetId, objName, objType, vo);
- pSH->sendObjInfo(vo);
- break;
- }
- case CegoObject::PROCEDURE:
- {
- CegoProcObject po;
- _pTabMng->getLocalObject(tabSetId, objName, objType, po);
- pSH->sendObjInfo(po);
- break;
- }
- case CegoObject::FKEY:
- {
- CegoKeyObject ko;
- _pTabMng->getLocalObject(tabSetId, objName, objType, ko);
- pSH->sendObjInfo(ko);
- break;
- }
- case CegoObject::CHECK:
- {
- CegoCheckObject co;
- _pTabMng->getLocalObject(tabSetId, objName, objType, co);
- pSH->sendObjInfo(co);
- break;
- }
- case CegoObject::JOIN:
- case CegoObject::RBSEG:
- case CegoObject::UNDEFINED:
- {
- throw Exception(EXLOC, "Objectinfo not supported for this object type");
- break;
- }
+
+ switch ( objType )
+ {
+ case CegoObject::SYSTEM:
+ case CegoObject::TABLE:
+ case CegoObject::PINDEX:
+ case CegoObject::UINDEX:
+ case CegoObject::INDEX:
+ {
+ CegoTableObject to;
+ _pTabMng->getLocalObject(tabSetId, objName, objType, to);
+ pSH->sendObjInfo(to);
+ break;
+ }
+ case CegoObject::VIEW:
+ {
+ CegoViewObject vo;
+ _pTabMng->getLocalObject(tabSetId, objName, objType, vo);
+ pSH->sendObjInfo(vo);
+ break;
+ }
+ case CegoObject::PROCEDURE:
+ {
+ CegoProcObject po;
+ _pTabMng->getLocalObject(tabSetId, objName, objType, po);
+ pSH->sendObjInfo(po);
+ break;
+ }
+ case CegoObject::FKEY:
+ {
+ CegoKeyObject ko;
+ _pTabMng->getLocalObject(tabSetId, objName, objType, ko);
+ pSH->sendObjInfo(ko);
+ break;
+ }
+ case CegoObject::CHECK:
+ {
+ CegoCheckObject co;
+ _pTabMng->getLocalObject(tabSetId, objName, objType, co);
+ pSH->sendObjInfo(co);
+ break;
+ }
+ case CegoObject::JOIN:
+ case CegoObject::RBSEG:
+ case CegoObject::UNDEFINED:
+ {
+ throw Exception(EXLOC, "Objectinfo not supported for this object type");
+ break;
+ }
+ }
}
break;
}
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoDefs.h
^
|
@@ -40,10 +40,11 @@
#endif
#define CEGO_PRODUCT "Cego"
-#define CEGO_VERSION "2.15.5"
+#define CEGO_VERSION "2.15.6"
#define CEGO_COPYRIGHT "Copyright (C) 2000-2013 by Bjoern Lemke. All rights reserved"
#define CGEXESHELLVARNAME "CGEXESHELL"
+#define CGSTDEXESHELL "/bin/sh"
/*******************************/
/* File Management Parameters */
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoLogManager.cc
^
|
@@ -213,6 +213,11 @@
_pLog[tabSetId]->writeByte((char*)&_logOffset[tabSetId], sizeof(int));
}
+void CegoLogManager::stopLog(int tabSetId)
+{
+ _logActive[tabSetId] = false;
+}
+
void CegoLogManager::startLog(int tabSetId)
{
if ( _pLog[tabSetId] != 0 )
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoLogManager.h
^
|
@@ -56,6 +56,7 @@
~CegoLogManager();
void initLog(int tabSetId, int size);
+ void stopLog(int tabSetId);
void startLog(int tabSetId);
int getLogOffset(int tabSetId);
void resetLog(int tabSetId);
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoRecoveryManager.cc
^
|
@@ -68,11 +68,13 @@
char *pShell = getenv(CGEXESHELLVARNAME);
if ( pShell == NULL )
{
- throw Exception(EXLOC, "Execution shell not set");
+ _shellCmd = Chain(CGSTDEXESHELL);
}
-
- _shellCmd = Chain(pShell);
-
+ else
+ {
+ _shellCmd = Chain(pShell);
+ }
+
int tabSetId = _pDBMng->getTabSetId(tableSet);
_pDBMng->setTableSetRunState(tableSet, XML_RECOVERY_VALUE);
@@ -106,6 +108,10 @@
// release logfiles to force archiving of current online log
if ( _recoveryMode == LOCAL )
_pDBMng->releaseLogFiles(tableSet, true);
+
+
+ // during recovery, we do not write to online log files
+ _pDBMng->stopLog(tabSetId);
long cplsn;
@@ -137,10 +143,10 @@
cplsn = _pDBMng->getCommittedLSN(tableSet);
_pDBMng->log(_modId, Logger::NOTICE, Chain("Starting datafile recovery for tableset ") + tableSet + Chain(" ..."));
- dataFileRecovery(tableSet, tabSetId, cplsn + 1);
+ long lsn = dataFileRecovery(tableSet, tabSetId, cplsn);
- _pDBMng->log(_modId, Logger::NOTICE, Chain("Datafile recovery for tableset ") + tableSet + Chain(" finished"));
+ _pDBMng->log(_modId, Logger::NOTICE, Chain("Datafile recovery for tableset ") + tableSet + Chain(" finished with lsn ") + Chain(lsn));
tsTicket.close();
@@ -168,16 +174,16 @@
_pDBMng->log(_modId, Logger::NOTICE, Chain("Commited lsn = ") + Chain(cplsn));
- cplsn = transactionRecovery(tableSet, tabSetId, cplsn + 1, pit);
+ long lsn = transactionRecovery(tableSet, tabSetId, cplsn, pit);
#ifdef CGDEBUG
- _pDBMng->log(_modId, Logger::DEBUG, Chain("Transaction recovery finished with cplsn = ") + Chain(cplsn));
+ _pDBMng->log(_modId, Logger::DEBUG, Chain("Transaction recovery finished with lsn = ") + Chain(lsn));
#endif
_pDBMng->initLogFiles(tableSet, true);
_pDBMng->setActiveLogFile(tableSet);
- _pDBMng->setLSN(tabSetId, cplsn + 1);
+ _pDBMng->setLSN(tabSetId, lsn + 1);
_pDBMng->startLog(tabSetId);
CegoLogRecord logRec;
@@ -192,8 +198,8 @@
_pDBMng->setRecoveryMode(tabSetId, CegoDatabaseManager::OFF );
- long lsn = _pDBMng->getLSN(tabSetId);
- _pDBMng->setCommittedLSN(tabSetId, lsn - 1);
+ long newcplsn = _pDBMng->getLSN(tabSetId) - 1;
+ _pDBMng->setCommittedLSN(tabSetId, newcplsn);
#ifdef CGDEBUG
_pDBMng->log(_modId, Logger::DEBUG, Chain("Writing sync point ..."));
@@ -205,7 +211,7 @@
_pDBMng->log(_modId, Logger::NOTICE, Chain("Recovery for tableset ") + tableSet + Chain(" finished"));
- return cplsn;
+ return lsn;
}
catch ( Exception e )
@@ -219,15 +225,17 @@
}
}
-void CegoRecoveryManager::dataFileRecovery(const Chain& tableSet, int tabSetId, long cplsn)
+long CegoRecoveryManager::dataFileRecovery(const Chain& tableSet, int tabSetId, long cplsn)
{
bool endOfBackup = false;
-
+
+ long lsn = cplsn;
+
while ( endOfBackup == false && _pDBMng->getRecoveryMode(tabSetId) == CegoDatabaseManager::ON )
{
- Chain archLogFileName = _pDBMng->getArchiveLogName(tableSet, cplsn + 1);
+ Chain archLogFileName = _pDBMng->getArchiveLogName(tableSet, lsn);
ListT<Chain> archIdList;
ListT<Chain> archPathList;
@@ -267,10 +275,10 @@
_pDBMng->log(_modId, Logger::NOTICE, Chain("Recovering offline logfile ") + sourceFileName + Chain(" ..."));
_pDBMng->setLogFile(tabSetId, sourceFileName, true);
- _pDBMng->setLSN(tabSetId, cplsn + 1);
+ _pDBMng->setLSN(tabSetId, lsn + 1);
// recover offline logs
- cplsn = recoverCurrentDataFileLog(tabSetId, endOfBackup);
+ lsn = recoverCurrentDataFileLog(tabSetId, endOfBackup);
}
else if ( _recoveryMode == LOCAL )
@@ -322,10 +330,12 @@
}
else
{
- Sleeper s;
- s.secSleep(LOGMNG_RECOVERY_DELAY);
+ Sleeper s;
+ s.secSleep(LOGMNG_RECOVERY_DELAY);
}
}
+
+ return lsn;
}
long CegoRecoveryManager::transactionRecovery(const Chain& tableSet, int tabSetId, long cplsn, int pit)
@@ -334,6 +344,8 @@
Chain sourceFileName;
int ts = 0;
+ long lsn = cplsn;
+
RecoveryState rstate = CegoRecoveryManager::RECOK;
while ( _pDBMng->getRecoveryMode(tabSetId) == CegoDatabaseManager::ON
@@ -346,7 +358,7 @@
while ( fileFound == false && endOfRecovery == false && _pDBMng->getRecoveryMode(tabSetId) == CegoDatabaseManager::ON )
{
- Chain archLogFileName = _pDBMng->getArchiveLogName(tableSet, cplsn + 1);
+ Chain archLogFileName = _pDBMng->getArchiveLogName(tableSet, lsn);
ListT<Chain> archIdList;
ListT<Chain> archPathList;
@@ -425,6 +437,11 @@
endOfRecovery = true;
}
}
+ if ( fileFound == false )
+ {
+ Sleeper s;
+ s.secSleep(LOGMNG_RECOVERY_DELAY);
+ }
}
// if we found the appropriate file, we try to recover it
@@ -438,16 +455,15 @@
_pDBMng->log(_modId, Logger::NOTICE, Chain("Recovering offline logfile ") + sourceFileName + Chain(" ..."));
_pDBMng->setLogFile(tabSetId, sourceFileName, true);
- _pDBMng->setLSN(tabSetId, cplsn + 1);
+ _pDBMng->setLSN(tabSetId, lsn + 1);
- rstate = recoverCurrentTransactionLog(tabSetId, pit, cplsn, ts);
+ rstate = recoverCurrentTransactionLog(tabSetId, pit, lsn, ts);
if ( rstate == CegoRecoveryManager::RECOK )
{
_pDBMng->log(_modId, Logger::NOTICE, Chain("Transaction recovery ok"));
- // cplsn = lsn;
- // _pGTM->writeCheckPoint(tableSet, false, false);
isRecovered=true;
+ lsn++;
}
else if ( rstate == CegoRecoveryManager::RECINCOMPLETE )
{
@@ -466,6 +482,8 @@
}
}
}
+
+
}
_pDBMng->log(_modId, Logger::NOTICE, Chain("Finished recovery loop ..."));
@@ -477,7 +495,7 @@
{
_pDBMng->log(_modId, Logger::NOTICE, Chain("Recovering final offline logfile ") + sourceFileName + Chain(" ..."));
- rstate = recoverCurrentTransactionLog(tabSetId, pit, cplsn, ts);
+ rstate = recoverCurrentTransactionLog(tabSetId, pit, lsn, ts);
if ( rstate == CegoRecoveryManager::RECINCOMPLETE )
{
@@ -490,7 +508,7 @@
_pGTM->writeCheckPoint(tableSet, false, false);
- return cplsn;
+ return lsn;
}
int CegoRecoveryManager::recoverCurrentDataFileLog(int tabSetId, bool& endOfBackup)
@@ -884,6 +902,9 @@
{
_pDBMng->log(_modId, Logger::NOTICE, Chain("Ignoring lsn ") + Chain(logRec.getLSN())
+ Chain(" ( expected ") + Chain(_pDBMng->getLSN(tabSetId)) + Chain(")"));
+
+ rstate = CegoRecoveryManager::RECOK;
+
}
else
{
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoRecoveryManager.h
^
|
@@ -204,7 +204,7 @@
ListT<DeleteRecord> _delRecList;
ListT<UpdateRecord> _updRecList;
- void dataFileRecovery(const Chain& tableSet, int tabSetId, long lsn);
+ long dataFileRecovery(const Chain& tableSet, int tabSetId, long lsn);
long transactionRecovery(const Chain& tableSet, int tabSetId, long cplsn, int pit);
int recoverCurrentDataFileLog(int tabSetId, bool& endOfBackup);
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoTableManager.cc
^
|
@@ -429,6 +429,46 @@
_pDBMng->log(_modId, Logger::NOTICE, Chain("Tableset ") + tableSet + Chain(" stopped"));
}
+void CegoTableManager::resetTableSet(const Chain& tableSet)
+{
+
+ _pDBMng->log(_modId, Logger::NOTICE, Chain("Resetting tableset ") + tableSet + Chain(" ..."));
+
+ int tabSetId = _pDBMng->getTabSetId(tableSet);
+
+ if ( _pDBMng->hasLogConnection(tabSetId) )
+ {
+ _pDBMng->releaseLogConnection(tabSetId);
+ }
+ else
+ {
+ long lsn = _pDBMng->getLSN(tabSetId);
+ _pDBMng->setCommittedLSN(tabSetId, lsn - 1);
+ writeCheckPoint(tableSet, false, false);
+ }
+
+ _pTM->release(tabSetId);
+
+ if ( _pDBMng->getTableSetRunState(tableSet) == Chain(XML_BACKUP_VALUE) )
+ {
+ endBackup(tableSet, Chain("Tableset reset"), false);
+ }
+
+ if ( _pDBMng->getTableSetRunState(tableSet) == Chain(XML_ONLINE_VALUE) )
+ {
+ _pDBMng->writeAndRemoveTabSet(tabSetId, _pLockHandle);
+ }
+
+ Chain primary = _pDBMng->getPrimary(tableSet);
+ _pDBMng->setSecondary(tableSet, primary);
+
+ _pDBMng->setTableSetRunState(tableSet, XML_OFFLINE_VALUE);
+ _pDBMng->setTableSetSyncState(tableSet, XML_SYNCHED_VALUE);
+
+ _pDBMng->log(_modId, Logger::NOTICE, Chain("Tableset ") + tableSet + Chain(" reset"));
+}
+
+
void CegoTableManager::beginBackup(const Chain& tableSet, const Chain& msg)
{
@@ -599,6 +639,13 @@
void CegoTableManager::syncTableSet(const Chain& tableSet, const Chain& msg, const Chain& escCmd, int timeout)
{
+
+ if ( _pDBMng->getTableSetRunState(tableSet) != Chain(XML_ONLINE_VALUE) )
+ {
+ Chain msg = Chain("Tableset ") + tableSet + Chain(" must be in runstate ONLINE to perform sync");
+ throw Exception(EXLOC, msg);
+ }
+
writeCheckPoint(tableSet, true, true, escCmd, timeout);
int tabSetId =_pDBMng->getTabSetId(tableSet);
addBUStat(tabSetId, Chain("EXTERNAL SYNC"), msg);
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoTableManager.h
^
|
@@ -77,6 +77,8 @@
void stopTableSet(const Chain& tableSet, bool archComplete);
+ void resetTableSet(const Chain& tableSet);
+
void beginBackup(const Chain& tableSet, const Chain& msg);
void endBackup(const Chain& tableSet, const Chain&msg, bool keepTicket = true);
void resetBUStat(const Chain& tableSet);
|
[-]
[+]
|
Changed |
cego-2.15.6.tar.bz2/src/CegoXMLdef.h
^
|
@@ -62,6 +62,7 @@
#define XML_COPYINFO_REQUEST "COPYINFO"
#define XML_DEFINE_TABLESET_REQUEST "DEFINE_TABLESET"
#define XML_REMOVE_TABLESET_REQUEST "REMOVE_TABLESET"
+#define XML_RESET_TABLESET_REQUEST "RESET_TABLESET"
#define XML_CREATE_TABLESET_REQUEST "CREATE_TABLESET"
#define XML_COPY_TABLESET_REQUEST "COPY_TABLESET"
#define XML_COPY_FILE_REQUEST "COPY_FILE"
@@ -134,6 +135,7 @@
#define XML_MED_NOTIFY_REQUEST "MED_NOTIFY"
#define XML_MED_DEFINE_TABLESET_REQUEST "MED_DEFINE_TABLESET"
#define XML_MED_REMOVE_TABLESET_REQUEST "MED_REMOVE_TABLESET"
+#define XML_MED_RESET_TABLESET_REQUEST "MED_RESET_TABLESET"
#define XML_MED_CREATE_TABLESET_REQUEST "MED_CREATE_TABLESET"
#define XML_MED_CORRECT_TABLESET_REQUEST "MED_CORRECT_TABLESET"
#define XML_MED_DROP_TABLESET_REQUEST "MED_DROP_TABLESET"
|