Harbour ChangeLog - Relevant for HMG interest

Harbour, MingW related news.

Moderator: Rathinagiri

Post Reply
User avatar
Pablo César
Posts: 4058
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Harbour ChangeLog - Relevant for HMG interest

Post by Pablo César » Mon Feb 09, 2015 12:26 am

Some DBFs improvements for UNICODE.

Fixed processing unicode characters at memoedit.prg.

HardCR() and added support for field flags in dbCreate()/dbStruct().

Flags can be passed in string with field type after ":", i.e. "C:U" means Unicode character field.
2015-02-08 13:19 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
  • src/rdd/workarea.c
    + added support for field flags in dbCreate()/dbStruct().
    Flags can be passed in string with field type after ":", i.e.
    "C:U"
    means Unicode character field.
    The following flags are recognized:
    "N" - column can store null values
    "B" - binary column
    "+" - column is autoincrementing
    "Z" - column is compressed
    "E" - column is encrypted
    "U" - column stores Unicode strings
  • src/rdd/dbf1.c
    + added support for field flags in core DBF* RDDs.
    ; In core DBF* RDDs "N", "B", "U" and "+" flags are supported.
    When "N" flag is used then special hidden field with NULL bits
    is created. Such implementation is compatible with DBF created
    by VFP.
  • contrib/rddads/ads1.c
    + added support for field flags in ADS* RDDs
    ! added missing RTE when wrong field types are passed to dbCreate()
    ; The old format with long field names corresponding to ADS types is
    still supported but I had to rewrite this code so please make real
    life test and verify me. In few cases I slightly change the code and
    now it can be a little bit more restrictive, i.e. typos in "AtutoInc"
    field type will be detected (previous code checked only for 1-st
    letter "A").
best regards
Przemek
Quite almost very professional. I hope SQL as LetoDb.

Other relevant for HMG interest to be checked
2015-02-07 21:02 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
  • contrib/hbwin/win_bmp.c
    ! added missing C++ casting

2015-01-29 23:55 UTC+0100 Jean Lefebvre (jfl/at/mafact.com)
  • contrib/hbtip/sendmail.prg
  • Modified hb_sendmail(...) to allow TLS on port 587
    No change in parameters

2012-11-10 20:55 UTC+0100 Viktor Szakats (harbour syenar.net)
  • src/rtl/hbgtcore.c
  • changed HB_GTI_COMPATBUFFER default to be Clipper
    compatible. INCOMPATIBLE compared to 3.2 versions,
    but restores the compatibility with previous ones
    and Clipper. Applications using Unicode, must now
    manually change these buffers to be Unicode
    compatible using:
    #include "hbgtinfo.ch"
    hb_gtInfo( HB_GTI_COMPATBUFFER, .F. )
Last edited by Pablo César on Sun Apr 09, 2017 7:10 am, edited 1 time in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Pablo César
Posts: 4058
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Thu Mar 05, 2015 11:40 am

2015-03-04 11:18 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
  * include/hbapi.h
    ! fixed HB_ISMEMO() macro, original version was accepting the same
      items as HB_ISCHAR() so it was not compatible with ISMEMO() macro
      in Cl*pper.
Do you think Dr. Claudio that IsDataGridMemo() could be replaced by this HB_ISMEMO() ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Pablo César
Posts: 4058
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Fri Mar 20, 2015 5:22 pm

2015-03-20 16:34 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/Makefile
- include/hbdbsort.h
* src/rdd/Makefile
- src/rdd/hbdbsort.c
* src/rdd/dbf1.c
- completely removed old code used in DBF* RDDs as low level backend
for SORT TO ... command and __dbArrange() function.
It was buggy and extremely inefficient in some cases, i.e. after
20 hours I killed process which was sorting table with 2'000'000
records in reverted order so I cannot even say how much time it
needed.

* src/rdd/dbf1.c
+ added new code for table sorting in DBF* RDDs
(SORT TO ... / __dbArrange() backend)
New code fixes many different problems which existed in previous one
like missing support for national collation, wrong descending orders,
wrong sorting of numeric fields with negative values, missing support
for sorting many field types, missing support for transferring MEMO
fields, missing support for transferring records to table with different
field structure or serving by different RDD, etc.
New code is also many times faster then the old one. In practice it
means is now usable for tables with more then few thousands records,
i.e. the test table with 2'000'000 records I used with old code was
copied in sorted order in 13 secs. when pure COPY TO needed 10 secs.
Now it's possible to export sorted tables to different RDDs, i.e.
using DELIM or SDF RDDs in desitnation area.
New code is written in general form without any local to DBF* RDDs
extensions so it can be adopted as base in any other RDD. Probably
I'll move it to default workarea methods so it will be inherited by
all Harbour RDDs and only if necessary authors of some RDDs may
overload it, i.e. to move the operation to the server side in remote
RDDs when source and destination tables are processed by the same
server.
This modification closes the last known for years bug or rather bag
of bugs ;-) in Harbour.
; NOTE: For large tables new sorting algorithm may access source records
more then once. It means that results may be wrongly sorted when
sorted fields in exported records are modified concurrently by
other station during exporting. This can be easy eliminated by
copping source records to temporary file anyhow it will introduce
additional overhead in all cases and user can easy eliminate the
problem by simple FLOCK before sort or making export to temporary
file and then sorting this file or he can simply ignore this
problem as unimportant in the specific situation so I decided to
not implement double copping.
I haven't tested what Cl*pper exactly does in such case so
I cannot say if current behavior is or isn't Cl*pper compatible.

best regards
Przemek
Processing two million records in just 13 seconds, it was more than 20 hours and COPY TO only in 10 seconds ?

THIS IS THE GUY !

Image
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Pablo César
Posts: 4058
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Sat Jun 06, 2015 10:12 pm

Some new regarding DataBases new manipulating driver:

Code: Select all

2015-06-04 07:36:36 UTC-0800 Pritpal Bedi (bedipritpal/at/hotmail.com)
  + contrib/cacherdd/
  + contrib/cacherdd/cache.c
  + contrib/cacherdd/c_api.h
  + contrib/cacherdd/cachedic.prg
  + contrib/cacherdd/cachefunc.prg
  + contrib/cacherdd/cacheqry.prg
  + contrib/cacherdd/cacherdd.prg
  + contrib/cacherdd/cacheutils.prg
  + contrib/cacherdd/cacherdd.ch
  + contrib/cacherdd/cacherdd.hbc
  + contrib/cacherdd/cacherdd.hbp
  + contrib/cacherdd/cacherdd.hbx
  + contrib/cacherdd/readme.txt
    + Initial commit of CacheRDD.
	   The library is combination of RDD code plus extended functions 
	   important and/or useful for its implementation.
	   
  + contrib/cacherdd/bin/
  + contrib/cacherdd/bin/cbind.dll
  + contrib/cacherdd/bin/CacheODBC.dll
  + contrib/cacherdd/bin/cppbind_msvc80.dll
    + Communication libraries from Intersystems's Cache package V 2007.1. 
	   These resides in {cache installation folder}\dev\cpp\lib. 
       I could not get any higher version working with the RDD, so have 
       included them within this repository. Also Intersystems has 
	   discountinued support for v 2007.1 making it hard to grab them.
	   
  + contrib/cacherdd/server/
  + contrib/cacherdd/server/Rdd.mac
  + contrib/cacherdd/server/Vouch.inc
  + contrib/cacherdd/server/Vouch.XhbRdd.cls
    + Sever-side CacheRDD sources. 
	   For current eval version of Cache you may not need them to 
	   compile. Compiled code, CACHE.DAT is also commited here.
	   You may need to compile it yourself for any subsequent 
	   Cache versions unles I commit them.
	   
  + contrib/cacherdd/server/rdd
  + contrib/cacherdd/server/rdd/2015_1
  + contrib/cacherdd/server/rdd/CACHE.DAT
    + Compiled server-side CacheRDD code with current Cache v 2015.1.
	   The compiled code is cross-platform and works on any OS.
	   In fact, CACHE.DAT, be it CacheRDD compiled code or application data,
	   is portable across platforms. A big boost to high-availability.
	   
  + contrib/cacherdd/cachemgr/
  + contrib/cacherdd/cachemgr/cachemgr.hbp
  + contrib/cacherdd/cachemgr/cachemgr.res
  + contrib/cacherdd/cachemgr/cachemgr.ch
  + contrib/cacherdd/cachemgr/cachemgr_main.prg
  + contrib/cacherdd/cachemgr/cachemgr_dashboard.prg
  + contrib/cacherdd/cachemgr/cachemgr_misc.prg
  + contrib/cacherdd/cachemgr/cachemgr_query.prg
  + contrib/cacherdd/cachemgr/cachemgr_tablebrowse.prg
  + contrib/cacherdd/cachemgr/cachemgr_tables.prg
  + contrib/cacherdd/cachemgr/cachemgr_ui.prg
  + contrib/cacherdd/cachemgr/wvttowvg.ch
    + Initial commit of Cache Manager, a DBU like application but with 
	   many more goodies needed to manage the different aspects of 
	   your tables withought any need to visit the server. In most 
	   cases it is all what you will need in addition to your application.
	   
  ; Few years earlier I had promised to make available CacheRDD, 
     probably in 2008, but did not posted due some professional ethics.
	 Today I am pleased to commit as my employers, CURACAO, has allowed me to 
	 publish the world's first true RDBMS RDD for (x)Harbour family of compilers.
	 A big thanks to CURACAO for opening such a wonderful opportunity for 
	 Harboureans to scale their applications and empower their clients 
	 with security and reliability. If you also like to thank CURACAO, 
	 send a thank-you post to Eryk Szachniewicz ( eryksz/@/icuracao.com ), 
	 Manager, MIS, CURACAO.
	 
  ; Note that this RDD was initiated in 2006 and with xHarbour. Even today 
     CURACAO is still on xHarbour v October 2007. So some constructs in these
	 sources respect xHarbour symbols, hashes and try/catch - to be precise. 
	 I have kept them as is to avoid duplicacy. Those are #xtranslate(d) in 
	 cacherdd.ch. I would like to keep them as is.
	 
  ; CacheRDD is based on UsrRDD. I am not a RDD guru at all so some technical 
     flaws in the code cannot be ruled out. Bear with me and correct if you 
     find one. RDD is in production at CURACAO since 2007 and seems mature.
	 Since then we had to reindex only one table, and we know our mistake, 
	 which was not an RDD or Cache issue, but a flaw in the application.
	 In peak season 950+ cuncurrent instances of application connect to Cache
	 without any issues. At present some 325+ tables are on Cache with 
	 222+ GB database serving 525+ million records. A few tables are still 
	 on Advantage which are scheduled to be ported to Cache soon.
	 
  ; In the past few days I have tried to isolate and format the code as 
     per Harbour and library standards. Still there is a room to clean it 
	 further. 

  ; For implementation details please visit at 
     [url]http://cacherdd.vouch.info[/url]
	 I hope to explain more and more on this site, so please bookmark it.
CachéRDD : The real-time RDBMS RDD for Harbour family of Compilers

CachéRDD is a RDD (Replaceable Database Driver) for open-source Harbour ( http://www.harbour-project.org ) and xHarbour ( http://www.xharbour.org ) compilers to connect to InterSystems ( http://www.intersystems.com ) Caché, the post-relational, massively scalable database.

CachéRDD is a classic blend of true RDBMS and time-tested traditional xbase syntax as,

the same SEEK,
the same SKIP,
the same GOTO, GOTOP, GOBOTTOM,
the same INDEX ON,
the same TBROWSE,
and that too with billions of records,
with same SPEED, even faster in some cases...

the same RLOCK,
the same FLOCK,
even extended to be honored by external processes,
the same USE EXCLUSIVE / SHARED

The ONLY difference is that now your data is more

SECURE,
SCALABLE,
FREE OF INDEX CORRUPTION,
with
TRANSACTION CONTROL,
and subject to
INTEGRATION WITH WIDE RANGE OF EXTERNAL SQL TOOLS.

AND at top of all you need not to change a single line of source except for resolving table name issues and adjusting a few index expressions here and there.

CachéRDD does not issue any SQL commands to the database for any of the RDD functions nor it needs any DSN ( Data Source Name ). CachéRDD does not require ODBC drivers to be installed. CachéRDD talks to the database directly with its lower level interface. This is the main reason that like DBFCDX functionality has been achieved.

Looks interesting ? Learn more...
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
serge_girard
Posts: 1834
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 275 times
Been thanked: 63 times
Contact:

Post by serge_girard » Sun Jun 07, 2015 6:53 am

Good News Pablo!
Thank you.

Serge

User avatar
bpd2000
Posts: 948
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 118 times
Been thanked: 42 times

Post by bpd2000 » Sun Jun 07, 2015 7:07 am

serge_girard wrote:Good News Pablo!
Thank you.

Serge
+1
BPD
Convert Dream into Reality through HMG

User avatar
Pablo César
Posts: 4058
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Thu Jun 25, 2015 12:43 am

2015-06-24 20:32 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
  * src/pp/ppcore.c
    ! fixed directory include precedence in #included files which
      are not marked as system headers (system headers are enclosed in <>)
      Now the following order is used:
         1) try to access included file as is starting from current directory
         2) if included file has relative path then check if the first
            compiled file has path and if yes try to access file using this
            path as start point
         3) check INCLUDE paths (envvar and -I parameter)
      Previous version used: 2 for nested files or 1 for first file or when
      first file was given without path then 3.
      Now we are Cl*pper compatible but such version strongly depends on
      current directory which has the highest priority. Personally I do no
      like such behavior because it may give different results when current
      directory is changed.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
luisvasquezcl
Posts: 1024
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Has thanked: 11 times
Been thanked: 14 times
Contact:

Post by luisvasquezcl » Thu Jun 25, 2015 1:45 am

Great news,
thanks Pablo,
Best regards,
Luis Vasquez.

User avatar
mol
Posts: 2833
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 118 times
Been thanked: 62 times
Contact:

Post by mol » Thu Jun 25, 2015 6:17 am

CachéRDD : The real-time RDBMS RDD for Harbour family of Compilers
Very interesting!
I'm waiting for a little sample with this RDD.
Did anybody tried it?

User avatar
danielmaximiliano
Posts: 2035
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Has thanked: 84 times
Been thanked: 11 times
Contact:

Post by danielmaximiliano » Thu Jun 25, 2015 1:49 pm

daily by GIT PULL commands update the sources Harbour and read the Changelog.
thanks Pablo
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`.HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. : +54901169026142
Telegram Name : DaNiElMaXiMiLiAnO

Post Reply