Oratcl change history


Version 1.0,  July, 1993

     First general release, borrowed on concepts from my Sybtcl package.


--------------------------------------------------------------------------------

Version 2.0, November, 1993

     Change oratcl.c to support Tcl 7.0+.  Change wosql for new pack
     syntax in Tk 3.3.
     Add oracancel to man page, and fixed reference to "errortxt"

     New - Makefile and appinit.sed script.

--------------------------------------------------------------------------------

Version 2.1, February, 1994

     Change oratcl.c - add optional commands to "orafetch" command, 
     add colprecs and colscales to oracols (thanks to Dan Schenck); 
     change init function to (int); avoid possible core dump in oralogon 
     when connect to server failed; change how cursor handles are made

     Wosql - use new orafetch when possible

--------------------------------------------------------------------------------

Version 2.11, April, 1994

     Change oratcl.c - fix orasql to only call parse_columns() after DML,
     fixes bogus error in V7 after DDL.

--------------------------------------------------------------------------------

Version 2.2, October, 1994

     Change oratcl.c - change default nullvalue to "default", which performs
     current behavior, set oramsg(nullvalue) "" will give true null elements
     even for numeric data (potential incompatibility.)  clean up left over
     public functions to Oratcl_xxxx.  add last parameter to orlon(), which
     caused connect problems for some.

     Change make/install to use autoconf.

--------------------------------------------------------------------------------

Version 2.3, August, 1995

     Change oratcl.c - support Tcl 7.4 release, hda area to support 64 bit
     Dec Alpha.  Always set oramsg(rows) to row processed count after
     oexec.  Fix bug in FetchAll that sometimes tries to reference beyond 
     actual columns.

     Change wosql - support Tk 4.0 release.

     Change make/install to use newer autoconf 2.2.  Check for __fstd.o on
     Solaris, and mili.exp on AIX.

--------------------------------------------------------------------------------

Version 2.4, September 1996

     Change oratcl.c - add support for Tcl 7.5 packages.  fix orafetchall
     to quote two occurance of substiution char, and to accept a user defined
     substitution char.  add oramsg(ociinfo) index for features of how oratcl
     was compiled.  add initialized flag check to prevent reinitializing on
     subsequent 'load'.

     Change wosql - add 'package require' for TclX.
     Include ODDIS as sample program.  

     changes to Makefile/configure - nearly a total rewrite, should allow
     Oratcl to be nearly independent of Tcl/Tk/TclX source directories.  Relies
     on Tcl/Tk/TclX to be installed properly, using tclConfig.sh (et.al) to
     get version numbers, library info, tclAppInit.c files, etc.  Also build
     libOratcl.so on request, using Oracle shared lib also.  Installs or
     updates and pkgIndex.tcl files in lib/tcl7.5.  Support Oracle 7.3.2
     libraries (libclient.a, etc.)

     New! - oratcl-capi, a C interface for Oratcl.  Experimental.  Feedback
     is welcome.

--------------------------------------------------------------------------------

Version 2.41, December 1996

     Change oratcl.c - zero out lda and hda before logon

     Configure/makefile - fix problem when --exec-prefix= is different from
     --prefix,  include extra paths in library search, include compile time
     lib search flag since linker may prefer shared libs over static when
     both are present.

     Change wosql - add server names from ~/.tnsnames.ora and Oracle home
     $ORACLE_HOME/network/admin/tnsnames.ora


-------------------------------------------------------------------------------

Version 2.5, November 1997

     Change oratcl.c - add support for cursor variables returned by oraplexec,
     add 'parseonly'  option to orasql, add 'orabindexec' command, add 'async'
     option for orasql, add 'orapoll' and 'orabreak' commands, add windows
     .dll support, change orawritelong to allow writing of zero length file,
     add 'version' element to oramsg.  add tclvars to be bound on orafetch /w
     commands.  former keywords (async,parseonly,all,etc.) are now recognized
     as options (-async,-parseonly,-all,etc.)  check orafetch rc code for
     errors, return tcl_error on failure.  add atexit handler to call
     Oratcl_Kill, remove call to Oratcl_Kill on command deletion.
     Fix a problem in FetchAll where the argv[] command string is manipulated,
     caused problems in Tcl 8.0  Added 'rowid' element to oramsg array, valid
     after insert, update, delete, or select for update SQL statements.

     configure/makefile - configure: change default to --enable-shared,
     makefile:  now makes libOratcl with a version number.  reorganize 
     distribution directory with generic,unix,mac,win,doc,misc,samples 
     directories.  Add explicit link with '-lc', might fix some problems.

     win directory - windows makefile, .dll

     include Osql from Dan R. Schenck in samples

     wosql - modified to run without requiring TclX, remove unix-only
     code to allow to run in windows also.

-----------------------------------------------------------------------------

Version 2.6 September, 1999

    Mariam Tariq, Scriptics Corporation
    mtariq@scriptics.com
    -Note: Oracle 7 OCI API is still used. Oracle 8 libraries still support
     the Oracle 7 calls. However, new Oracle 8 features such as functions
     to manipulate LOB's are not accessible by Oratcl. Oratcl needs to be
     rewritten with the new Oracle 8 API's to take advantage of the new
     features.
    -add support for Internationalization features of Tcl8.1
    -add stub awareness
    -OCI 7 call called orlon does not work with some versions of Oracle 8i(e.g.
     version 8.1.5 on NT). So Oracle 8 OCILogon is used for logging in. The
     service context handle is then converted to an lda such that the Oracle
     7 calls can be used again. Default is to use OCILogon. If using an Oracle
     7 DB then -DVERSION7DB compile flag must be used to use orlon

-----------------------------------------------------------------------------

Version 2.7 August, 1999

    Todd M. Helfter, Purdue University
    tmh@purdue.edu

    -   use Tcl_Obj type constructs for all commands.

    -   2 new functions available in tcl as 
	oraldalist - return a list of all opened ldas
	oracurlist $lda - return a list of all opened curs for an lda

    -   Oratcl_Fetch (orafetch) returns the correct number of spaces between
	columns.  Because of Tcl list operations, this is still a valid list.

                        old "@0 @1 @2"
			"foo  bar  rod"
                        new "@0 @1 @2"
			"foo bar rod"


    -   Oratcl_FetchAll changed extensively.
          handle both of the following properly
          orafetch $cur {} {} foo 1 bar 2
          orafetch $cur {} {} {foo 1 bar 2}

	  Greater tuning of the evaluation string.  No calls to strcpy, bcopy,
		or memset are used to find the replacement columns.  
		So all the following work more efficiently

                orafetch $cur {puts "@0 @1 @2"} 
                orafetch $cur {puts "@0 @1 @2"} {}


-----------------------------------------------------------------------------

Version 3.0 June, 2000

    Todd M. Helfter, Purdue University
    tmh@purdue.edu

    -	OCI 8 calls used exclusively. 
    -	All oracle 7 and 6 support removed entirely.
    -	async support removed completely.
	Thus the commands orabreak, oracancel and orapoll no longer exist.
    -	add -commit flag to orasql and orabindexec.
    -   add command orainfo to return the output from OCIServerVersion().
 	extended orainfo to return oratcl version information.
    -	modified test suite.
    -	renamed oracurlist to orastmlist

-----------------------------------------------------------------------------

Version 3.0.1 August, 2000

    Todd M. Helfter, Purdue University
    tmh@purdue.edu

    -	oraautocom change to accept any value acceptable to 
	Tcl_GetBooleanFromObj and to return the setting as "0" for off
	and "1" for on. 
	This is a fix for TR#3573 and TR#3583.
    -	all commands changed to use Tcl_Hash values and a clientData structure.
    -	Handle limits are now imposed by the database/hardware.
	Modified the test suite to match.  

    -   The define variables ORATCLLDAS and ORATCLSMTS no longer exist.
    -   oracols now takes optional arguments, array variable no longer set.
    -	Change oracols to accept optional configuration settings to retrieve
	information formerly available in the oramsg() array.
    -	add new command oraconfig to allow memory management of long fields
	binding, and fetch rows and null values.
    -   add new command oradesc to allow table describes.
    -	changed oracols to return the oracle defined byte size instead of
	the oratcl defined storage size.
    -	fixed a memory management problem with Oratcl_Clean().

-----------------------------------------------------------------------------


Version 3.1 October, 2000

    Todd M. Helfter, Purdue University
    tmh@purdue.edu

    -	applied patches from Don Libes (libes@cme.nist.gov) that allow Oracle
	8.0.x to be used with this library.  The basic problem is that Oracle
	8.0.x OCI library does not seem to know about LOB types.
    -   updated oratcl.c to build clean on a windows system.
    -   relocated configuration files to be common to unix and windows.
    -   corrected bug in Oratcl_Logon preventing remote_os_authent access.
 	Thanks to Cesar Perez Fernandez (cpf06@tid.es) for the correction.
    -	added "loginhandle" option to orainfo to facilitate conversions from
	statement handle back to loginhandle.
    -	added the library file oralob.tcl to implement a new oralob command.
    -	added "lobpsize" to oraconfig to manage the piece size in oralob
	read/writes.
    -	added the library file oralong.tcl to implement a new oralong command.
    -	added "longpsize" to oraconfig to manage the piece size in oralong
	read/writes.
    -   reorganized the windows prebuilt files directory once again.

-----------------------------------------------------------------------------

Version 3.2 March, 2001

    Todd M. Helfter, Purdue University
    tmh@purdue.edu

    -   changed Makefile.in to depend on generic/*.h files.
    -   changed package to eval library files (oralob.tcl, oralong.tcl) from
	within the 'C' code.  This change removes the source lines from the
	pkgIndex.tcl file.  This allows the commands implemented in these
	files to be available with [interp create] and to those linking
	directly to the library.  The files will not be sourced with the 
	[interp create -safe] as file I/O has been restricted in this
	case.  
    -	added statement handle option utfmode to the oraconfig command.
	Setting this option to true causes oratcl to use the functions:
	Tcl_UtfToExternalDstring and Tcl_ExternalToUtfDString on string
	values in orasql, orabindexec, oraplexec, orafetch and oralong.
	(Note :: oralob is implemented with oraplexec, so it to is affected.)
    -   fixed a bug in oracols that was not reporting the correct precision
	of number fields on big-endian systems.

-----------------------------------------------------------------------------

Version 3.3 September, 2001

    Todd M. Helfter, Purdue University
    tmh@purdue.edu

    -   fixed an oversight in oradesc that was not describing the table 
	when given the name of a synonym.  This will also fix the problem
	in oralong, that prevented long operations on a synonym.
    -	Oracle 9i (9.0.1) returns a precision value for VARCHAR2 and CHAR
	datatypes.  Prior to this, the precision was always 0 for these
	datatypes.  /test/oradesc.test has been altered to allow for this.
    -	Attempt a different method of library directory detection.
    -   Alter configuration to detect and use Oracle 9i in a unix build.
    -   Corrected the eval of library files (oralob.tcl, oralong.tcl) from
	within the 'C' code.  This fixes crash when calling 
	Tcl_GetNameOfExecutable() without having first called 
	Tcl_Init(interp).
    -   Correct a bug affecting the oralong command.  Attempting to write
        a zero length string into a long column, put the statement handle
        in an unrecoverable state.
        Thanks to Ulrich Schoebel (SchoebelU@spardat.at) for the alert.

-----------------------------------------------------------------------------

Version 4.0 December, 2001

    *   Thanks to Dionisios Pothos and Grid Intelligent Systems Ltd, UK
	for their financial sponsorship of this upgrade.

    -	**** oramsg **** array has been removed.  This is not backwards 
	compatible.  The remaining values that were accessed through the 
	oramsg array can be obtained with the new _oramsg_ command.
    -	Oratcl is now thread safe.
    -   Added new commands:
	oraparse - ::oratcl::oraparse - Oratcl_Parse()
	orabind  - ::oratcl::orabind  - Oratcl_Bind()
	oraexec  - ::oratcl::oraexec  - Oratcl_Exec()
	orabreak - ::oratcl::orabreak - Oratcl_Break()
	These commands operate in normal and async mode.
	These commands operate on either SQL or PL/SQL statements.
    -	The commands: orasql, orabindexec, and oraplexec have new internals
	built out of the primitives Oratcl_Parse, Oratcl_Bind and Oratcl_Exec.
   	Oratcl_Sql is implemented with: 
		Oratcl_Parse() 
		Oratcl_Exec()
	Oratcl_Bindexec is implemented with: 
		Oratcl_Bind()
		Oratcl_Exec()
	Oratcl_Plexec is implemented with: 
		Oratcl_Parse()
		Oratcl_Bind()
		Oratcl_Exec()
    -   **** oraplexec **** no longer returns the bind values as a list,
	but rather returns the return code like orasql and orabindexec.
	Use orafetch to retrieve the binded columns.
    -	**** orafetch **** has a completely new API.  See the man page 
	for details.  This is not backwards compatible.  Also see the
	test suite for examples.
    -   Oratcl now works in 64 bit solaris with 64 bit Oracle.
    -   Correct oradesc to continue describing synonyms until the base
	table is reached.  Added nested synonym test to oradesc.test.
	Thanks to Lawrence Little for the alert.
    -   Reduce dependency on autodetection of EOL i.e. '\0' by using
        actual string lengths as arguements instead of relying on -1
        behavior.
    -	Enabled proper behavior for new internal datatypes in Oracle 9i
	in the functions oradesc and oracols.  Since these types are
	defined in the 8i OCI files, this should be safe for all versions.
		TIMESTAMP
		TIMESTAMP WITH TIME ZONE
		INTERVAL YEAR TO MONTH
		INTERVAL DAY TO SECOND
		TIMESTAMP WITH LOCAL TIME ZONE
    -	Corrected a gaping memory leak in orafetch.  Use of the -dataarray
	option leaked memory for each column name or number used as the
	array hash.
    -   Correct a bug in the oraconfig command.  Attempting to query the
        fetchrows value incorrectly reports the bindsize.
        Thanks to Christian Traber (christian@traber-net.de) for the alert.
    -   Correct a bug in the oralob command that prevented reading or writing
	a one character string.
	Thanks to Christian Traber (christian@traber-net.de) for the alert.
    -   Add two new options to oraconfig:
            - numbsize : amount of space to allocate for the data returned
                         for number columns.  Default is 40.
            - datesize : amount of space to allocate for the data returned
                         for date columns.  Default is 75.
    -   Enable binding of clobs when compiled with Oracle 9i.
    -   05-MAY-2002 (tmh) fixed compiler warnings about 'const' mismatches.
    -   29-MAY-2002 (tmh) change Makefile.in to use TCL_LD_FLAGS.  This lets
        the --enable-64bit-vis options work when using 64 bit solaris, 64 bit
        Oracle and the same option in the tcl build.
    -   Place the new 9i columns inside a #define, not defined in oracle 8.1.5
		TIMESTAMP
		TIMESTAMP WITH TIME ZONE
		INTERVAL YEAR TO MONTH
		INTERVAL DAY TO SECOND
		TIMESTAMP WITH LOCAL TIME ZONE
        Thanks to Miguel Bagnon (bagnonm@safelayer.com) for the alert.
    -   Removed several unused variables eliminating compile warnings.
        Thanks to Miguel Bagnon (bagnonm@safelayer.com) for the alert.

-----------------------------------------------------------------------------

Version 4.1 August, 2002

    -   The 'oralob' and 'oralong' commands have been implemented in 'C'.
	This will make those commands available in slave interps and in
	other situations where the old tcl file sourcing was made difficult
	due to auto_path idiosyncracies.  The files 'oralob.tcl' and
	'oralong.tcl' will persist in the library directory as a baseline
	for the new 'oralob.c' and 'oralong.c' files which are created
	from them.
    -   Fixed a bug in oraparse that prevented asynchronous
        transactions from parsing properly with the supplied examples.
        Thanks to Miguel Bagnon (bagnonm@safelayer.com) for the alert.

17-SEP-2002

    -   Added support for describing user defined types to Oracols and
	Oradesc.  Began work for a test suite file.
	Thanks to Olly Stephens (ollystephens@sourceforge.net) for the patch.
    -	Changed a bogus error message in [orainfo server $lda]. 
    -	Added a 'status' option to 'orainfo' that returns the server status.
	Example: orainfo status $lda
	Returns 1 if server status is OCI_SERVER_NORMAL
	Returns 0 if server status is OCI_SERVER_NOT_CONNECTED
	This is useful for detected loss of server, due to crash or shutdown.
    -   Rebuilt Oratcl_ColAppend() to use a Tcl_DString instead of a 
	Tcl_Obj ** in the building of the -datavariable option result.
	This eliminates a Tcl_Obj (24 byte) leak for each result column.

22-NOV-2002

    -   Added support for sysdba and sysoper connections to 'oralogon'
	usage: oralogon sysdba
	usage: oralogon sysoper
	Thanks to Aleksey Kurbatov (akurbatov@borlas.ru) for the patch.

04-DEC-2002

    -   Fixed a bug in orasql that prevented the commit option from working
        Thanks to Christian Traber (christian@traber-net.de) for the alert.

12-DEC-2002

    -   Changed 'oralogon' to pay attention to the return code from
	OCIInitialize.  If the return code is not OCI_SUCCESS raise an error.
	This will avoid a core dump if the ORACLE_HOME environment variable
	is not set on a unix platform.

13-DEC-2002

    -   Corrected an incorrect word in the documentation, the man page
	indicated a 'sqlcode' option to the oramsg command.  The option
	is really 'sqltype'

-----------------------------------------------------------------------------

Version 4.2 May, 2003

08-MAY-2003

    -	Corrected massive memory leak of column names in 'oradesc'.
	This decreases the memory loss in the 'oralong' and 'oralob' commands.
 	Thanks to Manfred Frey (Manfred.Frey@ZF-Lenksysteme.com) for the alert.

18-MAY-2003

    -	Oralogon:: set char * initialization to NULL.  This fixes a core
	dump when multiple calls are mede to oralogon with no args (an error) 
	when tcl is compiled with --enable-symbols=mem.

11-Aug-2003

    -	Correct compiler warnings with use of the Tcl_GetIndexFromObj().
	These were introduced by the CONST prototypes introduced in Tcl 8.4.
        Thanks to Miguel Bagnon (miguel@bagnon.com) for the patch.
    -   Revised the error checking code to read the error messages for all
	the error conditions that the OCI programming guide tells about
	giving info. For example, OCI_SUCCESS_WITH_INFO is not an error,
	but still gives info.
        Thanks to Miguel Bagnon (miguel@bagnon.com) for the patch.

20-Aug-2003

    -   Added a test to the oraexec.test file for the new error detections.
        Thanks to Miguel Bagnon (miguel@bagnon.com) for the patch.

01-SEP-2003

    -	Added "oralob writeappend" wrapper around  DBMS_LOB.WRITEAPPEND.
	Thanks to Peter Schindler (pschindler@synchronicity.com) for
	contributing this enhancement.  Peter provides this comment:
	"We had a lot of serialization errors with just WRITE, the way oracle
	handles the storage of CLOBs. With this new function, we were able to
	reduce the likelihood of a serialization error."

02-SEP-2003

    -	Altered the "oralong read" command.   Changed the "indp" arguement
	to (void *) 0 in calls to OCIBindByName() and OCIStmtSetPieceInfo().
	This fixes an oracle error encountered in "oralong read".

