2019-04-11 17:23 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/dbinfo.ch
* src/rdd/dbf1.c
+ added DB_SETHEADER_EOL flag, it's used to force setting EOL marker
when header is written. In Harbour's DBF* RDDs is set in CLOSE()
method so just like in Clipper when DBF is closed and header has to
be updated the EOL() marker is set.
As side effect reducing header updates to minimal level (in such
case DBF header is not updated after APPEND what is safe for Harbour,
Clipper and compatible RDDs because they use file size to calculate
number of records but some other DBF drivers may be confused)
increase the APPEND speed and also forces EOL setting in all cases
when CLOSE() method is called. Header updates can be reduce to minimal
level by:
hb_rddInfo( RDDI_SETHEADER, DB_SETHEADER_MINIMAL )
* src/rdd/usrrdd/usrrdd.c
! fixed GPF in UsrRDD redirector for DROP(), EXISTS() and RENAME() methods
* src/vm/cmdarg.c
* use HB_MEM_STATISTICS instead of HB_MEM_USEDMAX to check if memory
statistic module is enabled in //info message
This commit is contained in:
@@ -390,12 +390,14 @@
|
||||
#endif
|
||||
|
||||
/* DBF HEADER UPDATING */
|
||||
#define DB_SETHEADER_CLOSE 0 /* update in CLOSE method - it always happens if necessary */
|
||||
#define DB_SETHEADER_COMMIT 1 /* update in FLUSH method */
|
||||
#define DB_SETHEADER_WRITE 2 /* update in GOCOLD method */
|
||||
#define DB_SETHEADER_APPEND 0 /* record append sets update header flag (always enabled) */
|
||||
#define DB_SETHEADER_REPLACE 4 /* record modification sets update header flag */
|
||||
#define DB_SETHEADER_YYEAR 16 /* store year() % 100 instead of year - 1900, FoxPro compatibility */
|
||||
#define DB_SETHEADER_CLOSE 0x00 /* update in CLOSE method - it always happens if necessary */
|
||||
#define DB_SETHEADER_COMMIT 0x01 /* update in FLUSH method */
|
||||
#define DB_SETHEADER_WRITE 0x02 /* update in GOCOLD method */
|
||||
#define DB_SETHEADER_APPEND 0x00 /* record append sets update header flag (always enabled) */
|
||||
#define DB_SETHEADER_REPLACE 0x04 /* record modification sets update header flag */
|
||||
#define DB_SETHEADER_YYEAR 0x10 /* store year() % 100 instead of year - 1900, FoxPro compatibility */
|
||||
#define DB_SETHEADER_EOL 0x20 /* set EOL when header is written, enabled in CLOSE method if header has to be updated */
|
||||
#define DB_SETHEADER_MASK 0x37 /* bits used in DB_SETHEADER_* flags */
|
||||
|
||||
/* update in CLOSE after append only */
|
||||
#define DB_SETHEADER_MINIMAL DB_SETHEADER_CLOSE
|
||||
|
||||
Reference in New Issue
Block a user