Changes to be committed:
modified: ChangeLog.txt
modified: contrib/rddsql/sqlbase.c
modified: contrib/rddsql/sqlmix.c
+ added support to timestamp field type.
You can now use "@" in DbCreate as the timestamp field type.
Thanks to Grigory Filatov for fixing crash!
* contrib/sddsqlt3/core.c
! fix DBUSEAREA() operation with SQLITE3 SDD to return empty result
when query conditions are false or the source table has no rows.
Previously an logically correct example caused RTE:
DBUSEAREA(,, "SELECT * FROM existing_table WHERE FALSE")
! fix double-free error in sqLite3Disconnect(), looks like the
sqlite3_close() return value checking was reverted, SQLITE_OK is 0
* use CDP API to get UTF8 string length
* use new sqlite3_prepare_v3() when built against
sqlite 3.20.0 or upper (change borrowed from Viktor's 3.4 fork)
+ add HB_SQLT3_MAP_DECLARED_EMULATED define (not yet enabled by default)
which make this SDD additionally parse SQLite column declarations.
Right now it can make HB_FT_DATE fields working using standard
ISO 8601 "yyyy-mm-dd" syntax. Also declarations not significant for
SQLite, but useful in xBase-style programming - SQL numeric(len,dec)
columns are detected in this mode and will be reflected in dbStruct().
+ add support for alternative StoD() like syntax for HB_FT_DATE columns
+ add support for ISO 8601 "YYYY-MM-DD HH:MM:SS.FFF" timestamp declared
columns, SQLite stored strings are converted to proper HB_FT_TIMESTAMP
fields
+ added HB_SQLT3_FIELDNAME_STRICT define, which enables shortening
of field to "name" if SQLite returns "table.name". Such fields are
not completly usable in xBase code - WA->T.FIELD syntax is not
valid, but FieldPos("t.field") is OK. I think it should be default
behaviour or some runtime setting should be introduced for convenience
when working with specific SQL queries.
* contrib/rddsql/sqlbase.c
* contrib/rddsql/sqlmix.c
+ added ZAP functionality to SQLBASE and SQLMIX RDDs,
index tags are preserved while ZAP-ing SQLMIX area.
They are cleaned, no REINDEX is needed
* changed to allow values of any type in "V" SIX3 / HB_FT_ANY fields
in SQLBASE/SQLMIX RDD workareas
* contrib/hbfoxpro/relfunc.c
! fix InList() FoxPro compatible function not looking at the last
parameter passed. Thanks to Attila Szabo for the information
posted on the developers list.
* *
* partial sync with the 3.4 fork codebase. These are the things
synces for the most part:
- copyright headers
- grammar/typos in comments and some readmes
- comment/whitespace/decorations
- variable scoping in C files
- DO CASE/SWITCH and some other alternate syntax usage
- minimal amount of human readable text in strings
- minor code updates
- HB_TRACE() void * casts for pointers and few other changes to
avoid C compiler warnings
- various other, minor code cleanups
- only Harbour/C code/headers were touched in src, utils, contrib,
include. No 3rd party code, no make files, and with just a few
exceptions, no 'tests' code was touched.
- certain components were not touched were 3.4 diverged too much
already, like f.e. hbmk2, hbssl, hbcurl, hbexpat
- the goal was that no actual program logic should be altered by
these changes. Except some possible minor exceptions, any such
change is probably a bug in this patch.
It's a massive patch, if you find anything broken after it, please
open an Issue with the details. Build test was done on macOS.
The goal is make it easier to see what actual code/logic was changed
in 3.4 compared to 3.2 and to make patches easier to apply in both
ways.
* contrib/rddads/ads.ch
+ 64bit server type constants included
* include/dbinfo.ch
* contrib/rddsql/hbrddsql.h
* contrib/rddsql/rddsql.hbc
- contrib/rddsql/hbrddsql.ch
* definitions of SQL related RDDI_*, DBI_* constants moved from RDDSQL
to core code
* include/dbinfo.ch
* contrib/rddsql/sqlbase.c
* RDDI_NEWID renamed to more informative RDDI_INSERTID
* contrib/rddads/ads1.c
* contrib/rddads/adsfunc.c
* contrib/rddads/rddads.h
+ RDDI_CONNECT, RDDI_DISCONNECT implemented. RDDINFO() can be used instead
of RDD specific AdsConnect*() calls
+ other SQL related RDDINFO(), DBINFO() capabilities implemented
+ DBUSEAREA() accepts prefixes "SQL:" and "TABLE:" to indicate if
given table name should be treated as SQL query or table file name.
If these prefixes are omitted, function parameter is treated as table
file name except in case it begins with "SELECT " (compatibility).
* *
% remove brandings and homepage [1] from copyright header. Pass 1 - using script.
[1] nobody has access to it anymore AFAIK - and it's also just
a redirect since long
! update url in copyright header
; this should make the diff between 3.4 and 3.2 easier to manage
* contrib/hbodbc/odbc.c
* contrib/hbodbc/sql.ch
* minor formatting to sync with Viktor's branch
+ added missing defines from Viktor's branch
* contrib/rddads/ads.ch
* contrib/rddads/adsfunc.c
+ added AdsStmtSetTableReadOnly( <nMode> ) -> <lSuccess>
(From Viktor's branch: 2015-01-21 18:43 UTC+0100 Viktor Szakats)
+ added ADS_REFRESHCOUNT constant and
AdsGetRecordCount( [<nHandleType:ADS_TABLE>], ;
[<nFilterOption:ADS_RESPECTFILTERS>], @nCount ) -> <nErrorCode>
(From Viktor's branch: 2014-01-19 13:42 UTC+0100 Viktor Szakats)
! fixed connection handle parameter position in AdsDDRemoveTable()
It was 4-th:
AdsDDRemoveTable( <cTableName>, <deleteFile>, , [ <nConnection> ] )
-> <lResult>
Now is 3-rd:
AdsDDRemoveTable( <cTableName>, <deleteFile>, [ <nConnection> ] )
-> <lResult>
(From Viktor's branch: 2014-01-14 23:53 UTC+0100 Viktor Szakats)
* contrib/rddads/rddads.h
+ autodetection support for 11.10
(From Viktor's branch: 2013-12-26 01:22 UTC+0100 Viktor Szakáts)
* contrib/rddads/adsx.c
* use hb_xgrabz()
* formatting
* contrib/rddsql/hbrddsql.h
* contrib/rddsql/sqlbase.c
* added const qualifier to SDD method pointer in SQLBASEAREA
* declare default SDD method table with const qualifier
* added s_ prefix to the name of static variable with SDD methods
% optimized GOHOT() method
* use hb_xgrab() instead of hb_xalloc() to force error when out of memory
* use hb_xgrabz()
* contrib/rddsql/sqlmix.c
* use hb_xgrabz()
* contrib/sddfb/core.c
* added s_ prefix to the name of static variable with SDD methods
% removed unnecessary memset()
% optimized GOTO() method
! fixed very bad typo in record set resizing - for each record 64 dummy
items were added to array with records so finally this array was 64
times longer then necessary.
* contrib/sddmy/core.c
* added s_ prefix to the name of static variable with SDD methods
+ added new field types from from Viktor's branch
* use hb_xgrabz()
% removed redundant comparison to NULL
* contrib/sddoci/core.c
* added s_ prefix to the name of static variable with SDD methods
* check OCI_Initialize() result and generate error if fails
(synced with Viktor's branch)
* minor formatting to sync with Viktor's branch
% removed unnecessary memset()
% optimized GOTO() method
! fixed very bad typo in record set resizing - for each record 64 dummy
items were added to array with records so finally this array was 64
times longer then necessary.
* contrib/sddodbc/core.c
* replaced unnecessary hb_xgrabz() with hb_xgrab()
! fixed very bad typo in record set resizing - for each record 64 dummy
items were added to array with records so finally this array was 64
times longer then necessary.
* contrib/sddpg/core.c
* added s_ prefix to the name of static variable with SDD methods
* use hb_xgrabz()
* contrib/sddsqlt3/core.c
* added s_ prefix to the name of static variable with SDD methods
* minor formatting to sync with Viktor's branch
! fixed memory leak when RTE ESQLDD_STMTALLOC is generated
(fix from Viktor's branch)
% removed unnecessary memset()
! fixed very bad typo in record set resizing - for each record 64 dummy
items were added to array with records so finally this array was 64
times longer then necessary.
* src/rdd/wafunc.c
% use dynamic symbol pointer to find field index
* src/rdd/workarea.c
* set default maximum field size to HB_SYMBOL_NAME_LEN characters
(by default in Harbour builds HB_SYMBOL_NAME_LEN is 63)
Some RDDs may set longer names but it will be respected only by
FieldName() function and in all other cases only HB_SYMBOL_NAME_LEN
characters is significant for Harbour so such decision should be
well thought by RDD authors because it may confuse users.
Warning: all 3-rd party RDDs which need to force shorter names
should update uiMaxFieldNameLength in their NEW() method
just after SUPER_NEW() call, i.e. like in core DBF RDD.
! respect uiMaxFieldNameLength when new fields are added
* src/rdd/dbf1.c
* set maximum field size to 10 characters
* contrib/rddsql/sqlbase.c
- removed code used to set uiMaxFieldNameLength to HB_SYMBOL_NAME_LEN.
Now it's default field length value for each RDD unless it does not
change it.
* contrib/rddads/ads1.c
* minor modification in adsFieldName()
* contrib/hbwin/wapi_winbase.c
+ added support for FORMAT_MESSAGE_ALLOCATE_BUFFER and 6-th <nSize>
parameter to wapi_FormatMessage() function. The 6-th <nSize> parameter
has higher priority then size of string passed in the 5-th parameter.
! fixed potential memory leak
* (all files)
* stripped svn header
* minor cleanups
; use following command to find out the history of files:
git log
git log --follow
git blame
git annotate