[-]
[+]
|
Changed |
cego.changes
|
|
[-]
[+]
|
Changed |
cego.spec
^
|
|
[-]
[+]
|
Changed |
cego-2.12.7.tar.bz2/README
^
|
@@ -4,7 +4,7 @@
----
A relational and transactional database system
- Version 2.12.6
+ Version 2.12.7
(C)opyright 2006,2007,2008,2009,2010,2011,2012 by Bjoern Lemke
|
[-]
[+]
|
Changed |
cego-2.12.7.tar.bz2/TODO
^
|
@@ -13,3 +13,9 @@
the transaction again )
- user management with new role concept should be adapted for distributed mode
+
+- Resolution problem with CegoAttrComp :
+ If the attribute name among tables is not unique, left outer join queries might return
+ wrong results ( see check035.sql in the sample directory, if for table sysmt_threadstat the readstat attribute
+ is named status ( same name as the attribute used in sysmt_thread ), the join condition can not be resolved
+ correctly ( happens with select * from sysmt_threadview where status = 'OPEN'; )
|
[-]
[+]
|
Changed |
cego-2.12.7.tar.bz2/gates/cegodb.xml
^
|
@@ -2,7 +2,7 @@
<!DOCTYPE CEGO_DB_SPEC>
<DATABASE NAME="cegodb" PAGESIZE="16384" ADMINPORT="2000" LOGPORT="3000" DATAPORT="2200" PIDFILE="./db/pid" MAXFID="32" MAXTSID="2" NUMRECSEMA="281" NUMSYSPAGESEMA="53" NUMDATAPAGESEMA="281" NUMIDXPAGESEMA="281" NUMRBPAGESEMA="281" NUMDATAFILESEMA="53" NUMBUFFERPOOLSEMA="31" CSMODE="ON">
 <MODULE NAME="ALL" LEVEL="DEBUG"></MODULE>
<USER NAME="cgadm" PASSWD="f9d1bb5de113b12009fd4b1672a23cfe" TRACE="OFF" ROLE="admin"></USER>
- <TABLESET NAME="TS1" TSROOT="./db" PRIMARY="dude.local" SECONDARY="dude.local" MEDIATOR="dude.local" RUNSTATE="OFFLINE" SYNCSTATE="SYNCHED" TSTICKET="./db/tsticket.xml" TSID="2" TMPFID="31" SYSSIZE="100" TMPSIZE="100" SORTAREASIZE="10000000" LSN="252"> <LOGFILE NAME="./db/TS1redo0.log" SIZE="1000000" STATUS="FREE"></LOGFILE>
+ <TABLESET NAME="TS1" TSROOT="./db" PRIMARY="dude.local" SECONDARY="dude.local" MEDIATOR="dude.local" RUNSTATE="OFFLINE" SYNCSTATE="SYNCHED" TSTICKET="./db/tsticket.xml" TSID="2" TMPFID="31" SYSSIZE="100" TMPSIZE="100" SORTAREASIZE="10000000" LSN="964" TID="103"> <LOGFILE NAME="./db/TS1redo0.log" SIZE="1000000" STATUS="FREE"></LOGFILE>
<LOGFILE NAME="./db/TS1redo1.log" SIZE="1000000" STATUS="FREE"></LOGFILE>
<LOGFILE NAME="./db/TS1redo2.log" SIZE="1000000" STATUS="ACTIVE"></LOGFILE>
<DATAFILE TYPE="APP" FILEID="32" NAME="./db/data01.dbf" SIZE="1000"></DATAFILE>
|
[-]
[+]
|
Added |
cego-2.12.7.tar.bz2/samples/chkdb/check035.sql
^
|
@@ -0,0 +1,59 @@
+--
+-- ### Advanced outer join check
+--
+--
+--
+
+drop if exists table sysmt_threadgroup;
+create table sysmt_threadgroup ( primary tgid int not null, tgname string(10) );
+
+drop if exists table sysmt_user;
+create table sysmt_user ( primary uid int not null, uname string(10) );
+
+drop if exists table sysmt_thread;
+create table sysmt_thread ( primary thrid int not null, tgid int, bgid int, shortdesc string(10), status string(10), remind datetime);
+
+drop if exists table sysmt_threadstat;
+create table sysmt_threadstat ( thrid int not null, uid int not null, readstat string(10) );
+
+create primary index on sysmt_threadstat( thrid, uid );
+
+insert into sysmt_user values ( 100, 'Lemke');
+insert into sysmt_user values ( 101, 'Kuno');
+insert into sysmt_user values ( 102, 'Berta');
+
+insert into sysmt_threadgroup values ( 200, 'MyTG');
+insert into sysmt_threadgroup values ( 201, 'YourTG');
+
+insert into sysmt_thread values ( 300, 200, 400, 'My Thread', 'OPEN', sysdate);
+insert into sysmt_thread values ( 301, 200, 401, 'Your Thread', 'OPEN', sysdate);
+insert into sysmt_thread values ( 302, 201, 401, 'His Thread', 'OPEN', sysdate);
+
+insert into sysmt_threadstat values ( 300, 100, 'READ');
+insert into sysmt_threadstat values ( 302, 100, 'READ');
+
+
+drop if exists view sysmt_threadview;
+create view sysmt_threadview as
+select
+ t.thrid as thrid,
+ tg.tgname as tgname,
+ tg.tgid as tgid,
+ t.shortdesc as shortdesc,
+ t.status as status,
+u.uid as uid,
+case when rs.readstat = null then 'UNREAD' else 'READ' end as readstat,
+rs.uid as rsuid
+from
+ sysmt_thread t inner join sysmt_threadgroup tg on t.tgid = tg.tgid
+inner join sysmt_user u on u.uid = u.uid
+left outer join sysmt_threadstat rs on rs.thrid = t.thrid and rs.uid = u.uid;
+
+select * from sysmt_threadstat where thrid = 302 and uid = 100;
+
+select * from sysmt_threadview;
+select * from sysmt_threadview where uid = 100;
+select * from sysmt_threadview where status = 'OPEN';
+
+
+select * from sysmt_threadview where uid = 100;
|
[-]
[+]
|
Changed |
cego-2.12.7.tar.bz2/samples/chkdb/db/chkdb.xml
^
|
@@ -4,12 +4,10 @@
<USER NAME="cgadm" PASSWD="f9d1bb5de113b12009fd4b1672a23cfe" TRACE="OFF" ROLE="admin"></USER>
<ROLE NAME="ALL"> <PERM TABLESET="TS1" FILTER="ALL" PERM="ALL" PERMID="TS1_P"></PERM>
</ROLE>
- <TABLESET NAME="TS1" TSROOT="./db" PRIMARY="dude.local" SECONDARY="dude.local" MEDIATOR="dude.local" RUNSTATE="OFFLINE" SYNCSTATE="SYNCHED" TSTICKET="./db/TS1ticket.xml" TSID="2" TMPFID="31" SYSSIZE="100" TMPSIZE="300" SORTAREASIZE="10000000" LSN="3280" TID="417"> <LOGFILE NAME="./db/TS1redo0.log" SIZE="1000000" STATUS="FREE"></LOGFILE>
- <LOGFILE NAME="./db/TS1redo1.log" SIZE="1000000" STATUS="FREE"></LOGFILE>
- <LOGFILE NAME="./db/TS1redo2.log" SIZE="1000000" STATUS="ACTIVE"></LOGFILE>
+ <TABLESET NAME="TS1" TSROOT="./db" PRIMARY="dude.local" SECONDARY="dude.local" MEDIATOR="dude.local" RUNSTATE="OFFLINE" SYNCSTATE="SYNCHED" TSTICKET="./db/TS1ticket.xml" TSID="2" TMPFID="31" SYSSIZE="100" TMPSIZE="300" SORTAREASIZE="10000000" LSN="1"> <LOGFILE NAME="./db/TS1redo0.log" SIZE="1000000" STATUS="FREE"></LOGFILE>
+ <LOGFILE NAME="./db/TS1redo1.log" SIZE="1000000" STATUS="ACTIVE"></LOGFILE>
+ <LOGFILE NAME="./db/TS1redo2.log" SIZE="1000000" STATUS="FREE"></LOGFILE>
<DATAFILE TYPE="APP" FILEID="32" NAME="./db/TS1data01.dbf" SIZE="2000"></DATAFILE>
- <COUNTER NAME="accid" VALUE="10001"></COUNTER>
- <COUNTER NAME="aid" VALUE="1"></COUNTER>
</TABLESET>
<USER NAME="lemke" PASSWD="20eb196673144f5c299ef3d0d7a58bd9" TRACE="OFF" ROLE="ALL"></USER>
<NODE HOSTNAME="dude.local" STATUS="ONLINE"></NODE>
|
[-]
[+]
|
Changed |
cego-2.12.7.tar.bz2/src/CegoAttrCond.cc
^
|
@@ -211,7 +211,7 @@
{
bool isFound=false;
CegoAttrComp *pComp = _attrCompSet.First();
- while ( pComp && isFound == false )
+ while ( pComp ) // isFound == false )
{
if ( pComp->getAttrName() == pF->getAttrName()
&& ( pComp->getCompMode() == CegoAttrComp::VAL
@@ -221,12 +221,12 @@
numFound++;
isFound=true;
+ pComp = _attrCompSet.Next();
}
else
{
- pComp = _attrCompSet.Next();
+ pComp = _attrCompSet.Next();
}
-
}
if ( isFound == true )
|
[-]
[+]
|
Changed |
cego-2.12.7.tar.bz2/src/CegoDefs.h
^
|
@@ -40,7 +40,7 @@
#endif
#define CEGO_PRODUCT "Cego"
-#define CEGO_VERSION "2.12.6"
+#define CEGO_VERSION "2.12.7"
#define CEGO_COPYRIGHT "Copyright (C) 2000-2012 by Bjoern Lemke. All rights reserved"
/*******************************/
|
[-]
[+]
|
Changed |
cego-2.12.7.tar.bz2/src/CegoDistCursor.cc
^
|
@@ -306,7 +306,7 @@
_idxMatch = _pTC->setup(attrCond);
if ( _idxMatch != CegoAttrCond::FULL )
- {
+ {
_doEval=true;
}
@@ -714,9 +714,13 @@
_pTCRight->reset();
if ( _isAttrCondValid )
+ {
_pTCRight->distSetup(_innerCond);
+ }
else
+ {
_pTCRight->distSetup();
+ }
_moreRight = _pTCRight->nextTuple(flArray, offset+size-1, 1);
}
@@ -736,9 +740,13 @@
_pTCRight->reset();
if ( _isAttrCondValid )
+ {
_pTCRight->distSetup(_innerCond);
+ }
else
+ {
_pTCRight->distSetup();
+ }
_moreRight = _pTCRight->nextTuple(flArray, offset+size-1, 1);
}
@@ -754,9 +762,13 @@
_pTCRight->reset();
if ( _isAttrCondValid )
+ {
_pTCRight->distSetup(_innerCond);
+ }
else
+ {
_pTCRight->distSetup();
+ }
_moreRight = _pTCRight->nextTuple(flArray, offset+size-1, 1);
}
@@ -992,7 +1004,6 @@
_cursorCond = attrCond.getFilterCond(outerSchema);
addInnerCond = attrCond.getFilterCond(innerSchema);
-
}
else if ( pJO->getJoinType() == CegoJoinObject::RIGHTOUTER )
{
@@ -1011,6 +1022,7 @@
if ( m == CegoQueryHelper::COMPLETE )
{
_evalPredicate = false;
+
_innerCond = ac + addInnerCond;
}
else
@@ -1031,7 +1043,6 @@
_pTCRight->distSetup(_cursorCond);
_pTCLeft->distSetup(_innerCond);
}
-
}
Element* CegoDistCursor::getPlan()
|
[-]
[+]
|
Changed |
cego-2.12.7.tar.bz2/src/CegoIndexCursor.cc
^
|
@@ -708,29 +708,27 @@
{
CegoField* pF = _idxSchema.First();
-
+
while ( pF )
{
+ int flen;
+ memcpy(&flen, idxVal, sizeof(int));
+
+ idxVal += sizeof(int);
+
+ CegoFieldValue fv;
+ fv.setLength(flen);
+ fv.setValue(idxVal);
+ if ( flen > 0 )
+ fv.setType(pF->getType());
+
CegoAttrComp* pAC = _pAttrCond->getAttrCompSet().First();
while ( pAC )
{
-
if ( (Chain)pAC->getAttrName() == (Chain)pF->getAttrName() )
- {
-
- int flen;
- memcpy(&flen, idxVal, sizeof(int));
-
- idxVal += sizeof(int);
-
- CegoFieldValue fv;
- fv.setLength(flen);
- fv.setValue(idxVal);
- if ( flen > 0 )
- fv.setType(pF->getType());
-
+ {
if ( fv < pAC->getFieldValue() )
{
return LESS_THAN;
@@ -750,18 +748,17 @@
{
return MORE_THAN;
}
- }
-
- idxVal += flen;
-
-
+ }
}
pAC = _pAttrCond->getAttrCompSet().Next();
}
+
+ idxVal += flen;
+
pF = _idxSchema.Next();
}
-
+
return EQUAL;
}
|
[-]
[+]
|
Changed |
cego-2.12.7.tar.bz2/src/CegoTableManager.cc
^
|
@@ -2424,15 +2424,17 @@
ListT<CegoField> tfl;
- if ( tc.setup(ac) == false )
+ CegoAttrCond::IndexMatch indexMatch = tc.setup(ac);
+
+ if ( indexMatch == CegoAttrCond::FULL || indexMatch == CegoAttrCond::PART )
{
- CegoTableObject oe;
- getObject(tabSetId, pKey->getTabName(), CegoObject::TABLE, oe);
- tfl = oe.getSchema();
+ tc.getIdxSchema(tfl);
}
else
{
- tc.getIdxSchema(tfl);
+ CegoTableObject oe;
+ getObject(tabSetId, pKey->getTabName(), CegoObject::TABLE, oe);
+ tfl = oe.getSchema();
}
ListT<CegoField> kfl = pKey->getKeySchema();
@@ -2449,24 +2451,23 @@
}
CegoDataPointer dp;
-
+
bool moreTuple = tc.getFirst(kfl, dp);
bool isMatch = false;
while ( moreTuple && ! isMatch)
- {
+ {
CegoField *pF = kfl.First();
while ( pF )
{
isMatch = true;
CegoField *pD = fl.Find(*pF);
if ( pD )
- {
+ {
if ( ! ( (CegoFieldValue)pD->getValue() == (CegoFieldValue)pF->getValue()) )
{
isMatch=false;
- }
-
+ }
}
pF = kfl.Next();
}
|