Commit Graph

310 Commits

Author SHA1 Message Date
Björn Lemke b76b5eb901 databases/cego: 2.48.14 -> 2.48.15
- 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
2023-01-26 20:07:17 +01:00
Björn Lemke 314ad8b61a databases/cego: 2.48.10 -> 2.48.14
- 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
2023-01-24 11:49:11 +01:00
Björn Lemke c4bd711217 devel/lfcbase: update 1.17.2 -> 1.18.0
- 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>
2023-01-03 13:31:35 +01:00
Björn Lemke 68b2a25ae0 devel/lfcbase: update 1.16.6 -> 1.17.2, databases/cego: 2.47.31 -> 2.48.2
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 )
2022-11-18 20:23:16 +01:00
Björn Lemke fcbe84c2b4 databases/cego: 2.47.30 -> 2.47.31
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.
2022-09-23 16:42:38 +02:00
Björn Lemke 35129a4e7c databases/cego: 2.47.29 -> 2.47.30
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.
2022-09-23 10:53:41 +02:00
Björn Lemke 3da7b52173 devel/lfcbase,databases/cego: update 1.16.5 -> 1.16.6, 2.47.27 -> 2.47.29
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
2022-09-22 14:56:32 +02:00
Stefan Eßer fb16dfecae Remove WWW entries moved into port Makefiles
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)
2022-09-07 23:58:51 +02:00
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
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)
2022-09-07 23:10:59 +02:00
Björn Lemke 71e17812c2 devel/lfcbase,databases/cego: update 1.16.4 -> 1.16.5, 2.47.26 -> 2.47.27
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
2022-08-16 16:23:22 +02:00
Björn Lemke 83aad88a39 databases/cego: update 2.47.25 -> 2.47.26
- In CegoFieldValue, completed appropriate rounding via cast for
  decimal types to integer types
2022-07-10 10:30:14 +02:00
Björn Lemke 0ccb79496b devel/lfcbase: 1.16.3 -> 1.16.4, databases/cego: 2.47.24 -> 2.47.25
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
2022-07-09 16:22:06 +02:00
Björn Lemke 4c310a05f3 databases/cego: update 2.47.22 -> 2.47.24
- 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>
2022-06-13 11:25:23 +02:00
Björn Lemke 4c4ce8d385 databases/cego: upgrade 2.47.16 -> 2.47.22
- 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.
2022-02-20 14:03:57 +01:00
Björn Lemke fcd7f34fbe databases/cego: update 2.47.14 -> 2.47.16
- 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>
2022-01-16 21:56:39 +01:00
Björn Lemke 414c5d54aa databases/cego: update 2.47.13 -> 2.47.14
- In CegoDistManager::startTableset the method setCurrentLSN
  has to be called before registerObjects since this method
  might also trigger checkpoints
2022-01-05 16:43:26 +01:00
Björn Lemke b9cb61848a databases/cego: update 2.47.11 -> 2.47.13
- Fix in CegoDistManager::renameLocalObject, before renaming the object,
  it has to be checked, if the new object name is already in use
- Fix in CegoXPorter::readIndexObject, index schema expects tablename
  instead of indexname.
  As a result binary and plain imports with index objects have failed.
2022-01-04 20:33:23 +01:00
Björn Lemke 8da598cd7b databases/cego: 2.47.7 -> 2.47.11
- Fix in CegoDistManager::startTableSet, the current lsn has
  to be setup before performing the cleanup option. cleanup uses
  bufferFix which might result in a checkpoint. For this the current
  lsn has to be setup
- In CegoQuery, added execSchema which is copied for each execution
  call from _schema ( to have a virgin schema definition ). The
  execSchema then is enriched in the appropriate way. For the insert
  query, an addExprList variable was decleare to store the addition
  needed expression to complete the insert value list ( instead of
  adding it to _exprListArray ). After performing the query, the
  allocated and inserted expression have to be deleted. This
  implementation seems to be more useful for procedure based queries,
  where the intiantiated CegoQuery object is executed multiple times
- In CegoDistManager, reload message for views, procedure and trigger
  is avoided now ( since this occurs for each db thread during startup )
- In CegoAttrComp::setup(ListT** pJoinBuf, int offset) the _isSetup
  flag was not set to true for the posSetup case. This might lead to
  invalid error message. See https://www.lemke-it.com/litexec?request=pubnews
  for details
- Fix in CegoGroupSpace::getValueForAgg, The return value
  ( of type CegoFieldValue ) must be converted to a local copy,
  since the reference to the bufferpool might be invalidated
2021-12-23 16:47:08 +01:00
Björn Lemke 6da2ac6908 databases/cego: update 2.47.6 -> 2.47.7
- Added format correction in CegoField::castTo for case VARCHAR to
  FIXED. In case of string values without leading zeros ( e.g. .345),
  leading zero is concated.

Author:    Björn Lemke <lemke@lemke-it.com>
2021-10-10 21:16:41 +02:00
Björn Lemke 5aa5b648b1 databases/cego: update 2.47.3 -> 2.47.6 and devel/lfcbase: 1.16.1 -> 1.16.2
lfcbase:
- Added HashT::getRangePos and HashT::RemovePos for more efficient
  hash array manipulation

cego:
- Fix in CegoQueryCacheEntry::cleanCache, reset of all relevant
  variables. Furthermore, in CegoQueryCache methods, remove from
  hasharray is checked for return code true
- Usage of new HashT methods ( getRangePos and RemovePos ) for
  CegoQueryCache to remove entries from query cache array more efficient
- Fix in CegoFactor::evalFieldValue(), for case CegoFactor::QUERY,
  the fetched value must be saved to a local copy, otherwise the
  buffer could be overwritten by the subsequent nextTuple method call
  to complete the query for query cache. As a result, wrong values
  are returned in case of heavy buffer cache relocation.
2021-07-04 09:48:24 +02:00
Bjoern Lemke 64b9e0376f databases/cego: update 2.47.2 -> 2.47.3
- New generated parsers ( Cego.def and CegoAdm.def ) with dragon 1.5.5
2021-06-06 13:47:45 +02:00
Bjoern Lemke 6794ce73f1 databases/cegobridge: update 1.6.0 -> 1.6.1
Also update databases/cego: update 2.47.1 -> 2.47.2

cego:
- Fix in CegoQueryHelper::checkIndexForPredicate, wrong tabSetId
  was used for getObjectListByTable, must be table specific

cegobridge:
- In method void MySQLAction::storeVarcharType, dimension value was
  doubled, since MySQL calculates visible length for varchars and
  cego length in bytes. So for multibyte character encodings, length
  might exceed ...
2021-05-24 09:24:30 +02:00
Bjoern Lemke ec39a11846 databases/cego: update 2.47.0 -> 2.47.1
- Rework of new hash array based query cache.
  The new introduced methods HashT::FirstInRange and HashT::NextInRange
  are used to find an appropriate hash array slot to replace entries
  in an occupied array.
- Added cego command line mode setpwd to setup user password
  for offline database
2021-05-23 23:24:19 +02:00
Mathieu Arnold cf118ccf87 One more small cleanup, forgotten yesterday.
Reported by:	lwhsu
2021-04-07 10:09:01 +02:00
Mathieu Arnold 305f148f48 Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
Kurt Jaeger e77e9f0aec devel/lfcbase: update 1.15.1 -> 1.16.0
databases/cego: update 2.46.8 -> 2.47.0

lfcbase:
- Introduction of template class HashT

cego:
- Integration of HashT into QueryCache for faster access of cached
  query entries
- Fix in CegoClient and CegoAction for comment parsing. Comment token
  in string are treated now. For this, a new method
  CegoQueryHelper::skipComment has been introduced
- Improvements done for query cache handling
  ( more support for nested queries, stabilization fixes )

Submitted by:	Björn Lemke <lemke@lemke-it.com>
2021-02-21 19:14:36 +00:00
Kurt Jaeger b415d7be68 databases/cego: update 2.46.7 -> 2.46.8
- Removed log entry in CegoDatabaseManager::checkTableSetRunState

Submitted by:	Björn Lemke <lemke@lemke-it.com>
2021-02-01 15:37:30 +00:00
Kurt Jaeger e82a74356c databases/cego: update 2.46.6 -> 2.46.7
- Added fix in CegoTableManager::createBTree
  For btree value extraction, we also have to use
  valueFromSchema(tableSchema, btreeSchema)
  Otherwise, in case if inverted index attributes, the values are
  not extraced correctly
  Example:
  create table t1 ( a int, b string(10));
  insert into t1 values ( 1, 'alpha');
  create btree b1 on t1(b,a); -- inverted, value for a would be
				 not setup correctly

Submitted by:	Björn Lemke <lemke@lemke-it.com>
2021-01-29 19:37:30 +00:00
Kurt Jaeger d9808c3192 databases/cego: 2.46.5 -> 2.46.6
- Fix in CegoObjectManager / CegoDatabaseManager added.
  The checkTableSetRunState method has been moved to CegoDatabaseManager.
  This ensures a single point of check definition.
  In the previous version, tableset RECOVERY mode was not treated for
  useObject, unuseObject and objectExists method calls which might lead to
  crash recovery abort.

Submitted by:	Björn Lemke <lemke@lemke-it.com>
2021-01-24 10:01:31 +00:00
Kurt Jaeger 09e959e844 databases/cego: update 2.46.0 -> 2.46.5
- Fix in CegoExpr::evalField, fixed dimension was still not handled
  here for ADD and SUB cases
- Added error msg improvement in CegoProcBlock
- Added MAXDELETEPAGE parameter to show parameter admin command
- set default checkpoint value for new defined tablesets
- added function check in CegoFunction::evalFieldValue to ensure, this is
  not a procedure without return value
- Fix in CegoTableManager for table altering. No type conversion
  allowed with alter modify and no length shrinking

Submitted by:	Björn Lemke <lemke@lemke-it.com>
2020-12-05 20:24:59 +00:00
Kurt Jaeger 609b3ea635 devel/lfcbase: update 1.14.6 -> 1.15.0
devel/lfcxml: update 1.2.11 -> 1.3.0
databases/cego: update 2.45.35 -> 2.46.0
databases/cegobridge: update 1.5.4 -> 1.6.0

Please note: database updates from 2.45.x to version 2.46.x require
a xml tableset export and import, since table structure information
has been changed!

lfcbase:
- Added template class GraphT for dependency graph implementations
- Fix in BigInteger::mul and BigInteger::div, signing was not treated
  ( e.g. -12 * 12 => -144 ( was 144 ) )

lfcxml: get in sync with lfcbase

cego:
- Added fix in CegoViewObject::getId. Since it cannot be decided,
  if the underlying query result has been changed, we have to
  throw MOD_QUERY_ID
- Another query cache fix in CegoFunction:getId, rand and liob
  functions have been added to throw MOD_QUERY_ID exception, since
  for those function it can not be ad hoc decided, if the result is
  modified
- Added type dimension information for CegoField class. This enables the
  database to define length and dim information for fixed and decimal
  data types. For this the syntax has been expanded. Instead of storing
  RESERVED_BTREE_FLOATLEN for btrees on fixed or decimal columns,
  the specified length information is used now.

Submitted by:	Björn Lemke <lemke@lemke-it.com>
2020-11-28 19:28:21 +00:00
Kurt Jaeger 9168a83626 databases/cego: update 2.45.34 -> 2.45.35
- Added noinit option to cgadm tableset start command. With the
  noinit option, the configured init file will not be processed after
  tableset startup, otherwise this will be processed now ( if any
  configured ) All output messages are written to main log file.
- Redirected output for CegoAction and CegoOutput added to print output
  to logfile. This is useful in case of tableset init file, where
  several SQL action could be performed
