📄 changes.pm
字号:
Changed DBI::Profile header to include the date and time. Added DBI->parse_dsn($dsn) method. Added warning if build directory path contains white space. Added docs for parse_trace_flags() and parse_trace_flag(). Removed "may change" warnings from the docs for table_info(), primary_key_info(), and foreign_key_info() methods.=head2 Changes in DBI 1.42 (svn rev 222), 12th March 2004 Fixed $sth->{NUM_OF_FIELDS} of non-executed statement handle to be undef as per the docs (it was 0). Fixed t/41prof_dump.t to work with perl5.9.1. Fixed DBD_ATTRIB_DELETE macro thanks to Marco Paskamp. Fixed DBI::PurePerl looks_like_number() and $DBI::rows. Fixed ref($h)->can("foo") to not croak. Changed attributes (NAME, TYPE etc) of non-executed statement handle to be undef instead of triggering an error. Changed ShowErrorStatement to apply to more $dbh methods. Changed DBI_TRACE env var so just does this at load time: DBI->trace(split '=', $ENV{DBI_TRACE}, 2); Improved "invalid number of parameters" error message. Added DBI::common as base class for DBI::db, DBD::st etc. Moved methods common to all handles into DBI::common. Major tracing enhancement: Added $h->parse_trace_flags("foo|SQL|7") to map a group of trace flags into the corresponding trace flag bits. Added automatic calling of parse_trace_flags() if setting the trace level to a non-numeric value: $h->{TraceLevel}="foo|SQL|7"; $h->trace("foo|SQL|7"); DBI->connect("dbi:Driver(TraceLevel=SQL|foo):...", ...); Currently no trace flags have been defined. Added to, and reworked, the trace documentation. Added dbivport.h for driver authors to use. Major driver additions that Jeff Zucker and I have been working on: Added DBI::SQL::Nano a 'smaller than micro' SQL parser with an SQL::Statement compatible API. If SQL::Statement is installed then DBI::SQL::Nano becomes an empty subclass of SQL::Statement, unless the DBI_SQL_NANO env var is true. Added DBD::File, modified to use DBI::SQL::Nano. Added DBD::DBM, an SQL interface to DBM files using DBD::File. Documentation changes: Corrected typos in docs thanks to Steffen Goeldner. Corrected execute_for_fetch example thanks to Dean Arnold.=head2 Changes in DBI 1.41 (svn rev 130), 22nd February 2004 Fixed execute_for_array() so tuple_status parameter is optional as per docs, thanks to Ed Avis. Fixed execute_for_array() docs to say that it returns undef if any of the execute() calls fail. Fixed take_imp_data() test on m68k reported by Christian Hammers. Fixed write_typeinfo_pm inconsistencies in DBI::DBD::Metadata thanks to Andy Hassall. Fixed $h->{TraceLevel} to not return DBI->trace trace level which it used to if DBI->trace trace level was higher. Changed set_err() to append to errstr, with a leading "\n" if it's not empty, so that multiple error/warning messages are recorded. Changed trace to limit elements dumped when an array reference is returned from a method to the max(40, $DBI::neat_maxlen/10) so that fetchall_arrayref(), for example, doesn't flood the trace. Changed trace level to be a four bit integer (levels 0 thru 15) and a set of topic flags (no topics have been assigned yet). Changed column_info() to check argument count. Extended bind_param() TYPE attribute specification to imply standard formating of value, eg SQL_DATE implies 'YYYY-MM-DD'. Added way for drivers to indicate 'success with info' or 'warning' by setting err to "0" for warning and "" for information. Both values are false and so don't trigger RaiseError etc. Thanks to Steffen Goeldner for the original idea. Added $h->{HandleSetErr} = sub { ... } to be called at the point that an error, warn, or info state is recorded. The code can alter the err, errstr, and state values (e.g., to promote an error to a warning, or the reverse). Added $h->{PrintWarn} attribute to enable printing of warnings recorded by the driver. Defaults to same value as $^W (perl -w). Added $h->{ErrCount} attribute, incremented whenever an error is recorded by the driver via set_err(). Added $h->{Executed} attribute, set if do()/execute() called. Added \%attr parameter to foreign_key_info() method. Added ref count of inner handle to "DESTROY ignored for outer" msg. Added Win32 build config checks to DBI::DBD thanks to Andy Hassall. Added bind_col to Driver.xst so drivers can define their own. Added TYPE attribute to bind_col and specified the expected driver behaviour. Major update to signal handling docs thanks to Lincoln Baxter. Corrected dbiproxy usage doc thanks to Christian Hammers. Corrected type_info_all index hash docs thanks to Steffen Goeldner. Corrected type_info COLUMN_SIZE to chars not bytes thanks to Dean Arnold. Corrected get_info() docs to include details of DBI::Const::GetInfoType. Clarified that $sth->{PRECISION} is OCTET_LENGTH for char types.=head2 Changes in DBI 1.40, 7th January 2004 Fixed handling of CachedKids when DESTROYing threaded handles. Fixed sql_user_name() in DBI::DBD::Metadata (used by write_getinfo_pm) to use $dbh->{Username}. Driver authors please update your code. Changed connect_cached() when running under Apache::DBI to route calls to Apache::DBI::connect(). Added CLONE() to DBD::Sponge and DBD::ExampleP. Added warning when starting a new thread about any loaded driver which does not have a CLONE() function. Added new prepare_cache($sql, \%attr, 3) option to manage Active handles. Added SCALE and NULLABLE support to DBD::Sponge. Added missing execute() in fetchall_hashref docs thanks to Iain Truskett. Added a CONTRIBUTING section to the docs with notes on creating patches.=head2 Changes in DBI 1.39, 27th November 2003 Fixed STORE to not clear error during nested DBI call, again/better, thanks to Tony Bowden for the report and helpful test case. Fixed DBI dispatch to not try to use AUTOLOAD for driver methods unless the method has been declared (as methods should be when using AUTOLOAD). This fixes a problem when the Attribute::Handlers module is loaded. Fixed cwd check code to use $Config{path_sep} thanks to Steve Hay. Fixed unqualified croak() calls thanks to Steffen Goeldner. Fixed DBD::ExampleP TYPE and PRECISION attributes thanks to Tom Lowery. Fixed tracing of methods that only get traced at high trace levels. The level 1 trace no longer includes nested method calls so it generally just shows the methods the application explicitly calls. Added line to trace log (level>=4) when err/errstr is cleared. Updated docs for InactiveDestroy and point out where and when the trace includes the process id. Update DBI::DBD docs thanks to Steffen Goeldner. Removed docs saying that the DBI->data_sources method could be passed a $dbh. The $dbh->data_sources method should be used instead. Added link to 'DBI recipes' thanks to Giuseppe Maxia: http://gmax.oltrelinux.com/dbirecipes.html (note that this is not an endorsement that the recipies are 'optimal') Note: There is a bug in perl 5.8.2 when configured with threads and debugging enabled (bug #24463) which causes a DBI test to fail.=head2 Changes in DBI 1.38, 21th August 2003 NOTE: The DBI now requires perl version 5.6.0 or later. (As per notice in DBI 1.33 released 27th February 2003) Fixed spurious t/03handles failure on 64bit perls reported by H.Merijn Brand. Fixed spurious t/15array failure on some perl versions thanks to Ed Avis. Fixed build using dmake on windows thanks to Steffen Goeldner. Fixed build on using some shells thanks to Gurusamy Sarathy. Fixed ParamValues to only be appended to ShowErrorStatement if not empty. Fixed $dbh->{Statement} not being writable by drivers in some cases. Fixed occasional undef warnings on connect failures thanks to Ed Avis. Fixed small memory leak when using $sth->{NAME..._hash}. Fixed 64bit warnings thanks to Marian Jancar. Fixed DBD::Proxy::db::DESTROY to not alter $@ thanks to Keith Chapman. Fixed Makefile.PL status from WriteMakefile() thanks to Leon Brocard. Changed "Can't set ...->{Foo}: unrecognised attribute" from an error to a warning when running with DBI::ProxyServer to simplify upgrades. Changed execute_array() to no longer require ArrayTupleStatus attribute. Changed DBI->available_drivers to not hide DBD::Sponge. Updated/moved placeholder docs to a better place thanks to Johan Vromans. Changed dbd_db_do4 api in Driver.xst to match dbd_st_execute (return int, not bool), relevant only to driver authors. Changed neat(), and thus trace(), so strings marked as utf8 are presented in double quotes instead of single quotes and are not sanitized. Added $dbh->data_sources method. Added $dbh->last_insert_id method. Added $sth->execute_for_fetch($fetch_tuple_sub, \@tuple_status) method. Added DBI->installed_versions thanks to Jeff Zucker. Added $DBI::Profile::ON_DESTROY_DUMP variable. Added docs for DBD::Sponge thanks to Mark Stosberg.=head2 Changes in DBI 1.37, 15th May 2003 Fixed "Can't get dbh->{Statement}: unrecognised attribute" error in test caused by change to perl internals in 5.8.0 Fixed to build with latest development perl (5.8.1@19525). Fixed C code to use all ANSI declarations thanks to Steven Lembark.=head2 Changes in DBI 1.36, 11th May 2003 Fixed DBI->connect to carp instead of croak on 'old-style' usage. Fixed connect(,,, { RootClass => $foo }) to not croak if module not found. Fixed code generated by DBI::DBD::Metadata thanks to DARREN@cpan.org (#2270) Fixed DBI::PurePerl to not reset $@ during method dispatch. Fixed VMS build thanks to Michael Schwern. Fixed Proxy disconnect thanks to Steven Hirsch. Fixed error in DBI::DBD docs thanks to Andy Hassall. Changed t/40profile.t to not require Time::HiRes. Changed DBI::ProxyServer to load DBI only on first request, which helps threaded server mode, thanks to Bob Showalter. Changed execute_array() return value from row count to executed tuple count, and now the ArrayTupleStatus attribute is mandatory. NOTE: That is an API definition change that may affect your code. Changed CompatMode attribute to also disable attribute 'quick FETCH'. Changed attribute FETCH to be slightly faster thanks to Stas Bekman. Added workaround for perl bug #17575 tied hash nested FETCH thanks to Silvio Wanka. Added Username and Password attributes to connect(..., \%attr) and so also embedded in DSN like "dbi:Driver(Username=user,Password=pass):..." Username and Password can't contain ")", ",", or "=" characters. The predence is DSN first, then \%attr, then $user & $pass parameters, and finally the DBI_USER & DBI_PASS environment variables. The Username attribute is stored in the $dbh but the Password is not. Added ProxyServer HOWTO configure restrictions docs thanks to Jochen Wiedmann. Added MaxRows attribute to selectcol_arrayref prompted by Wojciech Pietron. Added dump_handle as a method not just a DBI:: utility function. Added on-demand by-row data feed into execute_array() using code ref, or statement handle. For example, to insert from a select: $insert_sth->execute_array( { ArrayTupleFetch => $select_sth, ... } ) Added warning to trace log when $h->{foo}=... is ignored due to invalid prefix (e.g., not 'private_').=head2 Changes in DBI 1.35, 7th March 2003 Fixed memory leak in fetchrow_hashref introduced in DBI 1.33. Fixed various DBD::Proxy errors introduced in DBI 1.33. Fixed to ANSI C in dbd_dr_data_sources thanks to Jonathan Leffler. Fixed $h->can($method_name) to return correct code ref. Removed DBI::Format from distribution as it's now part of the separate DBI::Shell distribution by Tom Lowery. Updated DBI::DBD docs with a note about the CLONE method. Updated DBI::DBD docs thanks to Jonathan Leffler. Updated DBI::DBD::Metadata for perl 5.5.3 thanks to Jonathan Leffler. Added note to install_method docs about setup_driver() method.=head2 Changes in DBI 1.34, 28th February 2003 Fixed DBI::DBD docs to refer to DBI::DBD::Metadata thanks to Jonathan Leffler. Fixed dbi_time() compile using BorlandC on Windows thanks to Steffen Goeldner. Fixed profile tests to do enough work to measure on Windows. Fixed disconnect_all() to not be required by drivers. Added $okay = $h->can($method_name) to check if a method exists. Added DBD::*::*->install_method($method_name, \%attr) so driver private methods can be 'installed' into the DBI dispatcher and no longer need to be called using $h->func(..., $method_name). Enhanced $dbh->clone() and documentation.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -