Current DBI Implementation Notes: $ary_ref = $sth->fetch; currently always returns the same array ref. This may be a feature that stays, then again it may not. THINGS MAY CHANGE. See the README file and DBI pod text. Changes in DBI 0.79, 7th Apr 1997 Minor release. Tidied up pod text and added some more descriptions (especially disconnect). Minor changes to DBI.xs to remove compiler warnings. Changes in DBI 0.78, 28th Mar 1997 Greatly extended the pod documentation in DBI.pm, including the under used bind_columns method. Use 'perldoc DBI' to read after installing. Fixed $h->err. Fetching an attribute value no longer resets err. Added $h->{InactiveDestroy}, see documentation for details. Improved debugging of cached ('quick') attribute fetches. errstr will return err code value if there is no string value. Added DBI/W32ODBC to the distribution. This is a pure-perl experimental DBI emulation layer for Win32::ODBC. Note that it's unsupported, your mileage will vary, and bug reports without fixes will probably be ignored. Changes in DBI 0.77, 21st Feb 1997 Removed erroneous $h->errstate and $h->errmsg methods from DBI.pm. Added $h->err, $h->errstr and $h->state default methods in DBI.xs. Updated informal DBI API notes in DBI.pm. Updated README slightly. DBIXS.h now correctly installed into INST_ARCHAUTODIR. (DBD authors will need to edit their Makefile.PL's to use -I$(INSTALLSITEARCH)/auto/DBI -I$(INSTALLSITEARCH)/DBI) Changes in DBI 0.76, 3rd Feb 1997 Fixed a compiler type warnings (pedantic IRIX again). Changes in DBI 0.75, 27th Jan 1997 Fix problem introduced by a change in Perl5.003_XX. Updated README and DBI.pm docs. Changes in DBI 0.74, 14th Jan 1997 Dispatch now sets dbi_debug to the level of the current handle (this makes tracing/debugging individual handles much easier). The '>> DISPATCH' log line now only logged at debug >= 3 (was 2). The $csr->NUM_OF_FIELDS attribute can be set if not >0 already. You can log to a file using the env var PERL_DBI_DEBUG=/tmp/dbi.log. Added a type cast needed by IRIX. No longer sets perl_destruct_level unless debug set >= 4. Make compatible with PerlIO and sfio. Changes in DBI 0.73, 10th Oct 1996 Fixed some compiler type warnings (IRIX). Fixed DBI->internal->{DebugLog} = $filename. Made debug log file unbuffered. Added experimental bind_param_inout method to interface. Usage: $dbh->bind_param_inout($param, \$value, $maxlen [, \%attribs ]) (only currently used by DBD::Oracle at this time.) Changes in DBI 0.72, 23 Sep 1996 Using an undefined value as a handle now gives a better error message (mainly useful for emulators like Oraperl). $dbh->do($sql, @params) now works for binding placeholders. Changes in DBI 0.71, 10 July 1996 Removed spurious abort() from invalid handle check. Added quote method to DBI interface and added test. Changes in DBI 0.70, 16 June 1996 Added extra invalid handle check (dbih_getcom) Fixed broken $dbh->quote method. Added check for old GCC in Makefile.PL Changes in DBI 0.69 Fixed small memory leak. Clarified the behaviour of DBI->connect. $dbh->do now returns '0E0' instead of 'OK'. Fixed "Can't read $DBI::errstr, lost last handle" problem. Changes in DBI 0.68, 2 Mar 1996 Changes to suit perl5.002 and site_lib directories. Detects old versions ahead of new in @INC. Changes in DBI 0.67, 15 Feb 1996 Trivial change to test suite to fix a problem shown up by the Perl5.002gamma release Test::Harness. Changes in DBI 0.66, 29 Jan 1996 Minor changes to bring the DBI into line with 5.002 mechanisms, specifically the xs/pm VERSION checking mechanism. No functionality changes. One no-last-handle bug fix (rare problem). Requires 5.002 (beta2 or later). Changes in DBI 0.65, 23 Oct 1995 Added $DBI::state to hold SQL CLI / ODBC SQLSTATE value. SQLSTATE "00000" (success) is returned as "" (false), all else is true. If a driver does not explicitly initialise it (via $h->{State} or DBIc_STATE(imp_xxh) then $DBI::state will automatically return "" if $DBI::err is false otherwise "S1000" (general error). As always, this is a new feature and liable to change. The is *no longer* a default error handler! You can add your own using push(@{$h->{Handlers}}, sub { ... }) but be aware that this interface may change (or go away). The DBI now automatically clears $DBI::err, errstr and state before calling most DBI methods. Previously error conditions would persist. Added DBIh_CLEAR_ERROR(imp_xxh) macro. DBI now EXPORT_OK's some utility functions, neat($value), neat_list(@values) and dump_results($sth). Slightly enhanced t/min.t minimal test script in an effort to help narrow down the few stray core dumps that some porters still report. Renamed readblob to blob_read (old name still works but warns). Added default blob_copy_to_file method. Added $sth = $dbh->tables method. This returns an $sth for a query which has these columns: TABLE_CATALOGUE, TABLE_OWNER, TABLE_NAME, TABLE_TYPE, REMARKS in that order. The TABLE_CATALOGUE column should be ignored for now. Changes in DBI 0.64, 23 Oct 1995 Fixed 'disconnect invalidates 1 associated cursor(s)' problem. Drivers using DBIc_ACTIVE_on/off() macros should not need any changes other than to test for DBIc_ACTIVE_KIDS() instead of DBIc_KIDS(). Fixed possible core dump in dbih_clearcom during global destruction. Changes in DBI 0.63, 1 Sep 1995 Minor update. Fixed uninitialised memory bug in method attribute handling and streamlined processing and debugging. Revised usage definitions for bind_* methods and readblob. Changes in DBI 0.62, 26 Aug 1995 Added method redirection method $h->func(..., $method_name). This is now the official way to call private driver methods that are not part of the DBI standard. E.g.: @ary = $sth->func('ora_types'); It can also be used to call existing methods. Has very low cost. $sth->bind_col columns now start from 1 (not 0) to match SQL. $sth->bind_columns now takes a leading attribute parameter (or undef), e.g., $sth->bind_columns($attribs, \$col1 [, \$col2 , ...]); Added handy DBD_ATTRIBS_CHECK macro to vet attribs in XS. Added handy DBD_ATTRIB_GET_SVP, DBD_ATTRIB_GET_BOOL and DBD_ATTRIB_GET_IV macros for handling attributes. Fixed STORE for NUM_OF_FIELDS and NUM_OF_PARAMS. Added FETCH for NUM_OF_FIELDS and NUM_OF_PARAMS. Dispatch no longer bothers to call _untie(). Faster startup via install_method/_add_dispatch changes. Changes in DBI 0.61, 22 Aug 1995 Added $sth->bind_col($column, \$var [, \%attribs ]); This method enables perl variable to be directly and automatically updated when a row is fetched. It requires no driver support (if the driver has been written to use DBIS->get_fbav). Currently \%attribs is unused. Added $sth->bind_columns(\$var [, \$var , ...]); This method is a short-cut for bind_col which binds all the columns of a query in one go (with no attributes). It also requires no driver support. Added $sth->bind_param($parameter, $var [, \%attribs ]); This method enables attributes to be specified when values are bound to placeholders. It also enables binding to occur away from the execute method to improve execute efficiency. The DBI does not provide a default implementation of this. See the DBD::Oracle module for a detailed example. The DBI now provides default implementations of both fetch and fetchrow. Each is written in terms of the other. A driver is expected to implement at least one of them. More macro and assorted structure changes in DBDXS.h. Sorry! The old dbihcom definitions have gone. All fields have macros. The imp_xxh_t type is now used within the DBI as well as drivers. Drivers must set DBIc_NUM_FIELDS(imp_sth) and DBIc_NUM_PARAMS(imp_sth). test.pl includes a trivial test of bind_param and bind_columns. Changes in DBI 0.60, 17 Aug 1995 This release has significant code changes but much less dramatic than the previous release. The new implementors data handling mechanism has matured significantly (don't be put off by all the struct typedefs in DBIXS.h, there's just to make it easier for drivers while keeping things type-safe). The DBI now includes two new methods: do $dbh->do($statement) This method prepares, executes and finishes a statement. It is designed to be used for executing one-off non-select statements where there is no benefit in reusing a prepared statement handle. fetch $array_ref = $sth->fetch; This method is the new 'lowest-level' row fetching method. The previous @row = $sth->fetchrow method now defaults to calling the fetch method and expanding the returned array reference. The DBI now provides fallback attribute FETCH and STORE functions which drivers should call if they don't recognise an attribute. THIS RELEASE IS A GOOD STARTING POINT FOR DRIVER DEVELOPERS! Study DBIXS.h from the DBI and Oracle.xs etc from DBD::Oracle. There will be further changes in the interface but nothing as dramatic as these last two releases! (I hope :-) Changes in DBI 0.59 15 Aug 1995 NOTE: THIS IS AN UNSTABLE RELEASE! Major reworking of internal data management! Performance improvements and memory leaks fixed. Added a new NullP (empty) driver and a -m flag to test.pl to help check for memory leaks. Major changes to DBI/DBD interface include: 1. All imp_xxh_t structs must now have a dbih_ccc_t struct as the first element in the structure. 2. The previous initialisation scheme of # create and init private data structure $imp_data = _private_func(...); # create handle and reference private data structure $xxh = DBD::_new_xxh({...}, $imp_data); is now # publish size of overall structure required $imp_data_size = ...; # sizeof(imp_xxh_t) # create 'blank' handle of required size $xxh = DBD::_new_xxh({...}); # init private data into space in handle _private_func($xxh, ...); _private_func moves 'down' to the next level of handle class. E.g. a previous $imp_data = ...::dr::_login(...) becomes ...::db::_login($dbh,...) 3. The local variable initialisation scheme of foo(sth) { D_dbihcom(sth); D_imp_sth; is now foo(sth) { D_imp_sth(sth); also: D_imp_dbh_from_sth; and: D_imp_drh_from_dbh; if needed. Study DBD::Oracle version 0.21 for more details. (Comparing parts of v0.21 with v0.20 may be useful.) Known Problems: 1. A Perl5.001m binary built with -DDEBUGGING seems to cause (@row = $sth->fetchrow) to be called in a scalar context. Works fine using a non -DDEBUGGING perl. This might be a local problem. Please report to findings. Changes in DBI 0.58 21 June 1995 Added DBI->internal->{DebugLog} = $filename; Reworked internal logging. Added $VERSION. Made disconnect_all a compulsary method for drivers.