📄 changes.pm
字号:
Enhanced docs to note that dbi_time(), and thus profiling, is limited to only millisecond (seconds/1000) resolution on Windows. Removed old DBI::Shell from distribution and added Tom Lowery's improved version to the Bundle::DBI file. Updated minimum version numbers for modules in Bundle::DBI.=head2 Changes in DBI 1.33, 27th February 2003 NOTE: Future versions of the DBI *will not* support perl 5.6.0 or earlier. : Perl 5.6.1 will be the minimum supported version. NOTE: The "old-style" connect: DBI->connect($database, $user, $pass, $driver); : has been deprecated for several years and will now generate a warning. : It will be removed in a later release. Please change any old connect() calls. Added $dbh2 = $dbh1->clone to make a new connection to the database that is identical to the original one. clone() can be called even after the original handle has been disconnected. See the docs for more details. Fixed merging of profile data to not sum DBIprof_FIRST_TIME values. Fixed unescaping of newlines in DBI::ProfileData thanks to Sam Tregar. Fixed Taint bug with fetchrow_hashref with help from Bradley Baetz. Fixed $dbh->{Active} for DBD::Proxy, reported by Bob Showalter. Fixed STORE to not clear error during nested DBI call, thanks to Tony Bowden for the report and helpful test case. Fixed DBI::PurePerl error clearing behaviour. Fixed dbi_time() and thus DBI::Profile on Windows thanks to Smejkal Petr. Fixed problem that meant ShowErrorStatement could show wrong statement, thanks to Ron Savage for the report and test case. Changed Apache::DBI hook to check for $ENV{MOD_PERL} instead of $ENV{GATEWAY_INTERFACE} thanks to Ask Bjoern Hansen. No longer tries to dup trace logfp when an interpreter is being cloned. Database handles no longer inherit shared $h->err/errstr/state storage from their drivers, so each $dbh has it's own $h->err etc. values and is no longer affected by calls made on other dbh's. Now when a dbh is destroyed it's err/errstr/state values are copied up to the driver so checking $DBI::errstr still works as expected. Build / portability fixes: Fixed t/40profile.t to not use Time::HiRes. Fixed t/06attrs.t to not be locale sensitive, reported by Christian Hammers. Fixed sgi compiler warnings, reported by Paul Blake. Fixed build using make -j4, reported by Jonathan Leffler. Fixed build and tests under VMS thanks to Craig A. Berry. Documentation changes: Documented $high_resolution_time = dbi_time() function. Documented that bind_col() can take an atribute hash. Clarified documentation for ParamValues attribute hash keys. Many good DBI documentation tweaks from Jonathan Leffler, including a major update to the DBI::DBD driver author guide. Clarified that execute() should itself call finish() if it's called on a statement handle that's still active. Clarified $sth->{ParamValues}. Driver authors please note. Removed "NEW" markers on some methods and attributes and added text to each giving the DBI version it was added in, if it was added after DBI 1.21 (Feb 2002). Changes of note for authors of all drivers: Added SQL_DATA_TYPE, SQL_DATETIME_SUB, NUM_PREC_RADIX, and INTERVAL_PRECISION fields to docs for type_info_all. There were already in type_info(), but type_info_all() didn't specify the index values. Please check and update your type_info_all() code. Added DBI::DBD::Metadata module that auto-generates your drivers get_info and type_info_all data and code, thanks mainly to Jonathan Leffler and Steffen Goeldner. If you've not implemented get_info and type_info_all methods and your database has an ODBC driver available then this will do all the hard work for you! Drivers should no longer pass Err, Errstr, or State to _new_drh or _new_dbh functions. Please check that you support the slightly modified behaviour of $sth->{ParamValues}, e.g., always return hash with keys if possible. Changes of note for authors of compiled drivers: Added dbd_db_login6 & dbd_st_finish3 prototypes thanks to Jonathan Leffler. All dbd_*_*() functions implemented by drivers must have a corresponding #define dbd_*_* <driver_prefix>_*_* otherwise the driver may not work with a future release of the DBI. Changes of note for authors of drivers which use Driver.xst: Some new method hooks have been added are are enabled by defining corresponding macros: $drh->data_sources() - dbd_dr_data_sources $dbh->do() - dbd_db_do4 The following methods won't be compiled into the driver unless the corresponding macro has been #defined: $drh->disconnect_all() - dbd_discon_all=head2 Changes in DBI 1.32, 1st December 2002 Fixed to work with 5.005_03 thanks to Tatsuhiko Miyagawa (I've not tested it). Reenabled taint tests (accidentally left disabled) spotted by Bradley Baetz. Improved docs for FetchHashKeyName attribute thanks to Ian Barwick. Fixed core dump if fetchrow_hashref given bad argument (name of attribute with a value that wasn't an array reference), spotted by Ian Barwick. Fixed some compiler warnings thanks to David Wheeler. Updated Steven Hirsch's enhanced proxy work (seems I left out a bit). Made t/40profile.t tests more reliable, reported by Randy, who is part of the excellent CPAN testers team: http://testers.cpan.org/ (Please visit, see the valuable work they do and, ideally, join in!)=head2 Changes in DBI 1.31, 29th November 2002 The fetchall_arrayref method, when called with a $maxrows parameter, no longer gives an error if called again after all rows have been fetched. This simplifies application logic when fetching in batches. Also added batch-fetch while() loop example to the docs. The proxy now supports non-lazy (synchronous) prepare, positioned updates (for selects containing 'for update'), PlRPC config set via attributes, and accurate propagation of errors, all thanks to Steven Hirsch (plus a minor fix from Sean McMurray and doc tweaks from Michael A Chase). The DBI_AUTOPROXY env var can now hold the full dsn of the proxy driver plus attributes, like "dbi:Proxy(proxy_foo=>1):host=...". Added TaintIn & TaintOut attributes to give finer control over tainting thanks to Bradley Baetz. The RootClass attribute no longer ignores failure to load a module, but also doesn't try to load a module if the class already exists, with thanks to James FitzGibbon. HandleError attribute works for connect failures thanks to David Wheeler. The connect() RaiseError/PrintError message now includes the username. Changed "last handle unknown or destroyed" warning to be a trace message. Removed undocumented $h->event() method. Further enhancements to DBD::PurePerl accuracy. The CursorName attribute now defaults to undef and not an error. DBI::Profile changes: New DBI::ProfileDumper, DBI::ProfileDumper::Apache, and DBI::ProfileData modules (to manage the storage and processing of profile data), plus dbiprof program for analyzing profile data - with many thanks to Sam Tregar. Added $DBI::err (etc) tied variable lookup time to profile. Added time for DESTROY method into parent handles profile (used to be ignored). Documentation changes: Documented $dbh = $sth->{Database} attribute. Documented $dbh->connected(...) post-connection call when subclassing. Updated some minor doc issues thanks to H.Merijn Brand. Updated Makefile.PL example in DBI::DBD thanks to KAWAI,Takanori. Fixed execute_array() example thanks to Peter van Hardenberg. Changes for driver authors, not required but strongly recommended: Change DBIS to DBIc_DBISTATE(imp_xxh) [or imp_dbh, imp_sth etc] Change DBILOGFP to DBIc_LOGPIO(imp_xxh) [or imp_dbh, imp_sth etc] Any function from which all instances of DBIS and DBILOGFP are removed can also have dPERLINTERP removed (a good thing). All use of the DBIh_EVENT* macros should be removed. Major update to DBI::DBD docs thanks largely to Jonathan Leffler. Add these key values: 'Err' => \my $err, 'Errstr' => \my $errstr, to the hash passed to DBI::_new_dbh() in your driver source code. That will make each $dbh have it's own $h->err and $h->errstr values separate from other $dbh belonging to the same driver. If you have a ::db or ::st DESTROY methods that do nothing you can now remove them - which speeds up handle destruction.=head2 Changes in DBI 1.30, 18th July 2002 Fixed problems with selectrow_array, selectrow_arrayref, and selectall_arrayref introduced in DBI 1.29. Fixed FETCHing a handle attribute to not clear $DBI::err etc (broken in 1.29). Fixed core dump at trace level 9 or above. Fixed compilation with perl 5.6.1 + ithreads (i.e. Windows). Changed definition of behaviour of selectrow_array when called in a scalar context to match fetchrow_array. Corrected selectrow_arrayref docs which showed selectrow_array thanks to Paul DuBois.=head2 Changes in DBI 1.29, 15th July 2002 NOTE: This release changes the specified behaviour for the : fetchrow_array method when called in a scalar context: : The DBI spec used to say that it would return the FIRST field. : Which field it returns (i.e., the first or the last) is now undefined. : This does not affect statements that only select one column, which is : usually the case when fetchrow_array is called in a scalar context. : FYI, this change was triggered by discovering that the fetchrow_array : implementation in Driver.xst (used by most compiled drivers) : didn't match the DBI specification. Rather than change the code : to match, and risk breaking existing applications, I've changed the : specification (that part was always of dubious value anyway). NOTE: Future versions of the DBI may not support for perl 5.5 much longer. : If you are still using perl 5.005_03 you should be making plans to : upgrade to at least perl 5.6.1, or 5.8.0. Perl 5.8.0 is due to be : released in the next week or so. (Although it's a "point 0" release, : it is the most throughly tested release ever.) Added XS/C implementations of selectrow_array, selectrow_arrayref, and selectall_arrayref to Driver.xst. See DBI 1.26 Changes for more info. Removed support for the old (fatally flawed) "5005" threading model. Added support for new perl 5.8 iThreads thanks to Gerald Richter. (Threading support and safety should still be regarded as beta quality until further notice. But it's much better than it was.) Updated the "Threads and Thread Safety" section of the docs. The trace output can be sent to STDOUT instead of STDERR by using "STDOUT" as the name of the file, i.e., $h->trace(..., "STDOUT") Added pointer to perlreftut, perldsc, perllol, and perlboot manuals into the intro section of the docs, suggested by Brian McCain. Fixed DBI::Const::GetInfo::* pod docs thanks to Zack Weinberg. Some changes to how $dbh method calls are treated by DBI::Profile: Meta-data methods now clear $dbh->{Statement} on entry. Some $dbh methods are now profiled as if $dbh->{Statement} was empty (because thet're unlikely to actually relate to its contents). Updated dbiport.h to ppport.h from perl 5.8.0. Tested with perl 5.5.3 (vanilla, Solaris), 5.6.1 (vanilla, Solaris), and perl 5.8.0 (RC3@17527 with iThreads & Multiplicity on Solaris and FreeBSD).=head2 Changes in DBI 1.28, 14th June 2002 Added $sth->{ParamValues} to return a hash of the most recent values bound to placeholders via bind_param() or execute(). Individual drivers need to be updated to support it. Enhanced ShowErrorStatement to include ParamValues if available: "DBD::foo::st execute failed: errstr [for statement ``...'' with params: 1='foo']" Further enhancements to DBD::PurePerl accuracy.=head2 Changes in DBI 1.27, 13th June 2002 Fixed missing column in C implementation of fetchall_arrayref() thanks to Philip Molter for the prompt reporting of the problem.=head2 Changes in DBI 1.26, 13th June 2002 Fixed t/40profile.t to work on Windows thanks to Smejkal Petr. Fixed $h->{Profile} to return undef, not error, if not set. Fixed DBI->available_drivers in scalar context thanks to Michael Schwern. Added C implementations of selectrow_arrayref() and fetchall_arrayref() in Driver.xst. All compiled drivers using Driver.xst will now be faster making those calls. Most noticable with fetchall_arrayref for many rows or selectrow_arrayref with a fast query. For example, using DBD::mysql a selectrow_arrayref for a single row using a primary key is ~20% faster, and fetchall_arrayref for 20000 rows is twice as fast! Drivers just need to be recompiled and reinstalled to enable it. The fetchall_arrayref speed up only applies if $slice parameter is not used. Added $max_rows parameter to fetchall_arrayref() to optionally limit the number of rows returned. Can now fetch batches of rows. Added MaxRows attribute to selectall_arrayref() which then passes it to fetchall_arrayref(). Changed selectrow_array to make use of selectrow_arrayref. Trace level 1 now shows first two parameters of all methods (used to only for that for some, like prepare,execute,do etc) Trace indicator for recursive calls (first char on trace lines) now starts at 1 not 2. Documented that $h->func() does not trigger RaiseError etc so applications must explicitly check for errors. DBI::Profile with DBI_PROFILE now shows percentage time inside DBI.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -