[-]
[+]
|
Changed |
cego.changes
|
|
[-]
[+]
|
Changed |
cego.spec
^
|
|
[-]
[+]
|
Changed |
cego-2.17.10.tar.bz2/README
^
|
@@ -4,7 +4,7 @@
----
A relational and transactional database system
- Version 2.17.9
+ Version 2.17.10
(C)opyright 2006,2007,2008,2009,2010,2011,2012,2013 by Bjoern Lemke
|
[-]
[+]
|
Changed |
cego-2.17.10.tar.bz2/samples/chkdb/x.sql
^
|
@@ -1,46 +1,14 @@
-drop if exists table sysmt_id;
-create table sysmt_id ( id string(10), idval int);
+drop if exists table t1;
+create table t1 ( a int not null, b int not null, c string(30) not null);
+create primary index on t1(a,b,c);
+
+insert into t1 values ( 1, 1, 'ALPHA');
+insert into t1 values ( 1, 2, 'ALPHA');
+insert into t1 values ( 2, 1, 'BETA');
+insert into t1 values ( 2, 1, 'ALPGA');
+insert into t1 values ( 1, 3, 'ALPHA');
+insert into t1 values ( 2, 2, 'BETA');
+insert into t1 values ( 1, 4, 'BETA');
+insert into t1 values ( 1, 5, 'ALPHA');
-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
+select * from t1 where a = 1 and c = 'ALPHA';
\ No newline at end of file
|
[-]
[+]
|
Changed |
cego-2.17.10.tar.bz2/src/CegoAttrCond.cc
^
|
@@ -87,23 +87,31 @@
return _attrCompSet;
}
-CegoAttrCond CegoAttrCond::getFilterCond(const ListT<CegoField>& fl) const
+CegoAttrCond CegoAttrCond::getFilterCond(const ListT<CegoField>& fl, bool allowLeak) const
{
CegoAttrCond ac;
+ bool goOn=true;
CegoField *pF = fl.First();
- while ( pF )
+ while ( pF && goOn)
{
+ bool attrFound=false;
CegoAttrComp *pAC = _attrCompSet.First();
while ( pAC )
{
if ( pF->getAttrName() == pAC->getAttrName() )
{
ac.add(*pAC);
+ attrFound=true;
}
pAC = _attrCompSet.Next();
}
- pF = fl.Next();
+
+ if ( attrFound || allowLeak)
+ pF = fl.Next();
+ else
+ goOn=false;
+
}
return ac;
}
|
[-]
[+]
|
Changed |
cego-2.17.10.tar.bz2/src/CegoAttrCond.h
^
|
@@ -61,7 +61,7 @@
bool setup(const ListT<CegoField>& fl);
bool setup(ListT<CegoField>* joinBuf, int offset, int size);
- CegoAttrCond getFilterCond(const ListT<CegoField>& fl) const;
+ CegoAttrCond getFilterCond(const ListT<CegoField>& fl, bool allowLeak) const;
IndexMatch checkIndex(const ListT<CegoField>& schema) const;
void setIdxSchema(ListT<CegoField>& schema);
|
[-]
[+]
|
Changed |
cego-2.17.10.tar.bz2/src/CegoDefs.h
^
|
@@ -40,7 +40,7 @@
#endif
#define CEGO_PRODUCT "Cego"
-#define CEGO_VERSION "2.17.9"
+#define CEGO_VERSION "2.17.10"
#define CEGO_COPYRIGHT "Copyright (C) 2000-2013 by Bjoern Lemke. All rights reserved"
#define CGEXESHELLVARNAME "CGEXESHELL"
|
[-]
[+]
|
Changed |
cego-2.17.10.tar.bz2/src/CegoDistCursor.cc
^
|
@@ -1080,8 +1080,8 @@
outerSchema = pJO->getLeftObject()->getSchema();
innerSchema = pJO->getRightObject()->getSchema();
- _cursorCond = attrCond.getFilterCond(outerSchema);
- addInnerCond = attrCond.getFilterCond(innerSchema);
+ _cursorCond = attrCond.getFilterCond(outerSchema, true);
+ addInnerCond = attrCond.getFilterCond(innerSchema, true);
}
else if ( pJO->getJoinType() == CegoJoinObject::RIGHTOUTER )
@@ -1089,8 +1089,8 @@
innerSchema = pJO->getLeftObject()->getSchema();
outerSchema = pJO->getRightObject()->getSchema();
- _cursorCond = attrCond.getFilterCond(outerSchema);
- addInnerCond = attrCond.getFilterCond(innerSchema);
+ _cursorCond = attrCond.getFilterCond(outerSchema, true);
+ addInnerCond = attrCond.getFilterCond(innerSchema, true);
}
CegoAttrCond ac;
|
[-]
[+]
|
Changed |
cego-2.17.10.tar.bz2/src/CegoTableCursor.cc
^
|
@@ -120,7 +120,7 @@
if ( indexMatch == CegoAttrCond::FULL || indexMatch == CegoAttrCond::PART )
{
- CegoAttrCond checkCond = attrCond.getFilterCond(_pOE->getSchema());
+ CegoAttrCond checkCond = attrCond.getFilterCond(_pOE->getSchema(), false);
if ( checkCond.getStrength() > strength )
{
@@ -177,7 +177,7 @@
if ( indexMatch == CegoAttrCond::FULL || indexMatch == CegoAttrCond::PART )
{
- CegoAttrCond checkCond = attrCond.getFilterCond(_pBTO->getSchema());
+ CegoAttrCond checkCond = attrCond.getFilterCond(_pBTO->getSchema(), false);
if ( checkCond.getStrength() > strength )
{
|