Changes in DBI 0.90, 6th September 1997
The DBI class can be subclassed more easily now.
InactiveDestroy fixed for drivers using the *.xst template.
Can once again be built with Perl 5.003.
Slightly faster handle creation.
Changed prototype for dbd_*_*_attrib() to add extra param.
Note: 0.90, 0.89 and possibly some other recent versions have
a small memory leak. This will be fixed in the next release.
Changes in DBI 0.89, 25th July 1997
Minor fix to neatsvpv (mainly used for debug trace) to workaround
bug in perl where SvPV removes IOK flag from an SV.
Minor updates to the docs.
Changes in DBI 0.88, 22nd July 1997
Fixed build for perl5.003 and Win32 with Borland.
Fixed documentation formatting.
Fixed DBI_DSN ignored for old-style connect (with explicit driver).
Fixed AutoCommit in DBD::ExampleP
Fixed $h->trace.
The DBI can now export SQL type values: use DBI ':sql_types';
Modified Driver.xst and renamed DBDI.h to dbd_xsh.h
Changes in DBI 0.87, 18th July 1997
Fixed minor type clashes.
Added more docs about placeholders and bind values.
Changes in DBI 0.86, 16th July 1997
Fixed failed connect causing 'unblessed ref' and other errors.
Drivers must handle AutoCommit FETCH and STORE else DBI croaks.
Added $h->{LongReadLen} and $h->{LongTruncOk} attributes for BLOBS.
Added DBI_USER and DBI_PASS env vars. See connect docs for usage.
Added DBI->trace() to set global trace level (like per-handle $h->trace).
PERL_DBI_DEBUG env var renamed DBI_DEBUG (old name still works for now).
Updated docs, including commit, rollback, AutoCommit and Transactions sections.
Added bind_param method and execute(@bind_values) to docs.
Fixed fetchall_arrayref.
Since the DBIS structure has change the internal version numbers have also
changed (DBIXS_VERSION == 9 and DBISTATE_VERSION == 9) so drivers will have
to be recompiled. The test is also now more sensitive and the version
mismatch error message now more clear about what to do. Old drivers are
likely to core dump (this time) until recompiled for this DBI. In future
DBI/DBD version mismatch will always produce a clear error message.
Note that this DBI release contains and documents many new features
that won't appear in drivers for some time. Driver writers might like
to read perldoc DBI::DBD and comment on or apply the information given.
Changes in DBI 0.85, 25th June 1997
NOTE: New-style connect now defaults to AutoCommit mode unless
{ AutoCommit => 0 } specified in connect attributes. See the docs.
AutoCommit attribute now defined and tracked by DBI core.
Drivers should use/honour this and not implement their own.
Added pod doc changes from Andreas and Jonathan.
New DBI_DSN env var default for connect method. See docs.
Documented the func method.
Fixed "Usage: DBD::_::common::DESTROY" error.
Fixed bug which set some attributes true when there value was fetched.
Added new internal DBIc_set() macro for drivers to use.
Changes in DBI 0.84, 20th June 1997
Added $h->{PrintError} attribute which, if set true, causes all errors to
trigger a warn().
New-style DBI->connect call now automatically sets PrintError=1 unless
{ PrintError => 0 } specified in the connect attributes. See the docs.
The old-style connect with a separate driver parameter is deprecated.
Fixed fetchrow_hashref.
Renamed $h->debug to $h->trace() and added a trace filename arg.
Assorted other minor tidy-ups.
Changes in DBI 0.83, 11th June 1997
Added driver specification syntax to DBI->connect data_source
parameter: DBI->connect('dbi:driver:...', $user, $passwd);
The DBI->data_sources method should return data_source
names with the appropriate 'dbi:driver:' prefix.
DBI->connect will warn if \%attr is true but not a hash ref.
Added the new fetchrow methods:
@row_ary = $sth->fetchrow_array;
$ary_ref = $sth->fetchrow_arrayref;
$hash_ref = $sth->fetchrow_hashref;
The old fetch and fetchrow methods still work.
Driver implementors should implement the new names for
fetchrow_array and fetchrow_arrayref ASAP (use the xs ALIAS:
directive to define aliases for fetch and fetchrow).
Fixed occasional problems with t/examp.t test.
Added automatic errstr reporting to the debug trace output.
Added the DBI FAQ from Alligator Descartes in module form for
easy reading via "perldoc DBI::FAQ". Needs reformatting.
Unknown driver specific attribute names no longer croak.
Fixed problem with internal neatsvpv macro.
Changes in DBI 0.82, 23rd May 1997
Added $h->{RaiseError} attribute which, if set true, causes all errors to
trigger a die(). This makes it much easier to implement robust applications
in terms of higher level eval { ... } blocks and rollbacks.
Added DBI->data_sources($driver) method for implementation by drivers.
The quote method now returns the string NULL (without quotes) for undef.
Added VMS support thanks to Dan Sugalski.
Added a 'quick start guide' to the README.
Added neatsvpv function pointer to DBIS structure to make it available for
use by drivers. A macro defines neatsvpv(sv,len) as (DBIS->neatsvpv(sv,len)).
Old XS macro SV_YES_NO changes to standard boolSV.
Since the DBIS structure has change the internal version numbers have also
changed (DBIXS_VERSION == 8 and DBISTATE_VERSION == 8) so drivers will have
to be recompiled.
Changes in DBI 0.81, 7th May 1997
Minor fix to let DBI build using less modern perls.
Fixed a suprious typo warning.
Changes in DBI 0.80, 6th May 1997
Builds with no changes on NT using perl5.003_99 (with thanks to Jeffrey Urlwin).
Automatically supports Apache::DBI (with thanks to Edmund Mergl).
DBI scripts no longer need to be modified to make use of Apache::DBI.
Added a ping method and an experimental connect_test_perf method.
Added a fetchhash and fetch_all methods.
The func method no longer pre-clears err and errstr.
Added ChopBlanks attribute (currently defaults to off, that may change).
Support for the attribute needs to be implemented by individual drivers.
Reworked tests into standard t/*.t form.
Added more pod text. Fixed assorted bugs.
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.