cego:
- Added syntax expansion for group having clause to support
advanced having conditions, e.g.
SELECT a, sum(b), max(c) FROM t1
GROUP BY a HAVING sum(b) > 10 AND max(c) = 100;
- Patch added for 'view condition evaluation' in
CegoAttrCond::asConjunctionList, CegoSelect::setViewCond and
CegoDistCursor::distSetup.
- Additional check added to CegoObjectManager to avoid duplicate
table objects of different type ( e.g. Table t1 and View t1 ). Table
objects are either native tables, views or aliases.
- For predicate export structure, changed from XML representation
to native SQL syntax. This requires a dedicated Parser in CegoXPorter,
which can handle predicate SQL representation, but saves lots of
code, since all subsequent member classes of CegoPredDesc no more
need to implement XML representation methods ( constructor,
fromElement, toElement )
- Added stabilization patches for nested grouping select, e.g. in
exists subselect. In CegoSelect::reset, for _selectMode == GROUPING,
grouping space is resetted now properly.
- Added stabilization patches to CegoAction. Load statements for
views, procedures, triggers and condition are treated regarding
object allocation/free. These statements are for internal use only,
so a database user receives a note message now
- Further improvements added in CegoQuery to give more detailed
error information in case of exceptions
- In CegoTableManager, made some exception message improvements,
instead of popping last message, the complete message stack is thrown
cegobridge:
- Support added for cego-2.50.x
- Fixes added for modified CegoAction::getSelect and
CegoAction::getProcedure methods
- For several modules, added exception trace information to improve
error logging in case of any exception
- Patch added for CegoQueryCache::addEntry, getNumUsed added to
search loop to find appropriate slot. This avoids some needless
assignments, since used entries cannot be assigned.
- Patch added CegoQueryCache::invalidate. For main loop, a delay
has been added, to give other threads the chance to claim the lock
- Patch for CegoFunction added.
For methods getReturnType, getReturnTypeLen and evelFieldValue
the following has been added : If proc object is getting used by
useObject, the following getProcedure call must be catched for
exception to unuse the object since _pProc is stiil null and the
object so is not unused by cleanup
- Removed lockPool call in CegoAdminThread::srvExportTableSet and
srvExportTable to avoid lock timeouts during long running exports
- Made some code cleanup in CegoAdminThread ( exception consolidation )
- db thread query history information, added timestamp and cost information
- Introduces new cgadm admin commands
o queryhist last n
o queryhist cost n
to show the query history for all db threads in the db thread
pool. The last n queries or the most expensive n queries are
indicated
- Added query history suppport for cgadm screen mode
- CegoAdmScreen to fully support of query history feature
( last and full over all db threads ).
- Screen2:Grid schema patches added to satisfy new column alignment
feature for Screen2
- Fix added in CegoDBThreadPool. CegoAdminThreadPool and CegoLogThreadPool.
If database hostname is not defined, the corresponding service is served
on any hostname. This avoids confusion regarding IPv4 and IPv6 host
configuration ( e.g. on MacOSX Sequoia, java seems to
handle localhost always as IPv4 127.0.0.1, while on POSIX layer,
it is mapped to ::1, a bit strange )
- Added new lfcbase Net::serve6 method to db, admin and log threadpool.
If no hostname is defined in database xml, an IP dual stack
configuration is set up.
- cgmkdb utility script:
allows to set up advanced database parameters
- In CegoXMLSpace::addTableSeDef, added ARCHMODE attribute to
set archmode to OFF as default
- Added querycache threshold parameter. Just queries with execution
time greater than threshold value are cached. This leads to a lower
stressed cache and avoids cache latency for those queries. Threshold
is given in msec, which seems to be appropriate for now.
- Some memory leaks fixed
- fix cgadm (hang if INTR received while idle)
- Added query history for db threads. Not just the last action is
indicated via admin command "threadinfo db threadId", but also the
last n queries processed by this thread. History Length can be
configured via new cego command line option dbthreadhist
- Patch added for memory leak in CegoSelect::cleanUp and
CegoSelect::reset, for both methods, _pCacheList has to checked and
freed, since for uncompleted queries ( e.g. exists clause ) the
_pCacheList was still not deleted
- Another fix for memory leak added in CegoFieldValue::getLocalCopy,
Before allocation, _len has to be checked for _len < STATICFIELDBUF
and then use _staticBuf, otherwise, the memory is lost
lfcbase:
- patch to Screen2::Form::handleKey to treat pipe character ( | )
- patch to Screen2::Attribute::setAttrList for refresh window
after attrlist has been updated
- Change in Screen2::Attribute class.
The class now provides three layout modes : HORIZONTAL, VERTICAL, OVERLAY.
In OVERLAY mode, with left and right cursor key it is switched
to visible attribute list. For this, the Screen2::Attribute constructor
has been changed
cego:
- For CegoAdmScreen, added QueryCacheInfo to tableset menu
- daptions made for CegoAdmScreen to
handle lfcbase-1.18.8 API change for Screen2::Attribute
lfcbase:
- Added patch in Matcher.cc to support extended regular expression
(added REG_EXTENDED flag to regcomp call )
cego:
- Added dedicated admin command to show query cache information
including hit rate ( show querycache for tableset )
This will replace the querycache information shown with general
show tableset admin
command
- Added patch for memory leak in CegoSelect. Within
CegoSelect::consolidateConjunctionList method, predicate and condition
instances are created for conjunction organisation. These instances
have to be registered and freed later within CegoSelect::cleanUp
- Rework of table cache logic, which is still experimental. A table
filter now can be defined to just cache a specified subset of tables.
Since table cache is just useful for specific tables with read only
flavor and medium size, this extension seems to makes sense. Cached
table rows can be accessed directly without accessing buffer pool
pages and without decoding. This might accelerate some database
configurations, where query cache is not appropriate and hot spot
readonly tables have to access very often and very fast.
- Added patches for querycache.
The CegoQueryCache::addEntry method now is limited to
QUERYCACHE_MAXTRY tries to add an entry. Otherwise numFail
counter is increaed, which is monitored for the query cache.
This should resolve deadlocks in smoother way ( no more lock timeouts )
in case of other db thread have the requested querycache slot in use.
For performance reasons, CegoQueryCacheEntry::calcSize was introduced
to just calculate the entry size in the constructor.
- Added lockId for lock objects in CegoBufferPool and CegoQueryCache
- Fix added for CegoXPorter / CegoAdminThread / CegoBufferPool
to treat locking issue during tableset / table import.
Since the pool is locked during import ( by new introduced method
lockPool ), no further locking calls must occur during import.
For this, log writing is disabled before lockPool is called and
CegoBufferPool::logIt checks for active log ( via new isActive
method ) before trying to get a lock.
- Synchronization of tableset admin operations added with this patch.
In CegoBufferPool, new methods are provided for tableset oriented locking
( lockPool and unlockPool ) These methods are used by CegoAdminThread
to synchronize concurrent tableset admin operations
( like stop tableset, drop tableset, export tableset, e.g. )
- Indent format improvements made for select, insert and update queries.
This is relevant for formatted sql code in stored procedures.
Author: Björn Lemke <lemke@lemke-it.com>
- More stabilization added to c wrapper library.
Relocation of cpluscheck and c wrapper check to root directory.
CegoCPlusCheck and cgwtest are now build during make all
Will be used in upcoming python module to access cego.
lfcxml:
- Patch added in XMLSuite.cc to treat CDATA lookahead correctly.
Trailing square brackets ( ] ) at the end of cdata caused parsing problems
cego:
- Added missing thread lock information for admin thread list and
thread stat command ( query + table locks, logmanager locks )
- Added patches in CegoQueryCache to improve locking.
For the addEntry method, the complete locking logic was
redesigned to avoid deadlocks
Author: Björn Lemke <lemke@lemke-it.com>
Date: Sat Jun 15 13:15:23 2024 +0200
- In CegoCaseCond, added getPlanList method to retrieve execution plan
for nested selects. The planlist then is catched in CegoFactor::getPlanList
- Consolidation done for data types decimal and fixed.
This version just supports the decimal datatype which originally was
the fixed datatype. The original decimal datatype was useless.
IMPORTANT: To migrate to version 2.49, you have to xml export
the databases and rename the datatype strings "fixed" and "FIXED"
to "decimal" and "DECIMAL"
- cegobridge needs to be rebuild
- Fix in CegoAdmScreen::TableSet::TableSet constructor,
SysUsage field added to indicate correct usage
for system, temp and app files
- Patch added for transaction handling in CegoTransactionManager::doCommit
and CegoTableManager::deleteDataTableEntry.
Just for tuple state COMMITTED, a rollback entry must be created,
otherwise double tuple delete may occur.
For tuple state INSERTED, tuple state is just set to OBSOLETE,
for tuple state OBSOLETE and DELETED, nothing has to be done.
In CegoTableManager::doCommit, tuple state just has to be set
to COMMITTED in case of INSERTED tuples
- Elimination of a cout in CegoQueryCache::QueryCacheEntry::cleanCache
- Added patches for return on update handling to treat value handling
in return list. The order in the return list must be stricter,
otherwise field evaluation via FLA caching in CegoFactor fails.
- returnList has been localized ( new method CegoQueryHelper::localizeFL )
to ensure correct values after update cursor ist closed.
- Patch added in CegoProcedure::cleanup to set pMasterBlock to zero.
In some cases, the setup master block lead to usage leaks for user
function calls. See check110.sql as a sample to cause this problem.
- Patch added in CegoAdminThread::srvParameterInfo to list current
QUEUEDELAY value and configured scandal formats ( SCANDATETIMEFORMAT )
- Small patch on CegoDistManager::startTableSet,
improvement for exception message added
Author: Bjoern Lemke <lemke@lemke-it.com>
- Patch added in CegoQueryHelper::evalBetween
The comparison ( f2 <= f1 && f1 <= f3 ) has changed to
( f1 >= f2 && f1 <= f3 )
This forces a type cast to f1 datatype in case mismatched datatypes.
This might be useful for queries like
select a from v1 where a between '30.11.2023' and '31.12.2023';
where a cast should be done to date time value ( instead of string )
Author: Björn Lemke <lemke@lemke-it.com>
- Patch added in CegoQueryHelper::encodeFL and CegoQueryHelper::decodeFL.
The dim field value was still not treated.
This might lead to wrong fixed values for update operations during
crash recovery operation
Author: Björn Lemke <lemke@lemke-it.com>
- Renaming date function dateformat to scandate to reflect its
scanning function. Please note, that cegojdbc uses this
function in CegoPreparedStatement class.
- Fix in CegoXPorter for view import.
For view creation, the field entries in schema must be setup
with a unique id ( analog to view creation via sql command )
Author: Björn Lemke <lemke@lemke-it.com>
- Add patch in CegoFactor::setFieldListArray, _flaCached again is
set to false since the field list in the the array may change
( e.g. for outer join queries used in views )
- In CegoDistCursor::getTuple, the tuple retrievel has been changed
for view objects. Complicated reasons...
lfcbase:
- Patch added in Sleeper class to support larger values for milliSleep
and microSleep. For this, also input parameter type has changed from
int to unsigned long
cego:
- Patch added for CegoCaseCond::evalField to eval appropriate datatype.
If the case condition contains null type this was not done correctly
- Added patch in CegoSelect::evalSchema. At the end of the method,
schema ids are calculated to provide unique attribute ids for views
- support nested case conditions
Author: Björn Lemke <lemke@lemke-it.com>
- Fix added in CegoProcQueryStmt::execute,
after execution of the query, the cleanUp method must be called
to avoid leaks regarding stored proc object use
( this corresponds to the new optimized stored proc handling )
- Patch addd for tableset stop procedure.
With the new optimized stored procedure handling ( CegoFunction module ),
the object cleanup must be done BEFORE the tableset is finally stopped.
Otherwise an uncaught exception occurs ( tableset not online )
which results in database crash after tableset shutdown.
Several modules have been modified for this
- In CegoFunction constructors, added _pProc = 0 initialization
for decoding and fromElement constructors. This avoids a set fault,
in case of database recovery, when a predicate expression
with user function is dedoded from log file
Author: Björn Lemke <lemke@lemke-it.com>
- Performance improved for stored procedures.
In CegoFunction, the procedure handle is now stored after first
stored procedure call ( instead of freeing the handle and requesting
it again with the next call )
So for subsequent function calls, the handle is already available,
which improves stored procedure execution time significantly.
As a consequene, code has been added for cleanUp the handle at
the end of the query ( object is also in use during the whole
query with CegoDatabaseManager::useObject and must be unused by cleanup )
- Patch added in CegoFunction to avoid useObject leaks
lfcbase:
- Added scrollable feature to Screen2::Message, so longer messages can
now be handled by the panel
- improvements for Screen2:Message panel
cego:
- Added default append mode setting for tableset.
WIth cgadm the appendmode can be setup ( e.g. enable appendmode for TS1 )
It may be useful to have enabled appendmode at default for insert
intensive tableset configurations
- Fix added for CegoAdmScreen in tableset parameter panel.
Initfile was not setup correctly
( null value indicated, should be empty string )
- Changes in CegoAdmScreen::DBThread panel to show long queries
with new Screen2::Message panel
- Patch added in CegoTableManager::updateTuple,
reactivated evalExtTableReferences method call,
since this is needed for update with nested selects,
where external attributes are referenced
in combination with enabled query cache
( e.g. update t1 set a = ( select a from t2 where t1.b = t2.b ) )
lfcbase: 1.18.0 -> 1.18.3
- Opimization in Screen2 to customize screen refreshes
( introduced virtual method Panel::doRefresh )
cego: 2.48.15 -> 2.48.19
- Fix added for CegoAdmScreen, the data file root path was not added
to new datafiles in the 'tableset add datafile mask'
- Fixes added for CegoAdmScreen, to avoid too many admin requests,
backup panel and data file panel are just refreshed initially and
after add objects.
- Fix added in CegoObjectManager::alterObject, the getNewFilePage has
been changed to type CegoObject::SYSTEM. Otherwise, a page from a
tuple datafile is allocated, which results in strange effects
- Some adaptions for extended Screen2 interface with refresh customizing.
- Fixes added in CegoAction and CegoSelect to treat cego parser
with tablemanager pointer = 0.
This is needed for cegobridge to parse procedures and generated
other db specific code
- Fix added in CegoObjectManager::alterObject, after freeing old page entry,
page should be unfixed with marked as dirty. In the main loop,
unfix has been changed to dirty = false
- Added function dateformat which can be feeded with two expressions
to return a datetime value from a given format and value string (
analog to date(x,y) which expects constant input values )
- Added more date functions to the datefunc package. Now there are
the following date functions available
int second(datetime d)
int minute(datetime d)
int hour(datetime d)
int day(datetime d)
int month(datetime d)
int year(datetime d)
datetime plusHour(datetime d, int hr)
datetime plusDay(datetime d, int dy)
datetime plusMonth(datetime d, int mt)
datetime plusYear(datetime d, int yr)
datetime minusHour(datetime d, int hr)
datetime minusDay(datetime d, int dy)
datetime minusMonth(datetime d, int mt)
datetime minusYear(datetime d, int yr)
- In CegoMain, added DEFAULTDATETIMEFORMAT1 to dateFormat list to
also parse this format for native cast from string to datetime
- Added Query Cache menu to CegoAdmScreen to manage query cache parameters
- Fix for some geometries in Screen::showFormBox
- Further improvements for Screen::showFormBox and showInfoBox
( selected rows and newline treatment )
- integrate Screen2 interface
databases/cego: update 2.48.2 -> 2.48.10
- Introduced Backup branch id for online backup verification. Due
to datafile page id constraints, just online backups can be recovered
inside one backup branch. Creation of a tableset and adding a
datafile to a tableset violates this contraint, so a new backup
branch is created.
- Added backup branch option for backup manager. So just valid
backup files can be treated by the manager. New sample backup manager
available in samples/chkdb
- Further improvements for cgadm screen mode. confirm dialogs added
and backup log history indicated for online backups in case of errors
- More improvements for online backup / restore. Branch id is now
added to archive log filename, so in case of new created or data
file modified tablesets, the corresponding logfiles can be filtered.
Archive logfile information for ready-for-archive and archived
logfiles has been added to archive log information
- Fixes added in CegoClient for dump mode. Some attribute and
attribute values have not treated correctly ( default values,
dimension for fixed attributes, clob values )
- Fixes added for CegoClient dump and batch mode, has been tested
with more complex acc application
- Introduced grace mode for graceful object creation. Using this
mode, views and procedures can refer to objects, which still not
exist. This mode might be useful for initial loads ( e.g. from a
dump file ) to avoid dependency errors
- Fix for CegoSelect::nextTuple, _cacheSchema was not setup for
union selects in case of empty result of the first union entry.
This leads to an exception with cache claim leak. The claim leak
has also been fixed by adding a cleanUp call to CegoSelect destructor
- Fix added in CegoAction::execViewCreate(), in case of grace mode,
empty schema must be stored with created view to force recompile
via CegoDistManager::reloadView
- Added defTabSetId parameter to several toChain methods to write
views, procedures and triggers without explizit tableset references.
This might be useful, if a tableset dump just references objects
for a single tableset and it should be loaded to a tableset with a
different name. ( e.g. select a from t1@TS1 is written as select a
from t1, if active tableset is TS1 )
- Fixes added for alias object usage ( e.g. in combination with views )
- Added lfcbase Screen2 support to CegoAdmScreen
databases/cegobridge: update 1.6.2 -> 1.6.3
- Build fixes added
Author: Björn Lemke <lemke@lemke-it.com>
lfcbase:
- Improvements done for ncurses based Monitor class.
Added confirm box and improved form box
- many changed have been made to Screen class ( was Monitor ).
The changes require a recompile for consuming packages ( here : cego )
- Improvements done for Screen::showFormBox ( scrolling content in input mask )
cego:
- Fix added in CegoFactor and CegoFieldValue.
To get the factor id for query cache management, a dedicated
method was introduced in CegoFieldValue ( getId ) This method
uses for DATETIME values valAsChain(true) ( to evaluate current
timestamp in case of sysdate values ) and for all others toChain()
( to distinguish x = null and x = 'null' )
- Fix in CegoFunction::getId, the GETCOUNT function still was not
treated
- Some cleanup of source file was done (removed tilde files)
- Added join optimization fix in CegoSelect::buildJoinTables.
Inadequate predicates ( e.g. not equal compare ) are not priorized
for table join order any more. For this the method
CegoPredDesc::prioOnJoin has been introduced
- Grammar fix in Cego.def to ensure _returnOnFirst variable
is set to false for non return update statements
( added production NoUpdateReturnOpt )
- Fix added in CegoTableManager::updateTuple,
for the given expression list, contained subqueries must be
retrieved and analyzed for external table references.
Since the external count was not evaluated correctly, this led
to a incomplete CegoSelect::getQueryId result.
With enabled query cache, the following update did not work correct:
UPDATE posrule pr SET artid =
( SELECT artid FROM article a WHERE a.artnr = pr.artnr );
- Fix added in CegoXMLSpace for user and role create routines.
In case of already defined entities, exception was thrown
before xml lock release
Fix added in CegoXMLSpace::getActiveTableSet to also retrieve
offline tablesets via includeOffline flag.
This is needed for CegoLogThreadPool to archive occupied logfiles
for tablesets in status offline ( for other reasons, runstate is
set now at the beginning of the tableset stop procedure )
- many changes made in CegoAdmScreen class ( was CegoAdmMon )
Several stabilization fixes also have been added. For database
xml file, a unique database id has been introduced to validate
ticket file from performed online backups ( db id must match )
- Small adaptions for cgadm screen mode window sizes
( corresponds to lfcbase-1.17.2 )
Fix added in CegoTableManager::alterDataTable, the altering table
object has to be retrieved completely via getObject to setup
data page id and last data page id. With the new introduced
object manager method alterObject, these values
are not copied during the alter procedure.
Fix in CegoObjectManager for alterTableObject.
If a new system page has to be allocated, this page was not linked.
This might lead to loss table objects for corresponding altering
queries. Furthermore, the ObjectManager has been cleaned up and
reduced in code size in such a way that generic create and alter
methods are now provided for all objects
( createObject and alterObject using encoding method inherited from
CegoDecodableObject ). This results in less code, since the create/alter
operations are just implemented once.
lfcbase:
- Added new method BigDecimal::scaleTo to change scaling for an instance.
This includes an appropriate rounding, if scaling is reduced
cego:
- In CegoFieldValue::castTo, cast from varchar to fixed is done
now with newly introduced BigDecimal::scaleTo method
This includes an appropriate rounding in case of precision reduction.
- Fix in CegoCaseCondition to allow null types in condition
see dbcheck/check106.sql for a sample
Commit b7f05445c0 has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.
There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.
The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.
Approved by: portmgr (tcberner)
lfcbase:
- Fix in BigDecimal::operator ==, if _val, _scale and _isPositive
do not match, we still have to call further checks
cego:
- Fix in CegoProcBlock::toChain, dimension has still not been
treated for fixed procedure variables
lfcbase:
- Fix added for BigDecimal to avoid rounding for zero trailing values,
e.g. 119.00 / 100.00 was 1.1, should be 1.19
cego:
- Added small patch for verification check to meet new BigDecimal patch
in lfcbase
- Replaced Chain("") with Chain() for several. This was motivated by
an observed bug for check constraint xml import, where a comparision
between Chain() and Chain("") returned false
- Fix in CegoFunction::evalFieldValue for case REPLACE. If replace
string is null, then empty string is replaced instead of "null"
string.
Author: Björn Lemke <lemke@lemke-it.com>
- Fix in CegoFunction::clone, also if _exprList is empty, the function
must treated and cloned completely including table manager reference.
Otherwise, for user defined function with no arguments which are used
in views will throw an exception
- Change in CegoJDBCInfo for table list retrievel. This JDBC meta
information command is not split to tab and vie for dedicated
retrievel of table and view objects
- More work has been done regarding clean shutdown of the
database / tableset stop while busy db sessions still exist.
For this, CegoDistCursr desctructor method has been stabilized,
so no exception is thrown. Otherwise, double memory freeing of
cursor resources might occur which results in a crash
- In CegoTableManager::stopTableset, relocated the setTableSetRunState
method above and added a sleep of DBM_LOCKDELAY. This gives hanging
db threads a chance, to terminate save
- Changed CegoDatabaseManager::useObject method to take pointer to
CegoTableManager as an argument instead of threadId. The tablemanager
is used to support thread termination in case of lock delays
- Fix in CegoTableManager::createBTree to catch exclusicve useObject
timeout before committing btree. In this case, the already created
btree object should be deleted. Fix added in CegoClient to active
abort interrupt also during tuple fetch
- Added function getcount to retrieve current counter value for
a specific counter
- Fix in CegoLogManager::stopLog, the log handle must NOT be deleted,
otherwise, a subsequent startLog and logAction method will result
in a dump. This effect has been observed while importing a single
table ( via xml import ) which failed, if the table already exists.
In this case, no checkpoint is written and log handle i no more
valid. A subsequent modifying db request then results in a core
dump.
- Fix in CegoAttrComp for equal, lt and gt operators.
The compMode ATTR was not treated correctly in a way, that the
attrDesc part was not evaluated. This might lead to missing attr
cond entries for sophisticated queries.
A verify check ( verify008 ) has been added to check this case
Author: Björn Lemke <lemke@lemke-it.com>