- Fix in CegoAction::execSetCounter, new value must be checked for
  null value and if so, set counter to 0. The bug caused a seg fault ..

Submitted by:	Björn Lemke <lemke@lemke-it.com>
2020-11-18 17:01:47 +00:00
Kurt Jaeger 71d21a7de3 databases/cego: update 2.45.32 -> 2.45.34
- Improved runstate handling in CegoDistManager
- Further fix in CegoPredDesc::getFieldList, case CegoPredDesc::NULLCOMP,
  getFieldList method call added for pExpr1,
  in CegoPredDesc::setFieldListArray method calls added for
  _pC and _pNotPred. For this, setFieldListArray method has been
  introduced in CegoCondDesc. This fixes should complete case
  cond handling e.g. for aggregation queries.
  check097 has been expanded for this

Submitted by:	Björn Lemke <lemke@lemke-it.com>
2020-11-17 20:22:20 +00:00
Kurt Jaeger e136c722de databases/cego: 2.45.31 -> 2.45.32
- CegoObjectManager has been modified to check tableset run state
  for several methods. For this, method
  CegoObjectManager::checkTableSetRunState has been introduced.
- Added check in CegoDatabaseManager::objectExists to verify, if
  corresponding tableset is online. So instead of "invalid object"
  exception, a tableset offline exception is thrown, which might be
  more useful

Submitted by:	Björn Lemke <lemke@lemke-it.com>
2020-11-16 21:15:56 +00:00
Kurt Jaeger 0bdc9bea2d databases/cego: update 2.45.28 -> 2.45.31
- Added case-cond support for aggregation queries
- Fix in CegoCaseCond::evalField, all expression are evaluated now
  and are checked for type mismatch. Expressions must return the same
  type, otherwise this might lead to value evaluation problems. This
  fix also leads to fix in CegoFieldValue::getDim() and CegoFactor::evalField
  since now getDim ist used for field length specification which is
  also compared by CegoCaseCond::evalField

Submitted by:	Björn Lemke <lemke@lemke-it.com>
2020-11-14 15:46:09 +00:00
Kurt Jaeger b0d2a99bf4 databases/cego: update 2.45.25 -> 2.45.28
- Fix in CegoTableManager::insertDataTable, before call
  getObjectListByTable, type must be checked ( must be CegoObject::TABLE
  ), otherwise ( for system objects ) not found exception arises.
  This error may appear with the admin commands begin backup and end
  back ( stat information is written to bustat system table )
- Added format fix to CegoAction::formatTableInfo, to treat very
  long object names, max name length of all corresponding objects is
  now calculated and output is printed in appropriate format
- Change in CegoAction::execProcCall and CegoAction::execFuncCall,
  procedure/function arguments are evaluated and cast in this methods
  now. This is needed, to support string to clob casting for procedure
  arguments. As a consequence the CegoProcedure::execute method has
  been changed to receive ListT instead of ListT.

Submitted by:	Björn Lemke <lemke@lemke-it.com>
2020-10-25 20:53:43 +00:00
Kurt Jaeger 39b2eac7fd databases/cego: update 2.45.23 -> 2.45.25
- Typo fix in CegoTerm::evalField and CegoExpr::evalField
- More rework on CegoFieldValue for improved cast handling
  ( especially on fixed values )

Submitted by:	Björn Lemke <lemke@lemke-it.com>
2020-09-18 08:01:37 +00:00
Kurt Jaeger 22dc689e9d devel/lfcxml: update 1.2.10 -> 1.2.11
databases/cego: update 2.45.19 -> 2.45.23

lfcxml:
- Sync patch for MinGW package build

cego:
- Fix in CegoFieldValue::castTo, case VARCHAR_TYPE to FIXED_TYPE,
  plain integers have not been accepted. check091 added for this
- Fix in CegoTerm::evalField and CegoExpr::evalField, type and
  length calculation must correspond to cast logic in CegoFieldValue
  ( corresponding operators for mul, div, add and sub )
- Fix in CegoProcVar::setValue, a castTo has been added to cast to
  appropriate target type

Submitted by:	Björn Lemke <lemke@lemke-it.com>
2020-09-17 07:25:44 +00:00
Kurt Jaeger a6bb5b064d databases/cego: update 2.45.18 -> 2.45.19
- Fix in CegoAction::insertArg to check for duplicate attribute
  specification in insert statement, e.g.
  INSERT INTO t1 ( a, a ) VALUES ...

Submitted by:	Björn Lemke <lemke@lemke-it.com>
2020-08-25 09:16:16 +00:00
Kurt Jaeger 48400fa4e6 databases/cego: 2.45.16 -> 2.45.18
- Fix in CegoClient for treating interactive input. Ctl-D input
  lead to segmentation fault, if used in multiline statements.
- Patch in CegoAction::formatTableInfo. For size calculation of
  btree objects, null value must be used instead of INVALID, otherwise,
  wrong values are indicated during btree build
- Patch in CegoLogManager::switchLogFile, we first have to switch log
  file and then change the status to OCCUPIED. Otherwise, the logfile
   archiver ( CegoLogThreadPool::shiftRedoLogs ) might access occupied
  logfile in parallel. Since this is a different thread and File::open
  seems to be not thread safe, bad things might happen ...

Submitted by:	Bjoern Lemke <lemke@lemke-it.com>
2020-08-14 07:20:38 +00:00
Kurt Jaeger 171f1701a1 databases/cego: update 2.45.9 -> 2.45.16
- Fix in CegoBtreeManager for duplicate null handling. The corresponding
  btree value has to be checked to be null. For this, the method
  CegoBTreeValue::isNull has been introduced
- Fix in CegoFieldValue::negate, for FIXED_TYPE values, trailing
  zeros have to be treated. Otherwise, select null - a from t1 where
  a = 0.10 will result in 0.1
- Patch in 'update with return' clause. It seems to be useful, that
  in combination with return, update should return after first matching
  tuple providing the updated tuple in the return clause. So the
  values for the tuple can be stored in procedure variables.
  create table t1 ( a int, b string(30));
  insert into t1 values ( 1, 'DONE');
  insert into t1 values ( 2, 'DONE');
  insert into t1 values ( 3, 'WAIT');
  insert into t1 values ( 4, 'DONE');
  insert into t1 values ( 5, 'WAIT');
  update t1 set b = 'DONE' where b = 'WAIT' return :a = a;
  Just the tuple with a = 3 is update and the value of a is returned
  in the procedure variable :a
- For update with return statements, added the on first option.
  Since the return variable can only store one return values, this
  option specifies, if the update should return after first tuple or
  if all matching tuples should be updated.
- In CegoMain, changed separator token for tsdef from ":;" to "=",
  since for mingw configurations, absolute path handling was broken.
  This resulted in adapations for mkdb and cgmkdb scripts.
- Fix in CegoObjectManager::getObjectListByTable, if object does
  not exist, an exception is thrown now.
  This resulted in a fix for CegoQueryHelper::checkIndexForPredicate,
  where now the table alias has to be mapped to the correct physical
  table name ( via coList as a new method argument )
- Fix in CegoAttrDesc::evalTableReferences to treat alias objects in joins
- Grammar expansion to support inner/left outer/right outer joins
  without a condition. This might be useful for specific join order
  to use appropriate table indices ( see dbcheck/check088.sql )
- Fix in CegoQueryHelper::checkIndexForPredicate, index evaluation
  for alias objects was still not treated
- Fix in CegoDistCursor::getPlan and CegoAction::getJoinPlanString
  to cover execution plan for alias objects

Submitted by:	Björn Lemke <lemke@lemke-it.com>
2020-06-05 18:05:04 +00:00
Kurt Jaeger 869f37c434 databases/cego: upgrade 2.45.8 -> 2.45.9
- Fix in CegoBTreeManager, the allowDuplicateNull flag was not
  treated any more. The duplicate handling has been moved from
  CegoBtreeNode to CegoBtreeManager

Submitted by:	Bjoern Lemke <lemke@lemke-it.com>
2019-12-01 20:16:59 +00:00
Kurt Jaeger 9791df5e18 databases/cego: upgrade 2.45.6 -> 2.45.8
- Fix in CegoSelect::setVIewCond, a view condition id has to be
  calculated which is later used for getQueryId(). Otherwise, wrong
  query cache entries are used in case of views with outer conditions
- Added method CegoBTreeNode::verifyLeafFull for full btree
  verification in a sense, that each btree value is compared with the
  corresponding table data entry via datapointer reference
- Improvement in CegoAdmAction for input handling. Used the same
  methods for nextChar and friends as in CegoAction
- In CegoXMLSpace, changed access methods for mediator, primary and
  secondary in a way, that the default value ist the current hostname.
  In this case, no attribute values are set up. This reduces complexity
  and avoids to change the entries manually, if the hostname changes
  (do not edit the database xml without any deeper knowledge).

Submitted by:	Bjoern Lemke <lemke@lemke-it.com>
2019-11-24 17:29:30 +00:00
Kurt Jaeger 3419f9eb05 devel/lfcbase: upgrade 1.14.0 -> 1.14.2
databases/cego: upgrade 2.45.5 -> 2.45.6

lfcbase:
- In configure.ac added check for darwin. This is required, since
  for File::flush implemention, darwin rather requires a fcntl call
  with option F_FULLFSYNC instead of fsync ( see OSX man page for
  fsync )

cego:
- Added command line option --fsync to enable physical disk synchronisation
  for logging and checkpointing. This options slows down database
  significantly but ensures consistent data in case of an operating
  system crash

Submitted by:	Bjoern Lemke <lemke@lemke-it.com>
2019-08-18 17:22:44 +00:00
Kurt Jaeger eda6267601 databases/cego: upgrade 2.45.1 -> 2.45.5
- Fix in CegoQuery::execute for INSERTBYSELECT_QUERY case.
  Since the selected tuples are clustered ( MAX_CLUSTERED_INSERT) we have
  to create a local copy for the corresponding field values.
  Otherwise, tuple information could be invalidated by relocated
  buffer pool pages
- Fix in CegoFieldValue::fastComp, the castTo method calls for t1
  and t2 have to be switched, since first ist has to be checked to
  cast to native btree datatype ( used in CegoBTreeCursor::traceLog,
  inRange and fullMatch )
  example:
  create table t1 ( a int, d datetime);
  create btree b1 on t1(b);
  select a from t1 where b = '12.07.2019'; -- should be casted
					   -- from string to datetime
- Code cleanup to avoid warnings with -Wswitch-enum
- In CegoClient, added input data check via File::hasData ( available
  with lfcbase 1.14.0 ). Now, pipe input is autodetected, so the
  command line argument "--pipe" has been removed

Submitted by:	Bjoern Lemke <lemke@lemke-it.com>
2019-07-14 07:48:01 +00:00
Kurt Jaeger b726fe6f4e databases/cego: upgrade 2.45.0 -> 2.45.1
- Treated alias insert queries with empty schema, e.g.
  insert into a1 values ( 1, 'XXX');
- Some patches added for alias management to allow alias defintions
  as a subset of the original table, e.g.
  create table t1 ( a int, b string(10), c string(30))
  create alias a1 on t1 ( a as ax, b as bx);
  This has required some fixes in CegoAliasObject::mapSchema and
  CegoQueryHelper::mapFLA

Submitted by:	Bjoern Lemke <lemke@lemke-it.com>
2019-07-07 08:53:28 +00:00
Kurt Jaeger 4da64c0c27 databases/cego: upgrade 2.44.14 -> 2.45.0
- Added table alias feature to grammar definition. Table aliases
  allow alternate table name and attribute name definitions for a
  table ( create alias ... )
