[-]
[+]
|
Changed |
cego.changes
|
|
[-]
[+]
|
Changed |
cego.spec
^
|
|
[-]
[+]
|
Changed |
cego-2.17.9.tar.bz2/README
^
|
@@ -4,7 +4,7 @@
----
A relational and transactional database system
- Version 2.17.8
+ Version 2.17.9
(C)opyright 2006,2007,2008,2009,2010,2011,2012,2013 by Bjoern Lemke
|
[-]
[+]
|
Changed |
cego-2.17.9.tar.bz2/samples/chkdb/mkdb
^
|
@@ -100,11 +100,11 @@
TSROOT=./db
TSTICKET=$TSROOT/${TS}ticket.xml
SYSSIZE=100
- TMPSIZE=300
+ TMPSIZE=3000
LOGFILESIZE=1000000
LOGFILENUM=3
APPFILE=$TSROOT/${TS}data01.dbf
- APPSIZE=5000
+ APPSIZE=10000
SORTAREASIZE=10000000
DBUSER=lemke
DBPWD=lemke
|
[-]
[+]
|
Changed |
cego-2.17.9.tar.bz2/samples/chkdb/pid
^
|
@@ -1 +1 @@
-28452
\ No newline at end of file
+59887
\ No newline at end of file
|
[-]
[+]
|
Added |
cego-2.17.9.tar.bz2/samples/chkdb/runthread
^
|
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+while true
+do
+ ./chkclt --batchfile=$1
+ sleep 1
+done
\ No newline at end of file
|
[-]
[+]
|
Added |
cego-2.17.9.tar.bz2/samples/chkdb/t1.sql
^
|
@@ -0,0 +1,5 @@
+set autocommit off;
+call newUser('lemke', 'B Lemke', 1000);
+commit;
+
+delete from sysmt_user where dbuser = 'lemke';
\ No newline at end of file
|
[-]
[+]
|
Added |
cego-2.17.9.tar.bz2/samples/chkdb/t2.sql
^
|
@@ -0,0 +1,22 @@
+delete from sysmt_user;
+
+set autocommit off;
+
+insert into sysmt_user values ( 1, 'lemke1', 'XXX');
+insert into sysmt_user values ( 2, 'lemke2', 'XXX');
+insert into sysmt_user values ( 3, 'lemke3', 'XXX');
+insert into sysmt_user values ( 4, 'lemke4', 'XXX');
+insert into sysmt_user values ( 5, 'lemke5', 'XXX');
+insert into sysmt_user values ( 6, 'lemke6', 'XXX');
+commit;
+
+
+insert into sysmt_user values ( 11, 'lemke11', 'XXX');
+insert into sysmt_user values ( 12, 'lemke12', 'XXX');
+insert into sysmt_user values ( 13, 'lemke13', 'XXX');
+insert into sysmt_user values ( 14, 'lemke14', 'XXX');
+insert into sysmt_user values ( 15, 'lemke15', 'XXX');
+insert into sysmt_user values ( 16, 'lemke16', 'XXX');
+insert into sysmt_user values ( null, 'lemke17', 'XXX');
+commit;
+
|
[-]
[+]
|
Added |
cego-2.17.9.tar.bz2/samples/chkdb/x.sql
^
|
@@ -0,0 +1,46 @@
+drop if exists table sysmt_id;
+create table sysmt_id ( id string(10), idval int);
+
+insert into sysmt_id values ( 'FID', 10000 );
+insert into sysmt_id values ( 'XID', 10000 );
+insert into sysmt_id values ( 'GID', 10000 );
+insert into sysmt_id values ( 'UID', 10000 );
+insert into sysmt_id values ( 'HID', 10000 );
+insert into sysmt_id values ( 'PID', 10000 );
+
+drop if exists table sysmt_user;
+create table sysmt_user ( uid int not null, dbuser string(30), username string(100));
+create primary index on sysmt_user(uid);
+create unique index sysmt_user_i1 on sysmt_user(dbuser);
+
+
+drop if exists procedure nextId;
+@
+create procedure nextId(id in string(30)) return int
+begin
+ var idval int;
+ update sysmt_id set idval=idval + 1 where id = :id return :idval = idval;
+ return :idval;
+end;
+@
+
+drop if exists procedure newUser;
+@
+create procedure newUser(dbuser in string(20), username in string(20), num in int)
+begin
+ var uid int;
+ var i int;
+ var u string(50);
+
+ :i = 0;
+ while :i < :num
+ begin
+ :uid = nextId('UID');
+ :u = :dbuser | :uid;
+ insert into sysmt_user ( uid, dbuser, username )
+ values (:uid, :u, :username );
+ :i = :i +1;
+ end;
+end;
+@
+select * from sysmt_user;
\ No newline at end of file
|
[-]
[+]
|
Changed |
cego-2.17.9.tar.bz2/src/CegoDbThread.cc
^
|
@@ -200,7 +200,7 @@
}
- // in any case, rollbak any open transactions
+ // in any case, rollback any open transactions
_pTabMng->rollbackDistTransaction(_pPA->getTableSet());
_pDBMng->decreaseActiveDbThread();
@@ -216,7 +216,11 @@
_pDBMng->log(_modId, Logger::NOTICE, Chain("Thread ") + Chain(_idx) + Chain(" : Abort catched, proceed with session"));
_pTabMng->proceed();
}
-
+
+ // reset append and autocommit mode
+ _pTabMng->setAppend(false);
+ _pTabMng->setAutoCommit(true);
+
delete _pRequest;
}
else
|
[-]
[+]
|
Changed |
cego-2.17.9.tar.bz2/src/CegoDefs.h
^
|
@@ -40,7 +40,7 @@
#endif
#define CEGO_PRODUCT "Cego"
-#define CEGO_VERSION "2.17.8"
+#define CEGO_VERSION "2.17.9"
#define CEGO_COPYRIGHT "Copyright (C) 2000-2013 by Bjoern Lemke. All rights reserved"
#define CGEXESHELLVARNAME "CGEXESHELL"
|
[-]
[+]
|
Changed |
cego-2.17.9.tar.bz2/src/CegoTableManager.cc
^
|
@@ -1662,7 +1662,11 @@
dp = nil;
+ int buflen = 0;
char *pBufBase = 0;
+ int tid = 0;
+ int tastep = 0;
+ CegoTupleState ts = COMMITTED;
int idxInsertCount=0;
@@ -1721,19 +1725,12 @@
try
{
-
- int buflen = 0;
-
+
/////////////////////////////////////////////
// Step 2 : Insert table data
/////////////////////////////////////////////
- int tid = 0;
- int tastep = 0;
-
- CegoTupleState ts = COMMITTED;
-
if ( oe.getType() == CegoObject::TABLE )
{
@@ -1774,13 +1771,6 @@
}
}
- // make RB entry
- if (oe.getType() == CegoObject::TABLE && getTID(oe.getTabSetId()) != 0)
- {
- _pTM->newRBEntry(oe.getTabSetId(), getTID(oe.getTabSetId()), dp.getFileId(), dp.getPageId(), dp.getOffset(), oe.getName());
- }
-
-
///////////////////////////////////
// Step 3 : check key contraints //
///////////////////////////////////
@@ -2022,48 +2012,13 @@
pBTO = btreeList.Next();
}
-
-
///////////////////////////////////////////////
-
-
-
- if (oe.getType() == CegoObject::TABLE && doLogging == true)
- {
- ListT<CegoBlob> blobList = getBlobs(oe.getTabSetId(), fvl);
- if ( blobList.Size() > 0 )
- {
- free ( pBufBase );
- _qh.encodeFVL(tid, tastep, ts, fvl, blobList, pBufBase, buflen);
- CegoBlob *pBlob = blobList.First();
- while ( pBlob )
- {
- free ( pBlob->getBufPtr());
- pBlob = blobList.Next();
- }
- }
-
- CegoLogRecord lr;
- lr.setObjectInfo(oe.getName(), CegoObject::TABLE);
-
- lr.setAction(CegoLogRecord::LOGREC_INSERT);
- lr.setData(pBufBase);
- lr.setDataLen(buflen);
- lr.setTID(getTID(oe.getTabSetId()));
-
- logIt(oe.getTabSetId(), lr);
-
- }
-
- free (pBufBase);
- pBufBase = 0;
}
catch ( Exception e)
{
if ( dp != nil )
{
-
deleteData(oe.getType(), oe.getTabSetId(), dp);
int i=0;
@@ -2109,6 +2064,45 @@
}
throw e;
}
+
+ // if all successful, make RB entry and log the insert action
+
+ if (oe.getType() == CegoObject::TABLE && getTID(oe.getTabSetId()) != 0)
+ {
+ _pTM->newRBEntry(oe.getTabSetId(), getTID(oe.getTabSetId()), dp.getFileId(), dp.getPageId(), dp.getOffset(), oe.getName());
+ }
+
+ if (oe.getType() == CegoObject::TABLE && doLogging == true)
+ {
+ ListT<CegoBlob> blobList = getBlobs(oe.getTabSetId(), fvl);
+ if ( blobList.Size() > 0 )
+ {
+ free ( pBufBase );
+ _qh.encodeFVL(tid, tastep, ts, fvl, blobList, pBufBase, buflen);
+ CegoBlob *pBlob = blobList.First();
+ while ( pBlob )
+ {
+ free ( pBlob->getBufPtr());
+ pBlob = blobList.Next();
+ }
+ }
+
+ CegoLogRecord lr;
+ lr.setObjectInfo(oe.getName(), CegoObject::TABLE);
+
+ lr.setAction(CegoLogRecord::LOGREC_INSERT);
+ lr.setData(pBufBase);
+ lr.setDataLen(buflen);
+ lr.setTID(getTID(oe.getTabSetId()));
+
+ logIt(oe.getTabSetId(), lr);
+
+ }
+
+ if ( pBufBase )
+ {
+ free (pBufBase);
+ }
}
long CegoTableManager::updateDataTable(int tabSetId, const Chain& tableName, const Chain& tableAlias, CegoPredDesc* pPred, const ListT<CegoField>& updList, ListT<CegoExpr*>& exprList, CegoProcBlock* pBlock)
|