[-]
[+]
|
Changed |
cego.changes
|
|
[-]
[+]
|
Changed |
cego.spec
^
|
|
[-]
[+]
|
Changed |
cego-2.13.6.tar.bz2/README
^
|
@@ -4,7 +4,7 @@
----
A relational and transactional database system
- Version 2.13.5
+ Version 2.13.6
(C)opyright 2006,2007,2008,2009,2010,2011,2012 by Bjoern Lemke
|
[-]
[+]
|
Changed |
cego-2.13.6.tar.bz2/src/CegoAdminThread.cc
^
|
@@ -2489,6 +2489,8 @@
pAH->getFileSize(fileSize);
_pTabMng->addDataFile(tableSet, type, fileId, dataFile, fileSize);
+ _pTabMng->writeCheckPoint(tableSet, true, false);
+
pAH->sendResponse(Chain("Data file " + dataFile + " added"));
}
@@ -4429,7 +4431,9 @@
{
try
{
- _pTabMng->addDataFile(tableSet, fileType, fileId, fileName, fileSize);
+ _pTabMng->addDataFile(tableSet, fileType, fileId, fileName, fileSize);
+ _pTabMng->writeCheckPoint(tableSet, true, false);
+
}
catch ( Exception e )
{
|
[-]
[+]
|
Changed |
cego-2.13.6.tar.bz2/src/CegoClient.cc
^
|
@@ -192,6 +192,8 @@
int portNo;
Chain authString;
Chain promptString;
+Chain protocol;
+
bool rawMode = false;
bool ignoreError = false;
bool isStructure = false;
@@ -333,6 +335,7 @@
portNo = pE->getPortNo();
authString = pE->getAuth();
promptString = pE->getPrompt();
+ protocol = pE->getProtocol();
}
else
{
@@ -347,6 +350,7 @@
portNo = longOpt.getOptValue("port").asInteger();
authString = longOpt.getOptValue("user");
promptString = Chain(PROMPT);
+ protocol = longOpt.getOptValue("protocol");
}
Tokenizer authTok(authString, Chain("/"));
@@ -369,19 +373,17 @@
exit (1);
}
- Chain prot = longOpt.getOptValue("protocol");
-
- if ( prot == Chain("serial") )
+ if ( protocol == Chain("serial") )
{
protType = CegoDbHandler::SERIAL;
}
- else if ( prot == Chain("xml") )
+ else if ( protocol == Chain("xml") )
{
protType = CegoDbHandler::XML;
}
else
{
- cerr << "Invalid protocol " << prot;
+ cerr << "Invalid protocol " << protocol;
exit (1);
}
|
[-]
[+]
|
Changed |
cego-2.13.6.tar.bz2/src/CegoDefs.h
^
|
@@ -40,7 +40,7 @@
#endif
#define CEGO_PRODUCT "Cego"
-#define CEGO_VERSION "2.13.5"
+#define CEGO_VERSION "2.13.6"
#define CEGO_COPYRIGHT "Copyright (C) 2000-2012 by Bjoern Lemke. All rights reserved"
/*******************************/
|
[-]
[+]
|
Changed |
cego-2.13.6.tar.bz2/src/CegoDistManager.cc
^
|
@@ -299,19 +299,6 @@
}
- /*
- ListT<Chain> tmpList;
- getObjectList(tabSetId, CegoObject::ORDERSPACE, tmpList);
-
- Chain *pTmpName = tmpList.First();
- while ( pTmpName )
- {
- _pDBMng->log(_modId, Logger::NOTICE, Chain("Cleaning temp object ") + *pTmpName + Chain(" from tableset ") + tableSet);
- removeObject(tabSetId, *pTmpName, CegoObject::ORDERSPACE);
- pTmpName = tmpList.Next();
- }
- */
-
_pDBMng->setTableSetRunState(tableSet, XML_ONLINE_VALUE);
_pDBMng->setTableSetSyncState(tableSet, XML_SYNCHED_VALUE);
|
[-]
[+]
|
Changed |
cego-2.13.6.tar.bz2/src/CegoRecoveryManager.cc
^
|
@@ -6,7 +6,7 @@
//
// Design and Implementation by Bjoern Lemke
//
-// (C)opyright 2000-2010 Bjoern Lemke
+// (C)opyright 2000-2012 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
@@ -62,7 +62,7 @@
long CegoRecoveryManager::recoverTableSet(const Chain& tableSet, int pit, bool waitForSync, const Chain& logMngProg)
{
- _pLogger->log(_modId, Logger::DEBUG, Chain("Recovering tableset ") + tableSet + Chain(" ..."));
+ _pLogger->log(_modId, Logger::NOTICE, Chain("Recovering tableset ") + tableSet + Chain(" ..."));
int tabSetId = _pDBMng->getTabSetId(tableSet);
@@ -72,7 +72,10 @@
{
while ( _pDBMng->getTableSetSyncState(tableSet) != Chain(XML_SYNCHED_VALUE) && _pDBMng->getRecoveryMode(tabSetId) == CegoDatabaseManager::ON)
{
+#ifdef CGDEBUG
_pDBMng->log(_modId, Logger::DEBUG, Chain("Waiting for tableset sync ... "));
+#endif
+
Sleeper s;
s.secSleep(LOGMNG_RECOVERY_DELAY);
}
@@ -97,7 +100,7 @@
File tsTicket(tsTicketName);
if ( tsTicket.exists() )
{
- _pDBMng->log(_modId, Logger::DEBUG, Chain("Backup tableset ticket detected, datafile file recovery required ..."));
+ _pDBMng->log(_modId, Logger::NOTICE, Chain("Backup tableset ticket detected, datafile file recovery required ..."));
tsTicket.open(File::READ);
XMLSuite xml;
@@ -124,9 +127,11 @@
tsTicket.close();
+#ifdef CGDEBUG
_pDBMng->log(_modId, Logger::DEBUG, Chain("Removing backup ticket ") + tsTicket.getFileName() + Chain(" ..."));
-
- tsTicket.remove();
+#endif
+
+ tsTicket.remove();
}
else
@@ -158,7 +163,9 @@
throw Exception(EXLOC, Chain("Recovery failed"), e);
}
+#ifdef CGDEBUG
_pDBMng->log(_modId, Logger::DEBUG, Chain("Transaction recovery finished with cplsn = ") + Chain(cplsn));
+#endif
_pDBMng->setActiveLogFile(tableSet);
@@ -178,7 +185,9 @@
long lsn = _pDBMng->getLSN(tabSetId);
_pDBMng->setCommittedLSN(tabSetId, lsn);
+#ifdef CGDEBUG
_pDBMng->log(_modId, Logger::DEBUG, Chain("Writing sync point ..."));
+#endif
_pGTM->writeCheckPoint(tableSet, true, false);
@@ -457,13 +466,19 @@
case CegoLogRecord::LOGREC_BUPAGE:
+#ifdef CGDEBUG
_pDBMng->log(_modId, Logger::DEBUG, Chain("Writing page (") + Chain(logRec.getFileId()) + Chain(",") + Chain(logRec.getPageId()) + Chain(")"));
+#endif
+
_pDBMng->writePage(logRec.getFileId(),logRec.getPageId(), 0, logRec.getData(), pLockHandle );
break;
case CegoLogRecord::LOGREC_BUFBM:
{
+#ifdef CGDEBUG
_pDBMng->log(_modId, Logger::DEBUG, Chain("Writing fbm for fileId ") + Chain(logRec.getFileId()));
+#endif
+
_pDBMng->writeFBM(logRec.getFileId(), (unsigned*)logRec.getData(), pLockHandle );
break;
}
@@ -540,8 +555,10 @@
ts=logRec.getTS();
int tid=logRec.getTID();
+#ifdef CGDEBUG
_pDBMng->log(_modId, Logger::DEBUG, Chain("Recovering lsn ") + Chain(logRec.getLSN()) + Chain(" ..."));
-
+#endif
+
// here comes the recovery
switch ( logRec.getAction() )
|
[-]
[+]
|
Changed |
cego-2.13.6.tar.bz2/src/CegoTableManager.cc
^
|
@@ -1998,7 +1998,7 @@
if (pPred == 0)
{
-#ifdef CGDEBUG
+#ifdef CGDEBUG
_pDBMng->log(_modId, Logger::DEBUG, Chain("Updating ") + oe.getTabName() + Chain(" with fulltablescan"));
#endif
|
[-]
[+]
|
Changed |
cego-2.13.6.tar.bz2/tools/cgmkdb
^
|
@@ -16,6 +16,7 @@
myVersion="2.2"; ## Helps to identify and keep track of different editions.
DEFCEGOROOT=/usr/local/cego
+
## Function definitions:
printVersion() {
echo "cgmkdb v${myVersion} - The cego empty database generator utility."
@@ -87,10 +88,11 @@
echo "Database name: $DBNAME"
CEGO=`which cego`; ## path to the cego executable
DBXML=${DBROOT}/${DBNAME}.xml; ## name of the database xml file
+
##
## Database parameters:
PAGESIZE=16384
-HOSTNAME=localhost
+HOSTNAME=`hostname`
ADMPORT=2000
DBPORT=2200
LOGPORT=3000
@@ -101,8 +103,8 @@
LOCKFILE=${DBROOT}/${DBNAME}.lock
# DEBUGLEVEL=DEBUG
DEBUGLEVEL=NOTICE
-DBSTARTSCRIPT=${DBROOT}/${DBNAME}_dbstart
-DBSTOPSCRIPT=${DBROOT}/${DBNAME}_dbstop
+DBSTARTSCRIPT=${DBROOT}/${DBNAME}_start
+DBSTOPSCRIPT=${DBROOT}/${DBNAME}_stop
##
## Tableset defs:
TS=${CEGOTABLESET:-$DBNAME}
@@ -122,6 +124,7 @@
##########################
+
mkdir ${DBROOT}
test $? != 0 && { echo "Cannot create database root directory."; exit 1; }
|
[-]
[+]
|
Changed |
cego-2.13.6.tar.bz2/tools/cgmkdb~
^
|
@@ -16,6 +16,7 @@
myVersion="2.2"; ## Helps to identify and keep track of different editions.
DEFCEGOROOT=/usr/local/cego
+
## Function definitions:
printVersion() {
echo "cgmkdb v${myVersion} - The cego empty database generator utility."
@@ -87,6 +88,7 @@
echo "Database name: $DBNAME"
CEGO=`which cego`; ## path to the cego executable
DBXML=${DBROOT}/${DBNAME}.xml; ## name of the database xml file
+
##
## Database parameters:
PAGESIZE=16384
@@ -101,8 +103,8 @@
LOCKFILE=${DBROOT}/${DBNAME}.lock
# DEBUGLEVEL=DEBUG
DEBUGLEVEL=NOTICE
-DBSTARTSCRIPT=${DBROOT}/${DBNAME}_dbstart
-DBSTOPSCRIPT=${DBROOT}/${DBNAME}_dbstop
+DBSTARTSCRIPT=${DBROOT}/${DBNAME}_start
+DBSTOPSCRIPT=${DBROOT}/${DBNAME}_stop
##
## Tableset defs:
TS=${CEGOTABLESET:-$DBNAME}
@@ -122,6 +124,7 @@
##########################
+
mkdir ${DBROOT}
test $? != 0 && { echo "Cannot create database root directory."; exit 1; }
@@ -158,7 +161,7 @@
/bin/echo " * Creating a tableset ... "
/bin/echo -n " + Defining tableset:${TS} ... "
MAINARGS="${MAINARGS} --tableset=${TS}"
-${CEGO} --mode=define ${MAINARGS} --tsdef=tsroot:${TSROOT},tsticket:${TSTICKET},syssize:${SYSSIZE},tmpsize:${TMPSIZE},logfilesize:${LOGFILESIZE},logfilenum:${LOGFILENUM},appfile:${APPFILE},appsize:${APPSIZE},sortareasize=${SORTAREASIZE}
+${CEGO} --mode=define ${MAINARGS} --tsdef="tsroot:${TSROOT},tsticket:${TSTICKET},syssize:${SYSSIZE},tmpsize:${TMPSIZE},logfilesize:${LOGFILESIZE},logfilenum:${LOGFILENUM},appfile:${APPFILE},appsize:${APPSIZE},sortareasize=${SORTAREASIZE}"
test $? -eq 0 && echo OK || { echo FAILED; exit 1; }
/bin/echo -n " + Finalizing tableset:$TS ... "
|