- Added classes CegoAliasObject and CegoAttrAlias for table alias handling
- Implemented base semantic actions for creating, listing and
  describe alias objects ( still no usage )
- In CegoDistManager::registerObjects, added registration for fkey,
  check, trigger and alias
- Added alias mapping for insert, update and delete queries (
  CegoQueryHelper::mapAliasPredicate still to implement )
- Basic alias mapping for select works, here's a sample SQL script
  drop if exists table t1;
  list alias;
  desc alias a1;
  drop if exists alias a1;
  create table t1 ( a int, b string(30));
  create alias a1 on t1 ( a as ax, b as bx );
  insert into a1 ( ax, bx ) values ( 1, 'XXX');
  insert into a1 ( ax, bx ) values ( 2, 'YYY');
  insert into a1 ( ax, bx ) values ( 3, 'ZZZ');
  select ax from a1;
- More work on table alias handling. Now works with more sophisticated
  select queries ( e.g. select ax from a1 aa where aa.ax = 1; ) For
  this, some fixes had to be done in CegoContentObject, since the the
  table alias attribute ( _tabAlias ) was not setup in constructor
  and other methods
- Added alias and trigger xml export and import feature ( trigger
  xport was still not implemented ) Fix in CegoDbThread::loadObjects
  for trigger reload, instead of triggerList.Next(), triggerList.First()
  was called, which result in an infinite loop in case of existing
  trigger objects
- Added trigger and alias object handling to CegoXPorter binary
  export and import

Submitted by:	Bjoern Lemke <lemke@lemke-it.com>
2019-07-04 19:13:00 +00:00
Kurt Jaeger 4978cb9f3d databases/cego: upgrade 2.44.13 -> 2.44.14
- Some improved exception handling in CegoTableManager::checkIntegrity
  ( more detail information about violated object )
- Code cleanup CegoTableManager, drop/create/alter operations inside
  a transaction no more allowed

Submitted by:	Bjoern Lemke <lemke@lemke-it.com>
2019-06-19 11:57:35 +00:00
Kurt Jaeger c2c7c8a20d databases/cego: upgrade 2.44.12 -> 2.44.13
- Further recovery fix in CegoTableManager::insertDataTable In case
  of an insert exception ( e.g. duplicate pkey ), a checkpoint is
  forced now after deleteData to ensure file consistency
  In CegoObjectManager::insertPageData a second checkpoint is forced
  after data copy, if a previous checkpoint has occured. Otherwise
  this insert might be ignored during recovery because of lower LSN
- Fix in CegoBTreeManager::checkDuplicate, the check for uflag (
  returned CegoBTreeNode::valueExists ) to check for high value is
  not enough if, entries have been deleted from node.
  Instead, all subsequent pages have to be checked until a value higher is found
- Introduced CegoBufferPool::getCPCount() to return to current
  checkpoint count. This method is used by CegoTableManager,
  CegoObjectManager and CegoTransactionManager to decide, if a
  consitency checkpoint is required
- Version passed checkCrashRecovery with the following parameters
    NUMRUN=100
    DOTRANSACTION=-dotransaction
    ARANGE=10000
    AINTERVAL=500
    ACOUNT=30000
    PRIMARY=primary
    POOLSIZE=191
  All relevant checkpoint situations have been observed over all run

Submitted by:	Bjoern Lemke <lemke@lemke-it.com>
2019-05-14 05:23:19 +00:00
Kurt Jaeger 90d277c9ca databases/cego: upgrade 2.44.11 -> 2.44.12
- Fix added in CegoTransactionManager::commitUpdate, btree must be
  inserted with insertBTreeWithCommit
- Fix added in CegoTransactionManager::getCrashAffectedTables,
  schema entry must be searched with Find(CegoField(Chain(),
  SYS_RB_TABLE))

Submitted by:	Bjoern Lemke <lemke@lemke-it.com>
2019-05-11 07:44:38 +00:00