1=head1 NAME 2 3DBI::Changes - List of significant changes to the DBI 4 5=encoding UTF-8 6 7=cut 8 9=head2 Changes in DBI 1.643 - ... 10 11 Fix memory corruption in XS functions when Perl stack is reallocated 12 thanks to Pali 13 Fix calling dbd_db_do6 API function 14 thanks to Pali 15 Fix potentially calling newSV(0) in malloc_using_sv() 16 thanks to Pali 17 Fix order of XS preparse() ps_accept and ps_return argument names 18 thanks to Petr Písař 19 Fix a potential NULL profile dereference in dbi_profile() 20 thanks to Petr Písař 21 Fix a buffer overflow on an overlong DBD class name 22 thanks to Petr Písař 23 24 Remove remnants of support for perl <= v5.8.0 25 thanks to Pali and H.Merijn Brand 26 Update Devel::PPPort and remove redundant compatibility macros 27 thanks to Pali and H.Merijn Brand 28 29 Correct minor typo in documentation 30 thanks to Mohammad Anwar 31 Correct documentation introducing $dbh->selectall_array() 32 thanks to Pali 33 Introduce select and do wrappers earlier in the documentation 34 thanks to Dan Book 35 Mark as deprecated old API functions which overflow or are affected by 36 Unicode issues, thanks to Pali 37 38 Add new attribute RaiseWarn, similar to RaiseError, 39 thanks to Pali 40 41=head2 Changes in DBI 1.642 - 28th October 2018 42 43 Fix '.' in @INC for proxy test under parallel load 44 thanks to H.Merijn Brand. 45 Fix driver-related croak() in DBI->connect to report the original DSN 46 thanks to maxatome #67 47 48 Introduce a new statement DBI method $sth->last_insert_id() 49 thanks to pali #64 50 Allow to call $dbh->last_insert_id() method without arguments 51 thanks to pali #64 52 Added a new XS API function variant dbd_db_do6() 53 thanks to Pali #61 54 55 Fix misprints in doc of selectall_hashref 56 thanks to Perlover #69 57 Remove outdated links to DBI related training resources. RT#125999 58 59=head2 Changes in DBI 1.641 - 19th March 2018 60 61 Remove dependency on Storable 2.16 introduced in DBI 1.639 62 thanks to Ribasushi #60 63 Avoid compiler warnings in Driver.xst #59 64 thanks to pali #59 65 66=head2 Changes in DBI 1.640 - 28th January 2018 67 68 Fix test t/91_store_warning.t for perl 5.10.0 69 thanks to pali #57 70 71 Add Perl 5.10.0 and 5.8.1 specific versions to Travis testing 72 thanks to pali #57 73 Add registration of mariadb_ prefix for new DBD::MariaDB driver 74 thanks to pali #56 75 76=head2 Changes in DBI 1.639 - 28th December 2017 77 78 Fix UTF-8 support for warn/croak calls within DBI internals, 79 thanks to pali #53 80 Fix dependency on Storable for perl older than 5.8.9, 81 thanks to H.Merijn Brand. 82 83 Add DBD::Mem driver, a pure-perl in-memory driver using DBI::DBD::SqlEngine, 84 thanks to Jens Rehsack #42 85 86 Corrected missing semicolon in example in documentation, 87 thanks to pali #55 88 89=head2 Changes in DBI 1.637 - 16th August 2017 90 91 Fix use of externally controlled format string (CWE-134) thanks to pali #44 92 This could cause a crash if, for example, a db error contained a %. 93 https://cwe.mitre.org/data/definitions/134.html 94 Fix extension detection for DBD::File related drivers 95 Fix tests for perl without dot in @INC RT#120443 96 Fix loss of error message on parent handle, thanks to charsbar #34 97 Fix disappearing $_ inside callbacks, thanks to robschaber #47 98 Fix dependency on Storable for perl older than 5.8.9 99 100 Allow objects to be used as passwords without throwing an error, thanks to demerphq #40 101 Allow $sth NAME_* attributes to be set from Perl code, re #45 102 Added support for DBD::XMLSimple thanks to nigelhorne #38 103 104 Documentation updates: 105 Improve examples using eval to be more correct, thanks to pali #39 106 Add cautionary note to prepare_cached docs re refs in %attr #46 107 Small POD changes (Getting Help -> Online) thanks to openstrike #33 108 Adds links to more module names and fix typo, thanks to oalders #43 109 Typo fix thanks to bor #37 110 111=head2 Changes in DBI 1.636 - 24th April 2016 112 113 Fix compilation for threaded perl <= 5.12 broken in 1.635 RT#113955 114 Revert change to DBI::PurePerl DESTROY in 1.635 115 Change t/16destroy.t to avoid race hazard RT#113951 116 Output perl version and archname in t/01basics.t 117 Add perl 5.22 and 5.22-extras to travis-ci config 118 119=head2 Changes in DBI 1.635 - 24th April 2016 120 121 Fixed RaiseError/PrintError for UTF-8 errors/warnings. RT#102404 122 Fixed cases where ShowErrorStatement might show incorrect Statement RT#97434 123 Fixed DBD::Gofer for UTF-8-enabled STDIN/STDOUT 124 thanks to mauke PR#32 125 Fixed fetchall_arrayref({}) behavior with no columns 126 thanks to Dan McGee PR#31 127 Fixed tied CachedKids ref leak in attribute cache by weakening 128 thanks to Michael Conrad RT#113852 129 Fixed "panic: attempt to copy freed scalar" upon commit() or rollback() 130 thanks to fbriere for detailed bug report RT#102791 131 Ceased to ignore DESTROY of outer handle in DBI::PurePerl 132 Treat undef in DBI::Profile Path as string "undef" 133 thanks to fREW Schmidt RT#113298 134 Fix SQL::Nano parser to ignore trailing semicolon 135 thanks to H.Merijn Brand. 136 137 Added @ary = $dbh->selectall_array(...) method 138 thanks to Ed Avis RT#106411 139 Added appveyor support (Travis like CI for windows) 140 thanks to mbeijen PR#30 141 142 Corrected spelling errors in pod 143 thanks to Gregor Herrmann RT#107838 144 Corrected and/or removed broken links to SQL standards 145 thanks to David Pottage RT#111437 146 Corrected doc example to use dbi: instead of DBI: in DSN 147 thanks to Michael R. Davis RT#101181 148 Removed/updated broken links in docs 149 thanks to mbeijen PR#29 150 Clarified docs for DBI::hash($string) 151 Removed the ancient DBI::FAQ module RT#102714 152 Fixed t/pod.t to require Test::Pod >= 1.41 RT#101769 153 154This release was developed at the Perl QA Hackathon 2016 155L<http://act.qa-hackathon.org/qa2016/> 156which was made possible by the generosity of many sponsors: 157 158L<https://www.fastmail.com> FastMail, 159L<https://www.ziprecruiter.com> ZipRecruiter, 160L<http://www.activestate.com> ActiveState, 161L<http://www.opusvl.com> OpusVL, 162L<https://www.strato.com> Strato, 163L<http://www.surevoip.co.uk> SureVoIP, 164L<http://www.cv-library.co.uk> CV-Library, 165L<https://www.iinteractive.com/> Infinity, 166L<https://opensource.careers/perl-careers/> Perl Careers, 167L<https://www.mongodb.com> MongoDB, 168L<https://www.thinkproject.com> thinkproject!, 169L<https://www.dreamhost.com/> Dreamhost, 170L<http://www.perl6.org/> Perl 6, 171L<http://www.perl-services.de/> Perl Services, 172L<https://www.evozon.com/> Evozon, 173L<http://www.booking.com> Booking, 174L<http://eligo.co.uk> Eligo, 175L<http://www.oetiker.ch/> Oetiker+Partner, 176L<http://capside.com/en/> CAPSiDE, 177L<https://www.procura.nl/> Procura, 178L<https://constructor.io/> Constructor.io, 179L<https://metacpan.org/author/BABF> Robbie Bow, 180L<https://metacpan.org/author/RSAVAGE> Ron Savage, 181L<https://metacpan.org/author/ITCHARLIE> Charlie Gonzalez, 182L<https://twitter.com/jscook2345> Justin Cook. 183 184=head2 Changes in DBI 1.634 - 3rd August 2015 185 186 Enabled strictures on all modules (Jose Luis Perez Diez) #22 187 Note that this might cause new exceptions in existing code. 188 Please take time for extra testing before deploying to production. 189 Improved handling of row counts for compiled drivers and enable them to 190 return larger row counts (IV type) by defining new *_iv macros. 191 Fixed quote_identifier that was adding a trailing separator when there 192 was only a catalog (Martin J. Evans) 193 194 Removed redundant keys() call in fetchall_arrayref with hash slice (ilmari) #24 195 Corrected pod xref to Placeholders section (Matthew D. Fuller) 196 Corrected pod grammar (Nick Tonkin) #25 197 198 Added support for tables('', '', '', '%') special case (Martin J. Evans) 199 Added support for DBD prefixes with numbers (Jens Rehsack) #19 200 Added extra initializer for DBI::DBD::SqlEngine based DBD's (Jens Rehsack) 201 Added Memory Leaks section to the DBI docs (Tim) 202 Added Artistic v1 & GPL v1 LICENSE file (Jose Luis Perez Diez) #21 203 204=head2 Changes in DBI 1.633 - 11th Jan 2015 205 206 Fixed selectrow_*ref to return undef on error in list context 207 instead if an empty list. 208 Changed t/42prof_data.t more informative 209 Changed $sth->{TYPE} to be NUMERIC in DBD::File drivers as per the 210 DBI docs. Note TYPE_NAME is now also available. [H.Merijn Brand] 211 Fixed compilation error on bleadperl due DEFSV no longer being an lvalue 212 [Dagfinn Ilmari Mannsåker] 213 214 Added docs for escaping placeholders using a backslash. 215 Added docs for get_info(9000) indicating ability to escape placeholders. 216 Added multi_ prefix for DBD::Multi (Dan Wright) and ad2_ prefix for 217 DBD::AnyData2 218 219=head2 Changes in DBI 1.632 - 9th Nov 2014 220 221 Fixed risk of memory corruption with many arguments to methods 222 originally reported by OSCHWALD for Callbacks but may apply 223 to other functionality in DBI method dispatch RT#86744. 224 Fixed DBD::PurePerl to not set $sth->{Active} true by default 225 drivers are expected to set it true as needed. 226 Fixed DBI::DBD::SqlEngine to complain loudly when prerequite 227 driver_prefix is not fulfilled (RT#93204) [Jens Rehsack] 228 Fixed redundant sprintf argument warning RT#97062 [Reini Urban] 229 Fixed security issue where DBD::File drivers would open files 230 from folders other than specifically passed using the 231 f_dir attribute RT#99508 [H.Merijn Brand] 232 233 Changed delete $h->{$key} to work for keys with 'private_' prefix 234 per request in RT#83156. local $h->{$key} works as before. 235 236 Added security notice to DBD::Proxy and DBI::ProxyServer because they 237 use Storable which is insecure. Thanks to ppisar@redhat.com RT#90475 238 Added note to AutoInactiveDestroy docs strongly recommending that it 239 is enabled in all new code. 240 241=head2 Changes in DBI 1.631 - 20th Jan 2014 242 243NOTE: This release changes the handle passed to Callbacks from being an 'inner' 244handle to being an 'outer' handle. If you have code that makes use of Callbacks, 245ensure that you understand what this change means and review your callback code. 246 247 Fixed err_hash handling of integer err RT#92172 [Dagfinn Ilmari] 248 Fixed use of \Q vs \E in t/70callbacks.t 249 250 Changed the handle passed to Callbacks from being an 'inner' 251 handle to being an 'outer' handle. 252 253 Improved reliability of concurrent testing 254 PR#8 [Peter Rabbitson] 255 Changed optional dependencies to "suggest" 256 PR#9 [Karen Etheridge] 257 Changed to avoid mg_get in neatsvpv during global destruction 258 PR#10 [Matt Phillips] 259 260=head2 Changes in DBI 1.630 - 28th Oct 2013 261 262NOTE: This release enables PrintWarn by default regardless of $^W. 263Your applications may generate more log messages than before. 264 265 Fixed err for new drh to be undef not to 0 [Martin J. Evans] 266 Fixed RT#83132 - moved DBIstcf* constants to util 267 export tag [Martin J. Evans] 268 PrintWarn is now triggered by warnings recorded in methods like STORE 269 that don't clear err RT#89015 [Tim Bunce] 270 271 Changed tracing to no longer show quote and quote_identifier calls 272 at trace level 1. 273 Changed DBD::Gofer ping while disconnected set_err from warn to info. 274 Clarified wording of log message when err is cleared. 275 Changed bootstrap to use $XS_VERSION RT#89618 [Andreas Koenig] 276 277 Added connect_cached.connected Callback PR#3 [David E. Wheeler] 278 279 Clarified effect of refs in connect_cached attributes [David E. Wheeler] 280 Extended ReadOnly attribute docs for when the driver cannot 281 ensure read only [Martin J. Evans] 282 Corrected SQL_BIGINT docs to say ODBC value is used PR#5 [ilmari] 283 284There was no DBI 1.629 release. 285 286=head2 Changes in DBI 1.628 - 22nd July 2013 287 288 Fixed missing fields on partial insert via DBI::DBD::SqlEngine 289 engines (DBD::CSV, DBD::DBM etc.) [H.Merijn Brand, Jens Rehsack] 290 Fixed stack corruption on callbacks RT#85562 RT#84974 [Aaron Schweiger] 291 Fixed DBI::SQL::Nano_::Statement handling of "0" [Jens Rehsack] 292 Fixed exit op precedence in test RT#87029 [Reni Urban] 293 294 Added support for finding tables in multiple directories 295 via new DBD::File f_dir_search attribute [H.Merijn Brand] 296 Enable compiling by C++ RT#84285 [Kurt Jaeger] 297 298 Typo fixes in pod and comment [David Steinbrunner] 299 Change DBI's docs to refer to git not svn [H.Merijn Brand] 300 Clarify bind_col TYPE attribute is sticky [Martin J. Evans] 301 Fixed reference to $sth in selectall_arrayref docs RT#84873 302 Spelling fixes [Ville Skyttä] 303 Changed $VERSIONs to hardcoded strings [H.Merijn Brand] 304 305=head2 Changes in DBI 1.627 - 16th May 2013 306 307 Fixed VERSION regression in DBI::SQL::Nano [Tim Bunce] 308 309=head2 Changes in DBI 1.626 - 15th May 2013 310 311 Fixed pod text/link was reversed in a few cases RT#85168 312 [H.Merijn Brand] 313 314 Handle aliasing of STORE'd attributes in DBI::DBD::SqlEngine 315 [Jens Rehsack] 316 317 Updated repository URI to git [Jens Rehsack] 318 319 Fixed skip() count arg in t/48dbi_dbd_sqlengine.t [Tim Bunce] 320 321=head2 Changes in DBI 1.625 (svn r15595) 28th March 2013 322 323 Fixed heap-use-after-free during global destruction RT#75614 324 thanks to Reini Urban. 325 Fixed ignoring RootClass attribute during connect() by 326 DBI::DBD::SqlEngine reported in RT#84260 by Michael Schout 327 328=head2 Changes in DBI 1.624 (svn r15576) 22nd March 2013 329 330 Fixed Gofer for hash randomization in perl 5.17.10+ RT#84146 331 332 Clarify docs for can() re RT#83207 333 334=head2 Changes in DBI 1.623 (svn r15547) 2nd Jan 2013 335 336 Fixed RT#64330 - ping wipes out errstr (Martin J. Evans). 337 Fixed RT#75868 - DBD::Proxy shouldn't call connected() on the server. 338 Fixed RT#80474 - segfault in DESTROY with threads. 339 Fixed RT#81516 - Test failures due to hash randomisation in perl 5.17.6 340 thanks to Jens Rehsack and H.Merijn Brand and feedback on IRC 341 Fixed RT#81724 - Handle copy-on-write scalars (sprout) 342 Fixed unused variable / self-assignment compiler warnings. 343 Fixed default table_info in DBI::DBD::SqlEngine which passed NAMES 344 attribute instead of NAME to DBD::Sponge RT72343 (Martin J. Evans) 345 346 Corrected a spelling error thanks to Chris Sanders. 347 Corrected typo in DBI->installed_versions docs RT#78825 348 thanks to Jan Dubois. 349 350 Refactored table meta information management from DBD::File into 351 DBI::DBD::SqlEngine (H.Merijn Brand, Jens Rehsack) 352 Prevent undefined f_dir being used in opendir (H.Merijn Brand) 353 354 Added logic to force destruction of children before parents 355 during global destruction. See RT#75614. 356 Added DBD::File Plugin-Support for table names and data sources 357 (Jens Rehsack, #dbi Team) 358 Added new tests to 08keeperr for RT#64330 359 thanks to Kenichi Ishigaki. 360 Added extra internal handle type check, RT#79952 361 thanks to Reini Urban. 362 Added cubrid_ registered prefix for DBD::cubrid, RT#78453 363 364 Removed internal _not_impl method (Martin J. Evans). 365 366 NOTE: The "old-style" DBD::DBM attributes 'dbm_ext' and 'dbm_lockfile' 367 have been deprecated for several years and their use will now generate 368 a warning. 369 370=head2 Changes in DBI 1.622 (svn r15327) 6th June 2012 371 372 Fixed lack of =encoding in non-ASCII pod docs. RT#77588 373 374 Corrected typo in DBI::ProfileDumper thanks to Finn Hakansson. 375 376=head2 Changes in DBI 1.621 (svn r15315) 21st May 2012 377 378 Fixed segmentation fault when a thread is created from 379 within another thread RT#77137, thanks to Dave Mitchell. 380 Updated previous Changes to credit Booking.com for sponsoring 381 Dave Mitchell's recent DBI optimization work. 382 383=head2 Changes in DBI 1.620 (svn r15300) 25th April 2012 384 385 Modified column renaming in fetchall_arrayref, added in 1.619, 386 to work on column index numbers not names (an incompatible change). 387 Reworked the fetchall_arrayref documentation. 388 Hash slices in fetchall_arrayref now detect invalid column names. 389 390=head2 Changes in DBI 1.619 (svn r15294) 23rd April 2012 391 392 Fixed the connected method to stop showing the password in 393 trace file (Martin J. Evans). 394 Fixed _install_method to set CvFILE correctly 395 thanks to sprout RT#76296 396 Fixed SqlEngine "list_tables" thanks to David McMath 397 and Norbert Gruener. RT#67223 RT#69260 398 399 Optimized DBI method dispatch thanks to Dave Mitchell. 400 Optimized driver access to DBI internal state thanks to Dave Mitchell. 401 Optimized driver access to handle data thanks to Dave Mitchell. 402 Dave's work on these optimizations was sponsored by Booking.com. 403 Optimized fetchall_arrayref with hash slice thanks 404 to Dagfinn Ilmari Mannsåker. RT#76520 405 Allow renaming columns in fetchall_arrayref hash slices 406 thanks to Dagfinn Ilmari Mannsåker. RT#76572 407 Reserved snmp_ and tree_ for DBD::SNMP and DBD::TreeData 408 409=head2 Changes in DBI 1.618 (svn r15170) 25rd February 2012 410 411 Fixed compiler warnings in Driver_xst.h (Martin J. Evans) 412 Fixed compiler warning in DBI.xs (H.Merijn Brand) 413 Fixed Gofer tests failing on Windows RT74975 (Manoj Kumar) 414 Fixed my_ctx compile errors on Windows (Dave Mitchell) 415 416 Significantly optimized method dispatch via cache (Dave Mitchell) 417 Significantly optimized DBI internals for threads (Dave Mitchell) 418 Dave's work on these optimizations was sponsored by Booking.com. 419 Xsub to xsub calling optimization now enabled for threaded perls. 420 Corrected typo in example in docs (David Precious) 421 Added note that calling clone() without an arg may warn in future. 422 Minor changes to the install_method() docs in DBI::DBD. 423 Updated dbipport.h from Devel::PPPort 3.20 424 425=head2 Changes in DBI 1.617 (svn r15107) 30th January 2012 426 427 NOTE: The officially supported minimum perl version will change 428 from perl 5.8.1 (2003) to perl 5.8.3 (2004) in a future release. 429 (The last change, from perl 5.6 to 5.8.1, was announced 430 in July 2008 and implemented in DBI 1.611 in April 2010.) 431 432 Fixed ParamTypes example in the pod (Martin J. Evans) 433 Fixed the definition of ArrayTupleStatus and remove confusion over 434 rows affected in list context of execute_array (Martin J. Evans) 435 Fixed sql_type_cast example and typo in errors (Martin J. Evans) 436 Fixed Gofer error handling for keeperr methods like ping (Tim Bunce) 437 Fixed $dbh->clone({}) RT73250 (Tim Bunce) 438 Fixed is_nested_call logic error RT73118 (Reini Urban) 439 440 Enhanced performance for threaded perls (Dave Mitchell, Tim Bunce) 441 Dave's work on this optimization was sponsored by Booking.com. 442 Enhanced and standardized driver trace level mechanism (Tim Bunce) 443 Removed old code that was an inneffective attempt to detect 444 people doing DBI->{Attrib}. 445 Clear ParamValues on bind_param param count error RT66127 (Tim Bunce) 446 Changed DBI::ProxyServer to require DBI at compile-time RT62672 (Tim Bunce) 447 448 Added pod for default_user to DBI::DBD (Martin J. Evans) 449 Added CON, ENC and DBD trace flags and extended 09trace.t (Martin J. Evans) 450 Added TXN trace flags and applied CON and TXN to relevant methods (Tim Bunce) 451 Added some more fetchall_arrayref(..., $maxrows) tests (Tim Bunce) 452 Clarified docs for fetchall_arrayref called on an inactive handle. 453 Clarified docs for clone method (Tim Bunce) 454 Added note to DBI::Profile about async queries (Marcel Grünauer). 455 Reserved spatialite_ as a driver prefix for DBD::Spatialite 456 Reserved mo_ as a driver prefix for DBD::MO 457 Updated link to the SQL Reunion 95 docs, RT69577 (Ash Daminato) 458 Changed links for DBI recipes. RT73286 (Martin J. Evans) 459 460=head2 Changes in DBI 1.616 (svn r14616) 30th December 2010 461 462 Fixed spurious dbi_profile lines written to the log when 463 profiling is enabled and a trace flag, like SQL, is used. 464 Fixed to recognize SQL::Statement errors even if instantiated 465 with RaiseError=0 (Jens Rehsack) 466 Fixed RT#61513 by catching attribute assignment to tied table access 467 interface (Jens Rehsack) 468 Fixing some misbehavior of DBD::File when running within the Gofer 469 server. 470 Fixed compiler warnings RT#62640 471 472 Optimized connect() to remove redundant FETCH of \%attrib values. 473 Improved initialization phases in DBI::DBD::SqlEngine (Jens Rehsack) 474 475 Added DBD::Gofer::Transport::corostream. An experimental proof-of-concept 476 transport that enables asynchronous database calls with few code changes. 477 It enables asynchronous use of DBI frameworks like DBIx::Class. 478 479 Added additional notes on DBDs which avoid creating a statement in 480 the do() method and the effects on error handlers (Martin J. Evans) 481 Adding new attribute "sql_dialect" to DBI::DBD::SqlEngine to allow 482 users control used SQL dialect (ANSI, CSV or AnyData), defaults to 483 CSV (Jens Rehsack) 484 Add documentation for DBI::DBD::SqlEngine attributes (Jens Rehsack) 485 Documented dbd_st_execute return (Martin J. Evans) 486 Fixed typo in InactiveDestroy thanks to Emmanuel Rodriguez. 487 488=head2 Changes in DBI 1.615 (svn r14438) 21st September 2010 489 490 Fixed t/51dbm_file for file/directory names with whitespaces in them 491 RT#61445 (Jens Rehsack) 492 Fixed compiler warnings from ignored hv_store result (Martin J. Evans) 493 Fixed portability to VMS (Craig A. Berry) 494 495=head2 Changes in DBI 1.614 (svn r14408) 17th September 2010 496 497 Fixed bind_param () in DBI::DBD::SqlEngine (rt#61281) 498 Fixed internals to not refer to old perl symbols that 499 will no longer be visible in perl >5.13.3 (Andreas Koenig) 500 Many compiled drivers are likely to need updating. 501 Fixed issue in DBD::File when absolute filename is used as table name 502 (Jens Rehsack) 503 Croak manually when file after tie doesn't exists in DBD::DBM 504 when it have to exists (Jens Rehsack) 505 Fixed issue in DBD::File when users set individual file name for tables 506 via f_meta compatibility interface - reported by H.Merijn Brand while 507 working on RT#61168 (Jens Rehsack) 508 509 Changed 50dbm_simple to simplify and fix problems (Martin J. Evans) 510 Changed 50dbm_simple to skip aggregation tests when not using 511 SQL::Statement (Jens Rehsack) 512 Minor speed improvements in DBD::File (Jens Rehsack) 513 514 Added $h->{AutoInactiveDestroy} as simpler safer form of 515 $h->{InactiveDestroy} (David E. Wheeler) 516 Added ability for parallel testing "prove -j4 ..." (Jens Rehsack) 517 Added tests for delete in DBM (H.Merijn Brand) 518 Added test for absolute filename as table to 51dbm_file (Jens Rehsack) 519 Added two initialization phases to DBI::DBD::SqlEngine (Jens Rehsack) 520 Added improved developers documentation for DBI::DBD::SqlEngine 521 (Jens Rehsack) 522 Added guides how to write DBI drivers using DBI::DBD::SqlEngine 523 or DBD::File (Jens Rehsack) 524 Added register_compat_map() and table_meta_attr_changed() to 525 DBD::File::Table to support clean fix of RT#61168 (Jens Rehsack) 526 527=head2 Changes in DBI 1.613 (svn r14271) 22nd July 2010 528 529 Fixed Win32 prerequisite module from PathTools to File::Spec. 530 531 Changed attribute headings and fixed references in DBI pod (Martin J. Evans) 532 Corrected typos in DBI::FAQ and DBI::ProxyServer (Ansgar Burchardt) 533 534=head2 Changes in DBI 1.612 (svn r14254) 16th July 2010 535 536NOTE: This is a minor release for the DBI core but a major release for 537DBD::File and drivers that depend on it, like DBD::DBM and DBD::CSV. 538 539This is also the first release where the bulk of the development work 540has been done by other people. I'd like to thank (in no particular order) 541Jens Rehsack, Martin J. Evans, and H.Merijn Brand for all their contributions. 542 543 Fixed DBD::File's {ChopBlank} handling (it stripped \s instead of space 544 only as documented in DBI) (H.Merijn Brand) 545 Fixed DBD::DBM breakage with SQL::Statement (Jens Rehsack, fixes RT#56561) 546 Fixed DBD::File file handle leak (Jens Rehsack) 547 Fixed problems in 50dbm.t when running tests with multiple 548 dbms (Martin J. Evans) 549 Fixed DBD::DBM bugs found during tests (Jens Rehsack) 550 Fixed DBD::File doesn't find files without extensions under some 551 circumstances (Jens Rehsack, H.Merijn Brand, fixes RT#59038) 552 553 Changed Makefile.PL to modernize with CONFLICTS, recommended dependencies 554 and resources (Jens Rehsack) 555 Changed DBI::ProfileDumper to rename any existing profile file by 556 appending .prev, instead of overwriting it. 557 Changed DBI::ProfileDumper::Apache to work in more configurations 558 including vhosts using PerlOptions +Parent. 559 Add driver_prefix method to DBI (Jens Rehsack) 560 561 Added more tests to 50dbm_simple.t to prove optimizations in 562 DBI::SQL::Nano and SQL::Statement (Jens Rehsack) 563 Updated tests to cover optional installed SQL::Statement (Jens Rehsack) 564 Synchronize API between SQL::Statement and DBI::SQL::Nano (Jens Rehsack) 565 Merged some optimizations from SQL::Statement into DBI::SQL::Nano 566 (Jens Rehsack) 567 Added basic test for DBD::File (H.Merijn Brand, Jens Rehsack) 568 Extract dealing with Perl SQL engines from DBD::File into 569 DBI::DBD::SqlEngine for better subclassing of 3rd party non-db DBDs 570 (Jens Rehsack) 571 572 Updated and clarified documentation for finish method (Tim Bunce). 573 Changes to DBD::File for better English and hopefully better 574 explanation (Martin J. Evans) 575 Update documentation of DBD::DBM to cover current implementation, 576 tried to explain some things better and changes most examples to 577 preferred style of Merijn and myself (Jens Rehsack) 578 Added developer documentation (including a roadmap of future plans) 579 for DBD::File 580 581=head2 Changes in DBI 1.611 (svn r13935) 29th April 2010 582 583 NOTE: minimum perl version is now 5.8.1 (as announced in DBI 1.607) 584 585 Fixed selectcol_arrayref MaxRows attribute to count rows not values 586 thanks to Vernon Lyon. 587 Fixed DBI->trace(0, *STDERR); (H.Merijn Brand) 588 which tried to open a file named "*main::STDERR" in perl-5.10.x 589 Fixes in DBD::DBM for use under threads (Jens Rehsack) 590 591 Changed "Issuing rollback() due to DESTROY without explicit disconnect" 592 warning to not be issued if ReadOnly set for that dbh. 593 594 Added f_lock and f_encoding support to DBD::File (H.Merijn Brand) 595 Added ChildCallbacks => { ... } to Callbacks as a way to 596 specify Callbacks for child handles. 597 With tests added by David E. Wheeler. 598 Added DBI::sql_type_cast($value, $type, $flags) to cast a string value 599 to an SQL type. e.g. SQL_INTEGER effectively does $value += 0; 600 Has other options plus an internal interface for drivers. 601 602 Documentation changes: 603 Small fixes in the documentation of DBD::DBM (H.Merijn Brand) 604 Documented specification of type casting behaviour for bind_col() 605 based on DBI::sql_type_cast() and two new bind_col attributes 606 StrictlyTyped and DiscardString. Thanks to Martin Evans. 607 Document fetchrow_hashref() behaviour for functions, 608 aliases and duplicate names (H.Merijn Brand) 609 Updated DBI::Profile and DBD::File docs to fix pod nits 610 thanks to Frank Wiegand. 611 Corrected typos in Gopher documentation reported by Jan Krynicky. 612 Documented the Callbacks attribute thanks to David E. Wheeler. 613 Corrected the Timeout examples as per rt 50621 (Martin J. Evans). 614 Removed some internal broken links in the pod (Martin J. Evans) 615 Added Note to column_info for drivers which do not 616 support it (Martin J. Evans) 617 Updated dbipport.h to Devel::PPPort 3.19 (H.Merijn Brand) 618 619=head2 Changes in DBI 1.609 (svn r12816) 8th June 2009 620 621 Fixes to DBD::File (H.Merijn Brand) 622 added f_schema attribute 623 table names case sensitive when quoted, insensitive when unquoted 624 workaround a bug in SQL::Statement (temporary fix) related 625 to the "You passed x parameters where y required" error 626 627 Added ImplementorClass and Name info to the "Issuing rollback() due to 628 DESTROY without explicit disconnect" warning to identify the handle. 629 Applies to compiled drivers when they are recompiled. 630 Added DBI->visit_handles($coderef) method. 631 Added $h->visit_child_handles($coderef) method. 632 Added docs for column_info()'s COLUMN_DEF value. 633 Clarified docs on stickyness of data type via bind_param(). 634 Clarified docs on stickyness of data type via bind_col(). 635 636=head2 Changes in DBI 1.608 (svn r12742) 5th May 2009 637 638 Fixes to DBD::File (H.Merijn Brand) 639 bind_param () now honors the attribute argument 640 added f_ext attribute 641 File::Spec is always required. (CORE since 5.00405) 642 Fail and set errstr on parameter count mismatch in execute () 643 Fixed two small memory leaks when running in mod_perl 644 one in DBI->connect and one in DBI::Gofer::Execute. 645 Both due to "local $ENV{...};" leaking memory. 646 Fixed DBD_ATTRIB_DELETE macro for driver authors 647 and updated DBI::DBD docs thanks to Martin J. Evans. 648 Fixed 64bit issues in trace messages thanks to Charles Jardine. 649 Fixed FETCH_many() method to work with drivers that incorrectly return 650 an empty list from $h->FETCH. Affected gofer. 651 652 Added 'sqlite_' as registered prefix for DBD::SQLite. 653 Corrected many typos in DBI docs thanks to Martin J. Evans. 654 Improved DBI::DBD docs thanks to H.Merijn Brand. 655 656=head2 Changes in DBI 1.607 (svn r11571) 22nd July 2008 657 658 NOTE: Perl 5.8.1 is now the minimum supported version. 659 If you need support for earlier versions send me a patch. 660 661 Fixed missing import of carp in DBI::Gofer::Execute. 662 663 Added note to docs about effect of execute(@empty_array). 664 Clarified docs for ReadOnly thanks to Martin Evans. 665 666=head2 Changes in DBI 1.605 (svn r11434) 16th June 2008 667 668 Fixed broken DBIS macro with threads on big-endian machines 669 with 64bit ints but 32bit pointers. Ticket #32309. 670 Fixed the selectall_arrayref, selectrow_arrayref, and selectrow_array 671 methods that get embedded into compiled drivers to use the 672 inner sth handle when passed a $sth instead of an sql string. 673 Drivers will need to be recompiled to pick up this change. 674 Fixed leak in neat() for some kinds of values thanks to Rudolf Lippan. 675 Fixed DBI::PurePerl neat() to behave more like XS neat(). 676 677 Increased default $DBI::neat_maxlen from 400 to 1000. 678 Increased timeout on tests to accommodate very slow systems. 679 Changed behaviour of trace levels 1..4 to show less information 680 at lower levels. 681 Changed the format of the key used for $h->{CachedKids} 682 (which is undocumented so you shouldn't depend on it anyway) 683 Changed gofer error handling to avoid duplicate error text in errstr. 684 Clarified docs re ":N" style placeholders. 685 Improved gofer retry-on-error logic and refactored to aid subclassing. 686 Improved gofer trace output in assorted ways. 687 688 Removed the beeps "\a" from Makefile.PL warnings. 689 Removed check for PlRPC-modules from Makefile.PL 690 691 Added sorting of ParamValues reported by ShowErrorStatement 692 thanks to to Rudolf Lippan. 693 Added cache miss trace message to DBD::Gofer transport class. 694 Added $drh->dbixs_revision method. 695 Added explicit LICENSE specification (perl) to META.yaml 696 697=head2 Changes in DBI 1.604 (svn rev 10994) 24th March 2008 698 699 Fixed fetchall_arrayref with $max_rows argument broken in 1.603, 700 thanks to Greg Sabino Mullane. 701 Fixed a few harmless compiler warnings on cygwin. 702 703=head2 Changes in DBI 1.603 704 705 Fixed pure-perl fetchall_arrayref with $max_rows argument 706 to not error when fetching after all rows already fetched. 707 (Was fixed for compiled drivers back in DBI 1.31.) 708 Thanks to Mark Overmeer. 709 Fixed C sprintf formats and casts, fixing compiler warnings. 710 711 Changed dbi_profile() to accept a hash of profiles and apply to all. 712 Changed gofer stream transport to improve error reporting. 713 Changed gofer test timeout to avoid spurious failures on slow systems. 714 715 Added options to t/85gofer.t so it's more useful for manual testing. 716 717=head2 Changes in DBI 1.602 (svn rev 10706) 8th February 2008 718 719 Fixed potential coredump if stack reallocated while calling back 720 into perl from XS code. Thanks to John Gardiner Myers. 721 Fixed DBI::Util::CacheMemory->new to not clear the cache. 722 Fixed avg in DBI::Profile as_text() thanks to Abe Ingersoll. 723 Fixed DBD::DBM bug in push_names thanks to J M Davitt. 724 Fixed take_imp_data for some platforms thanks to Jeffrey Klein. 725 Fixed docs tie'ing CacheKids (ie LRU cache) thanks to Peter John Edwards. 726 727 Expanded DBI::DBD docs for driver authors thanks to Martin Evans. 728 Enhanced t/80proxy.t test script. 729 Enhanced t/85gofer.t test script thanks to Stig. 730 Enhanced t/10examp.t test script thanks to David Cantrell. 731 Documented $DBI::stderr as the default value of err for internal errors. 732 733 Gofer changes: 734 track_recent now also keeps track of N most recent errors. 735 The connect method is now also counted in stats. 736 737=head2 Changes in DBI 1.601 (svn rev 10103), 21st October 2007 738 739 Fixed t/05thrclone.t to work with Test::More >= 0.71 740 thanks to Jerry D. Hedden and Michael G Schwern. 741 Fixed DBI for VMS thanks to Peter (Stig) Edwards. 742 743 Added client-side caching to DBD::Gofer. Can use any cache with 744 get($k)/set($k,$v) methods, including all the Cache and Cache::Cache 745 distribution modules plus Cache::Memcached, Cache::FastMmap etc. 746 Works for all transports. Overridable per handle. 747 748 Added DBI::Util::CacheMemory for use with DBD::Gofer caching. 749 It's a very fast and small strict subset of Cache::Memory. 750 751=head2 Changes in DBI 1.59 (svn rev 9874), 23rd August 2007 752 753 Fixed DBI::ProfileData to unescape headers lines read from data file. 754 Fixed DBI::ProfileData to not clobber $_, thanks to Alexey Tourbin. 755 Fixed DBI::SQL::Nano to not clobber $_, thanks to Alexey Tourbin. 756 Fixed DBI::PurePerl to return undef for ChildHandles if weaken not available. 757 Fixed DBD::Proxy disconnect error thanks to Philip Dye. 758 Fixed DBD::Gofer::Transport::Base bug (typo) in timeout code. 759 Fixed DBD::Proxy rows method thanks to Philip Dye. 760 Fixed dbiprof compile errors, thanks to Alexey Tourbin. 761 Fixed t/03handle.t to skip some tests if ChildHandles not available. 762 763 Added check_response_sub to DBI::Gofer::Execute 764 765=head2 Changes in DBI 1.58 (svn rev 9678), 25th June 2007 766 767 Fixed code triggering fatal error in bleadperl, thanks to Steve Hay. 768 Fixed compiler warning thanks to Jerry D. Hedden. 769 Fixed t/40profile.t to use int(dbi_time()) for systems like Cygwin where 770 time() seems to be rounded not truncated from the high resolution time. 771 Removed dump_results() test from t/80proxy.t. 772 773=head2 Changes in DBI 1.57 (svn rev 9639), 13th June 2007 774 775 Note: this release includes a change to the DBI::hash() function which will 776 now produce different values than before *if* your perl was built with 64-bit 777 'int' type (i.e. "perl -V:intsize" says intsize='8'). It's relatively rare 778 for perl to be configured that way, even on 64-bit systems. 779 780 Fixed XS versions of select*_*() methods to call execute() 781 fetch() etc., with inner handle instead of outer. 782 Fixed execute_for_fetch() to not cache errstr values 783 thanks to Bart Degryse. 784 Fixed unused var compiler warning thanks to JDHEDDEN. 785 Fixed t/86gofer_fail tests to be less likely to fail falsely. 786 787 Changed DBI::hash to return 'I32' type instead of 'int' so results are 788 portable/consistent regardless of size of the int type. 789 Corrected timeout example in docs thanks to Egmont Koblinger. 790 Changed t/01basic.t to warn instead of failing when it detects 791 a problem with Math::BigInt (some recent versions had problems). 792 793 Added support for !Time and !Time~N to DBI::Profile Path. See docs. 794 Added extra trace info to connect_cached thanks to Walery Studennikov. 795 Added non-random (deterministic) mode to DBI_GOFER_RANDOM mechanism. 796 Added DBIXS_REVISION macro that drivers can use. 797 Added more docs for private_attribute_info() method. 798 799 DBI::Profile changes: 800 dbi_profile() now returns ref to relevant leaf node. 801 Don't profile DESTROY during global destruction. 802 Added as_node_path_list() and as_text() methods. 803 DBI::ProfileDumper changes: 804 Don't write file if there's no profile data. 805 Uses full natural precision when saving data (was using %.6f) 806 Optimized flush_to_disk(). 807 Locks the data file while writing. 808 Enabled filename to be a code ref for dynamic names. 809 DBI::ProfileDumper::Apache changes: 810 Added Quiet=>1 to avoid write to STDERR in flush_to_disk(). 811 Added Dir=>... to specify a writable destination directory. 812 Enabled DBI_PROFILE_APACHE_LOG_DIR for mod_perl 1 as well as 2. 813 Added parent pid to default data file name. 814 DBI::ProfileData changes: 815 Added DeleteFiles option to rename & delete files once read. 816 Locks the data files while reading. 817 Added ability to sort by Path elements. 818 dbiprof changes: 819 Added --dumpnodes and --delete options. 820 Added/updated docs for both DBI::ProfileDumper && ::Apache. 821 822=head2 Changes in DBI 1.56 (svn rev 9660), 18th June 2007 823 824 Fixed printf arg warnings thanks to JDHEDDEN. 825 Fixed returning driver-private sth attributes via gofer. 826 827 Changed pod docs docs to use =head3 instead of =item 828 so now in html you get links to individual methods etc. 829 Changed default gofer retry_limit from 2 to 0. 830 Changed tests to workaround Math::BigInt broken versions. 831 Changed dbi_profile_merge() to dbi_profile_merge_nodes() 832 old name still works as an alias for the new one. 833 Removed old DBI internal sanity check that's no longer valid 834 causing "panic: DESTROY (dbih_clearcom)" when tracing enabled 835 836 Added DBI_GOFER_RANDOM env var that can be use to trigger random 837 failures and delays when executing gofer requests. Designed to help 838 test automatic retry on failures and timeout handling. 839 Added lots more docs to all the DBD::Gofer and DBI::Gofer classes. 840 841=head2 Changes in DBI 1.55 (svn rev 9504), 4th May 2007 842 843 Fixed set_err() so HandleSetErr hook is executed reliably, if set. 844 Fixed accuracy of profiling when perl configured to use long doubles. 845 Fixed 42prof_data.t on fast systems with poor timers thanks to Malcolm Nooning. 846 Fixed potential corruption in selectall_arrayref and selectrow_arrayref 847 for compiled drivers, thanks to Rob Davies. 848 Rebuild your compiled drivers after installing DBI. 849 850 Changed some handle creation code from perl to C code, 851 to reduce handle creation cost by ~20%. 852 Changed internal implementation of the CachedKids attribute 853 so it's a normal handle attribute (and initially undef). 854 Changed connect_cached and prepare_cached to avoid a FETCH method call, 855 and thereby reduced cost by ~5% and ~30% respectively. 856 Changed _set_fbav to not croak when given a wrongly sized array, 857 it now warns and adjusts the row buffer to match. 858 Changed some internals to improve performance with threaded perls. 859 Changed DBD::NullP to be slightly more useful for testing. 860 Changed File::Spec prerequisite to not require a minimum version. 861 Changed tests to work with other DBMs thanks to ZMAN. 862 Changed ex/perl_dbi_nulls_test.pl to be more descriptive. 863 864 Added more functionality to the (undocumented) Callback mechanism. 865 Callbacks can now elect to provide a value to be returned, in which case 866 the method won't be called. A callback for "*" is applied to all methods 867 that don't have their own callback. 868 Added $h->{ReadOnly} attribute. 869 Added support for DBI Profile Path to contain refs to scalars 870 which will be de-ref'd for each profile sample. 871 Added dbilogstrip utility to edit DBI logs for diff'ing (gets installed) 872 Added details for SQLite 3.3 to NULL handling docs thanks to Alex Teslik. 873 Added take_imp_data() to DBI::PurePerl. 874 875 Gofer related changes: 876 Fixed gofer pipeone & stream transports to avoid risk of hanging. 877 Improved error handling and tracing significantly. 878 Added way to generate random 1-in-N failures for methods. 879 Added automatic retry-on-error mechanism to gofer transport base class. 880 Added tests to show automatic retry mechanism works a treat! 881 Added go_retry_hook callback hook so apps can fine-tune retry behaviour. 882 Added header to request and response packets for sanity checking 883 and to enable version skew between client and server. 884 Added forced_single_resultset, max_cached_sth_per_dbh and max_cached_dbh_per_drh 885 to gofer executor config. 886 Driver-private methods installed with install_method are now proxied. 887 No longer does a round-trip to the server for methods it knows 888 have not been overridden by the remote driver. 889 Most significant aspects of gofer behaviour are controlled by policy mechanism. 890 Added policy-controlled caching of results for some methods, such as schema metadata. 891 The connect_cached and prepare_cached methods cache on client and server. 892 The bind_param_array and execute_array methods are now supported. 893 Worked around a DBD::Sybase bind_param bug (which is fixed in DBD::Sybase 1.07) 894 Added goferperf.pl utility (doesn't get installed). 895 Many other assorted Gofer related bug fixes, enhancements and docs. 896 The http and mod_perl transports have been remove to their own distribution. 897 Client and server will need upgrading together for this release. 898 899=head2 Changes in DBI 1.54 (svn rev 9157), 23rd February 2007 900 901 NOTE: This release includes the 'next big thing': DBD::Gofer. 902 Take a look! 903 904 WARNING: This version has some subtle changes in DBI internals. 905 It's possible, though doubtful, that some may affect your code. 906 I recommend some extra testing before using this release. 907 Or perhaps I'm just being over cautious... 908 909 Fixed type_info when called for multiple dbh thanks to Cosimo Streppone. 910 Fixed compile warnings in bleadperl on freebsd-6.1-release 911 and solaris 10g thanks to Philip M. Gollucci. 912 Fixed to compile for perl built with -DNO_MATHOMS thanks to Jerry D. Hedden. 913 Fixed to work for bleadperl (r29544) thanks to Nicholas Clark. 914 Users of Perl >= 5.9.5 will require DBI >= 1.54. 915 Fixed rare error when profiling access to $DBI::err etc tied variables. 916 Fixed DBI::ProfileDumper to not be affected by changes to $/ and $, 917 thanks to Michael Schwern. 918 919 Changed t/40profile.t to skip tests for perl < 5.8.0. 920 Changed setting trace file to no longer write "Trace file set" to new file. 921 Changed 'handle cleared whilst still active' warning for dbh 922 to only be given for dbh that have active sth or are not AutoCommit. 923 Changed take_imp_data to call finish on all Active child sth. 924 Changed DBI::PurePerl trace() method to be more consistent. 925 Changed set_err method to effectively not append to errstr if the new errstr 926 is the same as the current one. 927 Changed handle factory methods, like connect, prepare, and table_info, 928 to copy any error/warn/info state of the handle being returned 929 up into the handle the method was called on. 930 Changed row buffer handling to not alter NUM_OF_FIELDS if it's 931 inconsistent with number of elements in row buffer array. 932 Updated DBI::DBD docs re handling multiple result sets. 933 Updated DBI::DBD docs for driver authors thanks to Ammon Riley 934 and Dean Arnold. 935 Updated column_info docs to note that if a table doesn't exist 936 you get an sth for an empty result set and not an error. 937 938 Added new DBD::Gofer 'stateless proxy' driver and framework, 939 and the DBI test suite is now also executed via DBD::Gofer, 940 and DBD::Gofer+DBI::PurePerl, in addition to DBI::PurePerl. 941 Added ability for trace() to support filehandle argument, 942 including tracing into a string, thanks to Dean Arnold. 943 Added ability for drivers to implement func() method 944 so proxy drivers can proxy the func method itself. 945 Added SQL_BIGINT type code (resolved to the ODBC/JDBC value (-5)) 946 Added $h->private_attribute_info method. 947 948=head2 Changes in DBI 1.53 (svn rev 7995), 31st October 2006 949 950 Fixed checks for weaken to work with early 5.8.x versions 951 Fixed DBD::Proxy handling of some methods, including commit and rollback. 952 Fixed t/40profile.t to be more insensitive to long double precision. 953 Fixed t/40profile.t to be insensitive to small negative shifts in time 954 thanks to Jamie McCarthy. 955 Fixed t/40profile.t to skip tests for perl < 5.8.0. 956 Fixed to work with current 'bleadperl' (~5.9.5) thanks to Steve Peters. 957 Users of Perl >= 5.9.5 will require DBI >= 1.53. 958 Fixed to be more robust against drivers not handling multiple result 959 sets properly, thanks to Gisle Aas. 960 961 Added array context support to execute_array and execute_for_fetch 962 methods which returns executed tuples and rows affected. 963 Added Tie::Cache::LRU example to docs thanks to Brandon Black. 964 965=head2 Changes in DBI 1.52 (svn rev 6840), 30th July 2006 966 967 Fixed memory leak (per handle) thanks to Nicholas Clark and Ephraim Dan. 968 Fixed memory leak (16 bytes per sth) thanks to Doru Theodor Petrescu. 969 Fixed execute_for_fetch/execute_array to RaiseError thanks to Martin J. Evans. 970 Fixed for perl 5.9.4. Users of Perl >= 5.9.4 will require DBI >= 1.52. 971 972 Updated DBD::File to 0.35 to match the latest release on CPAN. 973 974 Added $dbh->statistics_info specification thanks to Brandon Black. 975 976 Many changes and additions to profiling: 977 Profile Path can now uses sane strings instead of obscure numbers, 978 can refer to attributes, assorted magical values, and even code refs! 979 Parsing of non-numeric DBI_PROFILE env var values has changed. 980 Changed DBI::Profile docs extensively - many new features. 981 See DBI::Profile docs for more information. 982 983=head2 Changes in DBI 1.51 (svn rev 6475), 6th June 2006 984 985 Fixed $dbh->clone method 'signature' thanks to Jeffrey Klein. 986 Fixed default ping() method to return false if !$dbh->{Active}. 987 Fixed t/40profile.t to be insensitive to long double precision. 988 Fixed for perl 5.8.0's more limited weaken() function. 989 Fixed DBD::Proxy to not alter $@ in disconnect or AUTOLOADd methods. 990 Fixed bind_columns() to use return set_err(...) instead of die() 991 to report incorrect number of parameters, thanks to Ben Thul. 992 Fixed bind_col() to ignore undef as bind location, thanks to David Wheeler. 993 Fixed for perl 5.9.x for non-threaded builds thanks to Nicholas Clark. 994 Users of Perl >= 5.9.x will require DBI >= 1.51. 995 Fixed fetching of rows as hash refs to preserve utf8 on field names 996 from $sth->{NAME} thanks to Alexey Gaidukov. 997 Fixed build on Win32 (dbd_postamble) thanks to David Golden. 998 999 Improved performance for thread-enabled perls thanks to Gisle Aas. 1000 Drivers can now use PERL_NO_GET_CONTEXT thanks to Gisle Aas. 1001 Driver authors please read the notes in the DBI::DBD docs. 1002 Changed DBI::Profile format to always include a percentage, 1003 if not exiting then uses time between the first and last DBI call. 1004 Changed DBI::ProfileData to be more forgiving of systems with 1005 unstable clocks (where time may go backwards occasionally). 1006 Clarified the 'Subclassing the DBI' docs. 1007 Assorted minor changes to docs from comments on annocpan.org. 1008 Changed Makefile.PL to avoid incompatible options for old gcc. 1009 1010 Added 'fetch array of hash refs' example to selectall_arrayref 1011 docs thanks to Tom Schindl. 1012 Added docs for $sth->{ParamArrays} thanks to Martin J. Evans. 1013 Added reference to $DBI::neat_maxlen in TRACING section of docs. 1014 Added ability for DBI::Profile Path to include attributes 1015 and a summary of where the code was called from. 1016 1017=head2 Changes in DBI 1.50 (svn rev 2307), 13 December 2005 1018 1019 Fixed Makefile.PL options for gcc bug introduced in 1.49. 1020 Fixed handle magic order to keep DBD::Oracle happy. 1021 Fixed selectrow_array to return empty list on error. 1022 1023 Changed dbi_profile_merge() to be able to recurse and merge 1024 sub-trees of profile data. 1025 1026 Added documentation for dbi_profile_merge(), including how to 1027 measure the time spent inside the DBI for an http request. 1028 1029=head2 Changes in DBI 1.49 (svn rev 2287), 29th November 2005 1030 1031 Fixed assorted attribute handling bugs in DBD::Proxy. 1032 Fixed croak() in DBD::NullP thanks to Sergey Skvortsov. 1033 Fixed handling of take_imp_data() and dbi_imp_data attribute. 1034 Fixed bugs in DBD::DBM thanks to Jeff Zucker. 1035 Fixed bug in DBI::ProfileDumper thanks to Sam Tregar. 1036 Fixed ping in DBD::Proxy thanks to George Campbell. 1037 Fixed dangling ref in $sth after parent $dbh destroyed 1038 with thanks to il@rol.ru for the bug report #13151 1039 Fixed prerequisites to include Storable thanks to Michael Schwern. 1040 Fixed take_imp_data to be more practical. 1041 1042 Change to require perl 5.6.1 (as advertised in 2003) not 5.6.0. 1043 Changed internals to be more strictly coded thanks to Andy Lester. 1044 Changed warning about multiple copies of Driver.xst found in @INC 1045 to ignore duplicated directories thanks to Ed Avis. 1046 Changed Driver.xst to enable drivers to define an dbd_st_prepare_sv 1047 function where the statement parameter is an SV. That enables 1048 compiled drivers to support SQL strings that are UTF-8. 1049 Changed "use DBI" to only set $DBI::connect_via if not already set. 1050 Changed docs to clarify pre-method clearing of err values. 1051 1052 Added ability for DBI::ProfileData to edit profile path on loading. 1053 This enables aggregation of different SQL statements into the same 1054 profile node - very handy when not using placeholders or when working 1055 multiple separate tables for the same thing (ie logtable_2005_11_28) 1056 Added $sth->{ParamTypes} specification thanks to Dean Arnold. 1057 Added $h->{Callbacks} attribute to enable code hooks to be invoked 1058 when certain methods are called. For example: 1059 $dbh->{Callbacks}->{prepare} = sub { ... }; 1060 With thanks to David Wheeler for the kick start. 1061 Added $h->{ChildHandles} (using weakrefs) thanks to Sam Tregar 1062 I've recoded it in C so there's no significant performance impact. 1063 Added $h->{Type} docs (returns 'dr', 'db', or 'st') 1064 Adding trace message in DESTROY if InactiveDestroy enabled. 1065 Added %drhs = DBI->installed_drivers(); 1066 1067 Ported DBI::ProfileDumper::Apache to mod_perl2 RC5+ 1068 thanks to Philip M. Golluci 1069 1070=head2 Changes in DBI 1.48 (svn rev 928), 14th March 2005 1071 1072 Fixed DBI::DBD::Metadata generation of type_info_all thanks to Steffen Goeldner 1073 (driver authors who have used it should rerun it). 1074 1075 Updated docs for NULL Value placeholders thanks to Brian Campbell. 1076 1077 Added multi-keyfield nested hash fetching to fetchall_hashref() 1078 thanks to Zhuang (John) Li for polishing up my draft. 1079 Added registered driver prefixes: amzn_ for DBD::Amazon and yaswi_ for DBD::Yaswi. 1080 1081 1082=head2 Changes in DBI 1.47 (svn rev 854), 2nd February 2005 1083 1084 Fixed DBI::ProxyServer to not create pid files by default. 1085 References: Ubuntu Security Notice USN-70-1, CAN-2005-0077 1086 Thanks to Javier Fernández-Sanguino Peña from the 1087 Debian Security Audit Project, and Jonathan Leffler. 1088 Fixed some tests to work with older Test::More versions. 1089 Fixed setting $DBI::err/errstr in DBI::PurePerl. 1090 Fixed potential undef warning from connect_cached(). 1091 Fixed $DBI::lasth handling for DESTROY so lasth points to 1092 parent even if DESTROY called other methods. 1093 Fixed DBD::Proxy method calls to not alter $@. 1094 Fixed DBD::File problem with encoding pragma thanks to Erik Rijkers. 1095 1096 Changed error handling so undef errstr doesn't cause warning. 1097 Changed DBI::DBD docs to use =head3/=head4 pod thanks to 1098 Jonathan Leffler. This may generate warnings for perl 5.6. 1099 Changed DBI::PurePerl to set autoflush on trace filehandle. 1100 Changed DBD::Proxy to treat Username as a local attribute 1101 so recent DBI version can be used with old DBI::ProxyServer. 1102 Changed driver handle caching in DBD::File. 1103 Added $GetInfoType{SQL_DATABASE_NAME} thanks to Steffen Goeldner. 1104 1105 Updated docs to recommend some common DSN string attributes. 1106 Updated connect_cached() docs with issues and suggestions. 1107 Updated docs for NULL Value placeholders thanks to Brian Campbell. 1108 Updated docs for primary_key_info and primary_keys. 1109 Updated docs to clarify that the default fetchrow_hashref behaviour, 1110 of returning a ref to a new hash for each row, will not change. 1111 Updated err/errstr/state docs for DBD authors thanks to Steffen Goeldner. 1112 Updated handle/attribute docs for DBD authors thanks to Steffen Goeldner. 1113 Corrected and updated LongReadLen docs thanks to Bart Lateur. 1114 Added DBD::JDBC as a registered driver. 1115 1116=head2 Changes in DBI 1.46 (svn rev 584), 16th November 2004 1117 1118 Fixed parsing bugs in DBI::SQL::Nano thanks to Jeff Zucker. 1119 Fixed a couple of bad links in docs thanks to Graham Barr. 1120 Fixed test.pl Win32 undef warning thanks to H.Merijn Brand & David Repko. 1121 Fixed minor issues in DBI::DBD::Metadata thanks to Steffen Goeldner. 1122 Fixed DBI::PurePerl neat() to use double quotes for utf8. 1123 1124 Changed execute_array() definition, and default implementation, 1125 to not consider scalar values for execute tuple count. See docs. 1126 Changed DBD::File to enable ShowErrorStatement by default, 1127 which affects DBD::File subclasses such as DBD::CSV and DBD::DBM. 1128 Changed use DBI qw(:utils) tag to include $neat_maxlen. 1129 Updated Roadmap and ToDo. 1130 1131 Added data_string_diff() data_string_desc() and data_diff() 1132 utility functions to help diagnose Unicode issues. 1133 All can be imported via the use DBI qw(:utils) tag. 1134 1135=head2 Changes in DBI 1.45 (svn rev 480), 6th October 2004 1136 1137 Fixed DBI::DBD code for drivers broken in 1.44. 1138 Fixed "Free to wrong pool"/"Attempt to free unreferenced scalar" in FETCH. 1139 1140=head2 Changes in DBI 1.44 (svn rev 478), 5th October 2004 1141 1142 Fixed build issues on VMS thanks to Jakob Snoer. 1143 Fixed DBD::File finish() method to return 1 thanks to Jan Dubois. 1144 Fixed rare core dump during global destruction thanks to Mark Jason Dominus. 1145 Fixed risk of utf8 flag persisting from one row to the next. 1146 1147 Changed bind_param_array() so it doesn't require all bind arrays 1148 to have the same number of elements. 1149 Changed bind_param_array() to error if placeholder number <= 0. 1150 Changed execute_array() definition, and default implementation, 1151 to effectively NULL-pad shorter bind arrays. 1152 Changed execute_array() to return "0E0" for 0 as per the docs. 1153 Changed execute_for_fetch() definition, and default implementation, 1154 to return "0E0" for 0 like execute() and execute_array(). 1155 Changed Test::More prerequisite to Test::Simple (which is also the name 1156 of the distribution both are packaged in) to work around ppm behaviour. 1157 1158 Corrected docs to say that get/set of unknown attribute generates 1159 a warning and is no longer fatal. Thanks to Vadim. 1160 Corrected fetchall_arrayref() docs example thanks to Drew Broadley. 1161 1162 Added $h1->swap_inner_handle($h2) sponsored by BizRate.com 1163 1164 1165=head2 Changes in DBI 1.43 (svn rev 377), 2nd July 2004 1166 1167 Fixed connect() and connect_cached() RaiseError/PrintError 1168 which would sometimes show "(no error string)" as the error. 1169 Fixed compiler warning thanks to Paul Marquess. 1170 Fixed "trace level set to" trace message thanks to H.Merijn Brand. 1171 Fixed DBD::DBM $dbh->{dbm_tables}->{...} to be keyed by the 1172 table name not the file name thanks to Jeff Zucker. 1173 Fixed last_insert_id(...) thanks to Rudy Lippan. 1174 Fixed propagation of scalar/list context into proxied methods. 1175 Fixed DBI::Profile::DESTROY to not alter $@. 1176 Fixed DBI::ProfileDumper new() docs thanks to Michael Schwern. 1177 Fixed _load_class to propagate $@ thanks to Drew Taylor. 1178 Fixed compile warnings on Win32 thanks to Robert Baron. 1179 Fixed problem building with recent versions of MakeMaker. 1180 Fixed DBD::Sponge not to generate warning with threads. 1181 Fixed DBI_AUTOPROXY to work more than once thanks to Steven Hirsch. 1182 1183 Changed TraceLevel 1 to not show recursive/nested calls. 1184 Changed getting or setting an invalid attribute to no longer be 1185 a fatal error but generate a warning instead. 1186 Changed selectall_arrayref() to call finish() if 1187 $attr->{MaxRows} is defined. 1188 Changed all tests to use Test::More and enhanced the tests thanks 1189 to Stevan Little and Andy Lester. See http://qa.perl.org/phalanx/ 1190 Changed Test::More minimum prerequisite version to 0.40 (2001). 1191 Changed DBI::Profile header to include the date and time. 1192 1193 Added DBI->parse_dsn($dsn) method. 1194 Added warning if build directory path contains white space. 1195 Added docs for parse_trace_flags() and parse_trace_flag(). 1196 Removed "may change" warnings from the docs for table_info(), 1197 primary_key_info(), and foreign_key_info() methods. 1198 1199=head2 Changes in DBI 1.42 (svn rev 222), 12th March 2004 1200 1201 Fixed $sth->{NUM_OF_FIELDS} of non-executed statement handle 1202 to be undef as per the docs (it was 0). 1203 Fixed t/41prof_dump.t to work with perl5.9.1. 1204 Fixed DBD_ATTRIB_DELETE macro thanks to Marco Paskamp. 1205 Fixed DBI::PurePerl looks_like_number() and $DBI::rows. 1206 Fixed ref($h)->can("foo") to not croak. 1207 1208 Changed attributes (NAME, TYPE etc) of non-executed statement 1209 handle to be undef instead of triggering an error. 1210 Changed ShowErrorStatement to apply to more $dbh methods. 1211 Changed DBI_TRACE env var so just does this at load time: 1212 DBI->trace(split '=', $ENV{DBI_TRACE}, 2); 1213 Improved "invalid number of parameters" error message. 1214 Added DBI::common as base class for DBI::db, DBD::st etc. 1215 Moved methods common to all handles into DBI::common. 1216 1217 Major tracing enhancement: 1218 1219 Added $h->parse_trace_flags("foo|SQL|7") to map a group of 1220 trace flags into the corresponding trace flag bits. 1221 Added automatic calling of parse_trace_flags() if 1222 setting the trace level to a non-numeric value: 1223 $h->{TraceLevel}="foo|SQL|7"; $h->trace("foo|SQL|7"); 1224 DBI->connect("dbi:Driver(TraceLevel=SQL|foo):...", ...); 1225 Currently no trace flags have been defined. 1226 Added to, and reworked, the trace documentation. 1227 Added dbivport.h for driver authors to use. 1228 1229 Major driver additions that Jeff Zucker and I have been working on: 1230 1231 Added DBI::SQL::Nano a 'smaller than micro' SQL parser 1232 with an SQL::Statement compatible API. If SQL::Statement 1233 is installed then DBI::SQL::Nano becomes an empty subclass 1234 of SQL::Statement, unless the DBI_SQL_NANO env var is true. 1235 Added DBD::File, modified to use DBI::SQL::Nano. 1236 Added DBD::DBM, an SQL interface to DBM files using DBD::File. 1237 1238 Documentation changes: 1239 1240 Corrected typos in docs thanks to Steffen Goeldner. 1241 Corrected execute_for_fetch example thanks to Dean Arnold. 1242 1243=head2 Changes in DBI 1.41 (svn rev 130), 22nd February 2004 1244 1245 Fixed execute_for_array() so tuple_status parameter is optional 1246 as per docs, thanks to Ed Avis. 1247 Fixed execute_for_array() docs to say that it returns undef if 1248 any of the execute() calls fail. 1249 Fixed take_imp_data() test on m68k reported by Christian Hammers. 1250 Fixed write_typeinfo_pm inconsistencies in DBI::DBD::Metadata 1251 thanks to Andy Hassall. 1252 Fixed $h->{TraceLevel} to not return DBI->trace trace level 1253 which it used to if DBI->trace trace level was higher. 1254 1255 Changed set_err() to append to errstr, with a leading "\n" if it's 1256 not empty, so that multiple error/warning messages are recorded. 1257 Changed trace to limit elements dumped when an array reference is 1258 returned from a method to the max(40, $DBI::neat_maxlen/10) 1259 so that fetchall_arrayref(), for example, doesn't flood the trace. 1260 Changed trace level to be a four bit integer (levels 0 thru 15) 1261 and a set of topic flags (no topics have been assigned yet). 1262 Changed column_info() to check argument count. 1263 Extended bind_param() TYPE attribute specification to imply 1264 standard formating of value, eg SQL_DATE implies 'YYYY-MM-DD'. 1265 1266 Added way for drivers to indicate 'success with info' or 'warning' 1267 by setting err to "0" for warning and "" for information. 1268 Both values are false and so don't trigger RaiseError etc. 1269 Thanks to Steffen Goeldner for the original idea. 1270 Added $h->{HandleSetErr} = sub { ... } to be called at the 1271 point that an error, warn, or info state is recorded. 1272 The code can alter the err, errstr, and state values 1273 (e.g., to promote an error to a warning, or the reverse). 1274 Added $h->{PrintWarn} attribute to enable printing of warnings 1275 recorded by the driver. Defaults to same value as $^W (perl -w). 1276 Added $h->{ErrCount} attribute, incremented whenever an error is 1277 recorded by the driver via set_err(). 1278 Added $h->{Executed} attribute, set if do()/execute() called. 1279 Added \%attr parameter to foreign_key_info() method. 1280 Added ref count of inner handle to "DESTROY ignored for outer" msg. 1281 Added Win32 build config checks to DBI::DBD thanks to Andy Hassall. 1282 Added bind_col to Driver.xst so drivers can define their own. 1283 Added TYPE attribute to bind_col and specified the expected 1284 driver behaviour. 1285 1286 Major update to signal handling docs thanks to Lincoln Baxter. 1287 Corrected dbiproxy usage doc thanks to Christian Hammers. 1288 Corrected type_info_all index hash docs thanks to Steffen Goeldner. 1289 Corrected type_info COLUMN_SIZE to chars not bytes thanks to Dean Arnold. 1290 Corrected get_info() docs to include details of DBI::Const::GetInfoType. 1291 Clarified that $sth->{PRECISION} is OCTET_LENGTH for char types. 1292 1293=head2 Changes in DBI 1.40, 7th January 2004 1294 1295 Fixed handling of CachedKids when DESTROYing threaded handles. 1296 Fixed sql_user_name() in DBI::DBD::Metadata (used by write_getinfo_pm) 1297 to use $dbh->{Username}. Driver authors please update your code. 1298 1299 Changed connect_cached() when running under Apache::DBI 1300 to route calls to Apache::DBI::connect(). 1301 1302 Added CLONE() to DBD::Sponge and DBD::ExampleP. 1303 Added warning when starting a new thread about any loaded driver 1304 which does not have a CLONE() function. 1305 Added new prepare_cache($sql, \%attr, 3) option to manage Active handles. 1306 Added SCALE and NULLABLE support to DBD::Sponge. 1307 Added missing execute() in fetchall_hashref docs thanks to Iain Truskett. 1308 Added a CONTRIBUTING section to the docs with notes on creating patches. 1309 1310=head2 Changes in DBI 1.39, 27th November 2003 1311 1312 Fixed STORE to not clear error during nested DBI call, again/better, 1313 thanks to Tony Bowden for the report and helpful test case. 1314 Fixed DBI dispatch to not try to use AUTOLOAD for driver methods unless 1315 the method has been declared (as methods should be when using AUTOLOAD). 1316 This fixes a problem when the Attribute::Handlers module is loaded. 1317 Fixed cwd check code to use $Config{path_sep} thanks to Steve Hay. 1318 Fixed unqualified croak() calls thanks to Steffen Goeldner. 1319 Fixed DBD::ExampleP TYPE and PRECISION attributes thanks to Tom Lowery. 1320 Fixed tracing of methods that only get traced at high trace levels. 1321 1322 The level 1 trace no longer includes nested method calls so it generally 1323 just shows the methods the application explicitly calls. 1324 Added line to trace log (level>=4) when err/errstr is cleared. 1325 Updated docs for InactiveDestroy and point out where and when the 1326 trace includes the process id. 1327 Update DBI::DBD docs thanks to Steffen Goeldner. 1328 Removed docs saying that the DBI->data_sources method could be 1329 passed a $dbh. The $dbh->data_sources method should be used instead. 1330 Added link to 'DBI recipes' thanks to Giuseppe Maxia: 1331 http://gmax.oltrelinux.com/dbirecipes.html (note that this 1332 is not an endorsement that the recipies are 'optimal') 1333 1334 Note: There is a bug in perl 5.8.2 when configured with threads 1335 and debugging enabled (bug #24463) which causes a DBI test to fail. 1336 1337=head2 Changes in DBI 1.38, 21th August 2003 1338 1339 NOTE: The DBI now requires perl version 5.6.0 or later. 1340 (As per notice in DBI 1.33 released 27th February 2003) 1341 1342 Fixed spurious t/03handles failure on 64bit perls reported by H.Merijn Brand. 1343 Fixed spurious t/15array failure on some perl versions thanks to Ed Avis. 1344 Fixed build using dmake on windows thanks to Steffen Goeldner. 1345 Fixed build on using some shells thanks to Gurusamy Sarathy. 1346 Fixed ParamValues to only be appended to ShowErrorStatement if not empty. 1347 Fixed $dbh->{Statement} not being writable by drivers in some cases. 1348 Fixed occasional undef warnings on connect failures thanks to Ed Avis. 1349 Fixed small memory leak when using $sth->{NAME..._hash}. 1350 Fixed 64bit warnings thanks to Marian Jancar. 1351 Fixed DBD::Proxy::db::DESTROY to not alter $@ thanks to Keith Chapman. 1352 Fixed Makefile.PL status from WriteMakefile() thanks to Leon Brocard. 1353 1354 Changed "Can't set ...->{Foo}: unrecognised attribute" from an error to a 1355 warning when running with DBI::ProxyServer to simplify upgrades. 1356 Changed execute_array() to no longer require ArrayTupleStatus attribute. 1357 Changed DBI->available_drivers to not hide DBD::Sponge. 1358 Updated/moved placeholder docs to a better place thanks to Johan Vromans. 1359 Changed dbd_db_do4 api in Driver.xst to match dbd_st_execute (return int, 1360 not bool), relevant only to driver authors. 1361 Changed neat(), and thus trace(), so strings marked as utf8 are presented 1362 in double quotes instead of single quotes and are not sanitized. 1363 1364 Added $dbh->data_sources method. 1365 Added $dbh->last_insert_id method. 1366 Added $sth->execute_for_fetch($fetch_tuple_sub, \@tuple_status) method. 1367 Added DBI->installed_versions thanks to Jeff Zucker. 1368 Added $DBI::Profile::ON_DESTROY_DUMP variable. 1369 Added docs for DBD::Sponge thanks to Mark Stosberg. 1370 1371=head2 Changes in DBI 1.37, 15th May 2003 1372 1373 Fixed "Can't get dbh->{Statement}: unrecognised attribute" error in test 1374 caused by change to perl internals in 5.8.0 1375 Fixed to build with latest development perl (5.8.1@19525). 1376 Fixed C code to use all ANSI declarations thanks to Steven Lembark. 1377 1378=head2 Changes in DBI 1.36, 11th May 2003 1379 1380 Fixed DBI->connect to carp instead of croak on 'old-style' usage. 1381 Fixed connect(,,, { RootClass => $foo }) to not croak if module not found. 1382 Fixed code generated by DBI::DBD::Metadata thanks to DARREN@cpan.org (#2270) 1383 Fixed DBI::PurePerl to not reset $@ during method dispatch. 1384 Fixed VMS build thanks to Michael Schwern. 1385 Fixed Proxy disconnect thanks to Steven Hirsch. 1386 Fixed error in DBI::DBD docs thanks to Andy Hassall. 1387 1388 Changed t/40profile.t to not require Time::HiRes. 1389 Changed DBI::ProxyServer to load DBI only on first request, which 1390 helps threaded server mode, thanks to Bob Showalter. 1391 Changed execute_array() return value from row count to executed 1392 tuple count, and now the ArrayTupleStatus attribute is mandatory. 1393 NOTE: That is an API definition change that may affect your code. 1394 Changed CompatMode attribute to also disable attribute 'quick FETCH'. 1395 Changed attribute FETCH to be slightly faster thanks to Stas Bekman. 1396 1397 Added workaround for perl bug #17575 tied hash nested FETCH 1398 thanks to Silvio Wanka. 1399 Added Username and Password attributes to connect(..., \%attr) and so 1400 also embedded in DSN like "dbi:Driver(Username=user,Password=pass):..." 1401 Username and Password can't contain ")", ",", or "=" characters. 1402 The predence is DSN first, then \%attr, then $user & $pass parameters, 1403 and finally the DBI_USER & DBI_PASS environment variables. 1404 The Username attribute is stored in the $dbh but the Password is not. 1405 Added ProxyServer HOWTO configure restrictions docs thanks to Jochen Wiedmann. 1406 Added MaxRows attribute to selectcol_arrayref prompted by Wojciech Pietron. 1407 Added dump_handle as a method not just a DBI:: utility function. 1408 Added on-demand by-row data feed into execute_array() using code ref, 1409 or statement handle. For example, to insert from a select: 1410 $insert_sth->execute_array( { ArrayTupleFetch => $select_sth, ... } ) 1411 Added warning to trace log when $h->{foo}=... is ignored due to 1412 invalid prefix (e.g., not 'private_'). 1413 1414=head2 Changes in DBI 1.35, 7th March 2003 1415 1416 Fixed memory leak in fetchrow_hashref introduced in DBI 1.33. 1417 Fixed various DBD::Proxy errors introduced in DBI 1.33. 1418 Fixed to ANSI C in dbd_dr_data_sources thanks to Jonathan Leffler. 1419 Fixed $h->can($method_name) to return correct code ref. 1420 Removed DBI::Format from distribution as it's now part of the 1421 separate DBI::Shell distribution by Tom Lowery. 1422 Updated DBI::DBD docs with a note about the CLONE method. 1423 Updated DBI::DBD docs thanks to Jonathan Leffler. 1424 Updated DBI::DBD::Metadata for perl 5.5.3 thanks to Jonathan Leffler. 1425 Added note to install_method docs about setup_driver() method. 1426 1427=head2 Changes in DBI 1.34, 28th February 2003 1428 1429 Fixed DBI::DBD docs to refer to DBI::DBD::Metadata thanks to Jonathan Leffler. 1430 Fixed dbi_time() compile using BorlandC on Windows thanks to Steffen Goeldner. 1431 Fixed profile tests to do enough work to measure on Windows. 1432 Fixed disconnect_all() to not be required by drivers. 1433 1434 Added $okay = $h->can($method_name) to check if a method exists. 1435 Added DBD::*::*->install_method($method_name, \%attr) so driver private 1436 methods can be 'installed' into the DBI dispatcher and no longer 1437 need to be called using $h->func(..., $method_name). 1438 1439 Enhanced $dbh->clone() and documentation. 1440 Enhanced docs to note that dbi_time(), and thus profiling, is limited 1441 to only millisecond (seconds/1000) resolution on Windows. 1442 Removed old DBI::Shell from distribution and added Tom Lowery's improved 1443 version to the Bundle::DBI file. 1444 Updated minimum version numbers for modules in Bundle::DBI. 1445 1446=head2 Changes in DBI 1.33, 27th February 2003 1447 1448 NOTE: Future versions of the DBI *will not* support perl 5.6.0 or earlier. 1449 : Perl 5.6.1 will be the minimum supported version. 1450 1451 NOTE: The "old-style" connect: DBI->connect($database, $user, $pass, $driver); 1452 : has been deprecated for several years and will now generate a warning. 1453 : It will be removed in a later release. Please change any old connect() calls. 1454 1455 Added $dbh2 = $dbh1->clone to make a new connection to the database 1456 that is identical to the original one. clone() can be called even after 1457 the original handle has been disconnected. See the docs for more details. 1458 1459 Fixed merging of profile data to not sum DBIprof_FIRST_TIME values. 1460 Fixed unescaping of newlines in DBI::ProfileData thanks to Sam Tregar. 1461 Fixed Taint bug with fetchrow_hashref with help from Bradley Baetz. 1462 Fixed $dbh->{Active} for DBD::Proxy, reported by Bob Showalter. 1463 Fixed STORE to not clear error during nested DBI call, 1464 thanks to Tony Bowden for the report and helpful test case. 1465 Fixed DBI::PurePerl error clearing behaviour. 1466 Fixed dbi_time() and thus DBI::Profile on Windows thanks to Smejkal Petr. 1467 Fixed problem that meant ShowErrorStatement could show wrong statement, 1468 thanks to Ron Savage for the report and test case. 1469 Changed Apache::DBI hook to check for $ENV{MOD_PERL} instead of 1470 $ENV{GATEWAY_INTERFACE} thanks to Ask Bjoern Hansen. 1471 No longer tries to dup trace logfp when an interpreter is being cloned. 1472 Database handles no longer inherit shared $h->err/errstr/state storage 1473 from their drivers, so each $dbh has it's own $h->err etc. values 1474 and is no longer affected by calls made on other dbh's. 1475 Now when a dbh is destroyed it's err/errstr/state values are copied 1476 up to the driver so checking $DBI::errstr still works as expected. 1477 1478 Build / portability fixes: 1479 Fixed t/40profile.t to not use Time::HiRes. 1480 Fixed t/06attrs.t to not be locale sensitive, reported by Christian Hammers. 1481 Fixed sgi compiler warnings, reported by Paul Blake. 1482 Fixed build using make -j4, reported by Jonathan Leffler. 1483 Fixed build and tests under VMS thanks to Craig A. Berry. 1484 1485 Documentation changes: 1486 Documented $high_resolution_time = dbi_time() function. 1487 Documented that bind_col() can take an attribute hash. 1488 Clarified documentation for ParamValues attribute hash keys. 1489 Many good DBI documentation tweaks from Jonathan Leffler, 1490 including a major update to the DBI::DBD driver author guide. 1491 Clarified that execute() should itself call finish() if it's 1492 called on a statement handle that's still active. 1493 Clarified $sth->{ParamValues}. Driver authors please note. 1494 Removed "NEW" markers on some methods and attributes and 1495 added text to each giving the DBI version it was added in, 1496 if it was added after DBI 1.21 (Feb 2002). 1497 1498 Changes of note for authors of all drivers: 1499 Added SQL_DATA_TYPE, SQL_DATETIME_SUB, NUM_PREC_RADIX, and 1500 INTERVAL_PRECISION fields to docs for type_info_all. There were 1501 already in type_info(), but type_info_all() didn't specify the 1502 index values. Please check and update your type_info_all() code. 1503 Added DBI::DBD::Metadata module that auto-generates your drivers 1504 get_info and type_info_all data and code, thanks mainly to 1505 Jonathan Leffler and Steffen Goeldner. If you've not implemented 1506 get_info and type_info_all methods and your database has an ODBC 1507 driver available then this will do all the hard work for you! 1508 Drivers should no longer pass Err, Errstr, or State to _new_drh 1509 or _new_dbh functions. 1510 Please check that you support the slightly modified behaviour of 1511 $sth->{ParamValues}, e.g., always return hash with keys if possible. 1512 1513 Changes of note for authors of compiled drivers: 1514 Added dbd_db_login6 & dbd_st_finish3 prototypes thanks to Jonathan Leffler. 1515 All dbd_*_*() functions implemented by drivers must have a 1516 corresponding #define dbd_*_* <driver_prefix>_*_* otherwise 1517 the driver may not work with a future release of the DBI. 1518 1519 Changes of note for authors of drivers which use Driver.xst: 1520 Some new method hooks have been added are are enabled by 1521 defining corresponding macros: 1522 $drh->data_sources() - dbd_dr_data_sources 1523 $dbh->do() - dbd_db_do4 1524 The following methods won't be compiled into the driver unless 1525 the corresponding macro has been #defined: 1526 $drh->disconnect_all() - dbd_discon_all 1527 1528 1529=head2 Changes in DBI 1.32, 1st December 2002 1530 1531 Fixed to work with 5.005_03 thanks to Tatsuhiko Miyagawa (I've not tested it). 1532 Reenabled taint tests (accidentally left disabled) spotted by Bradley Baetz. 1533 Improved docs for FetchHashKeyName attribute thanks to Ian Barwick. 1534 Fixed core dump if fetchrow_hashref given bad argument (name of attribute 1535 with a value that wasn't an array reference), spotted by Ian Barwick. 1536 Fixed some compiler warnings thanks to David Wheeler. 1537 Updated Steven Hirsch's enhanced proxy work (seems I left out a bit). 1538 Made t/40profile.t tests more reliable, reported by Randy, who is part of 1539 the excellent CPAN testers team: http://testers.cpan.org/ 1540 (Please visit, see the valuable work they do and, ideally, join in!) 1541 1542=head2 Changes in DBI 1.31, 29th November 2002 1543 1544 The fetchall_arrayref method, when called with a $maxrows parameter, 1545 no longer gives an error if called again after all rows have been 1546 fetched. This simplifies application logic when fetching in batches. 1547 Also added batch-fetch while() loop example to the docs. 1548 The proxy now supports non-lazy (synchronous) prepare, positioned 1549 updates (for selects containing 'for update'), PlRPC config set 1550 via attributes, and accurate propagation of errors, all thanks 1551 to Steven Hirsch (plus a minor fix from Sean McMurray and doc 1552 tweaks from Michael A Chase). 1553 The DBI_AUTOPROXY env var can now hold the full dsn of the proxy driver 1554 plus attributes, like "dbi:Proxy(proxy_foo=>1):host=...". 1555 Added TaintIn & TaintOut attributes to give finer control over 1556 tainting thanks to Bradley Baetz. 1557 The RootClass attribute no longer ignores failure to load a module, 1558 but also doesn't try to load a module if the class already exists, 1559 with thanks to James FitzGibbon. 1560 HandleError attribute works for connect failures thanks to David Wheeler. 1561 The connect() RaiseError/PrintError message now includes the username. 1562 Changed "last handle unknown or destroyed" warning to be a trace message. 1563 Removed undocumented $h->event() method. 1564 Further enhancements to DBD::PurePerl accuracy. 1565 The CursorName attribute now defaults to undef and not an error. 1566 1567 DBI::Profile changes: 1568 New DBI::ProfileDumper, DBI::ProfileDumper::Apache, and 1569 DBI::ProfileData modules (to manage the storage and processing 1570 of profile data), plus dbiprof program for analyzing profile 1571 data - with many thanks to Sam Tregar. 1572 Added $DBI::err (etc) tied variable lookup time to profile. 1573 Added time for DESTROY method into parent handles profile (used to be ignored). 1574 1575 Documentation changes: 1576 Documented $dbh = $sth->{Database} attribute. 1577 Documented $dbh->connected(...) post-connection call when subclassing. 1578 Updated some minor doc issues thanks to H.Merijn Brand. 1579 Updated Makefile.PL example in DBI::DBD thanks to KAWAI,Takanori. 1580 Fixed execute_array() example thanks to Peter van Hardenberg. 1581 1582 Changes for driver authors, not required but strongly recommended: 1583 Change DBIS to DBIc_DBISTATE(imp_xxh) [or imp_dbh, imp_sth etc] 1584 Change DBILOGFP to DBIc_LOGPIO(imp_xxh) [or imp_dbh, imp_sth etc] 1585 Any function from which all instances of DBIS and DBILOGFP are 1586 removed can also have dPERLINTERP removed (a good thing). 1587 All use of the DBIh_EVENT* macros should be removed. 1588 Major update to DBI::DBD docs thanks largely to Jonathan Leffler. 1589 Add these key values: 'Err' => \my $err, 'Errstr' => \my $errstr, 1590 to the hash passed to DBI::_new_dbh() in your driver source code. 1591 That will make each $dbh have it's own $h->err and $h->errstr 1592 values separate from other $dbh belonging to the same driver. 1593 If you have a ::db or ::st DESTROY methods that do nothing 1594 you can now remove them - which speeds up handle destruction. 1595 1596 1597=head2 Changes in DBI 1.30, 18th July 2002 1598 1599 Fixed problems with selectrow_array, selectrow_arrayref, and 1600 selectall_arrayref introduced in DBI 1.29. 1601 Fixed FETCHing a handle attribute to not clear $DBI::err etc (broken in 1.29). 1602 Fixed core dump at trace level 9 or above. 1603 Fixed compilation with perl 5.6.1 + ithreads (i.e. Windows). 1604 Changed definition of behaviour of selectrow_array when called in a scalar 1605 context to match fetchrow_array. 1606 Corrected selectrow_arrayref docs which showed selectrow_array thanks to Paul DuBois. 1607 1608=head2 Changes in DBI 1.29, 15th July 2002 1609 1610 NOTE: This release changes the specified behaviour for the 1611 : fetchrow_array method when called in a scalar context: 1612 : The DBI spec used to say that it would return the FIRST field. 1613 : Which field it returns (i.e., the first or the last) is now undefined. 1614 : This does not affect statements that only select one column, which is 1615 : usually the case when fetchrow_array is called in a scalar context. 1616 : FYI, this change was triggered by discovering that the fetchrow_array 1617 : implementation in Driver.xst (used by most compiled drivers) 1618 : didn't match the DBI specification. Rather than change the code 1619 : to match, and risk breaking existing applications, I've changed the 1620 : specification (that part was always of dubious value anyway). 1621 1622 NOTE: Future versions of the DBI may not support for perl 5.5 much longer. 1623 : If you are still using perl 5.005_03 you should be making plans to 1624 : upgrade to at least perl 5.6.1, or 5.8.0. Perl 5.8.0 is due to be 1625 : released in the next week or so. (Although it's a "point 0" release, 1626 : it is the most thoroughly tested release ever.) 1627 1628 Added XS/C implementations of selectrow_array, selectrow_arrayref, and 1629 selectall_arrayref to Driver.xst. See DBI 1.26 Changes for more info. 1630 Removed support for the old (fatally flawed) "5005" threading model. 1631 Added support for new perl 5.8 iThreads thanks to Gerald Richter. 1632 (Threading support and safety should still be regarded as beta 1633 quality until further notice. But it's much better than it was.) 1634 Updated the "Threads and Thread Safety" section of the docs. 1635 The trace output can be sent to STDOUT instead of STDERR by using 1636 "STDOUT" as the name of the file, i.e., $h->trace(..., "STDOUT") 1637 Added pointer to perlreftut, perldsc, perllol, and perlboot manuals 1638 into the intro section of the docs, suggested by Brian McCain. 1639 Fixed DBI::Const::GetInfo::* pod docs thanks to Zack Weinberg. 1640 Some changes to how $dbh method calls are treated by DBI::Profile: 1641 Meta-data methods now clear $dbh->{Statement} on entry. 1642 Some $dbh methods are now profiled as if $dbh->{Statement} was empty 1643 (because thet're unlikely to actually relate to its contents). 1644 Updated dbiport.h to ppport.h from perl 5.8.0. 1645 Tested with perl 5.5.3 (vanilla, Solaris), 5.6.1 (vanilla, Solaris), and 1646 perl 5.8.0 (RC3@17527 with iThreads & Multiplicity on Solaris and FreeBSD). 1647 1648=head2 Changes in DBI 1.28, 14th June 2002 1649 1650 Added $sth->{ParamValues} to return a hash of the most recent 1651 values bound to placeholders via bind_param() or execute(). 1652 Individual drivers need to be updated to support it. 1653 Enhanced ShowErrorStatement to include ParamValues if available: 1654 "DBD::foo::st execute failed: errstr [for statement ``...'' with params: 1='foo']" 1655 Further enhancements to DBD::PurePerl accuracy. 1656 1657=head2 Changes in DBI 1.27, 13th June 2002 1658 1659 Fixed missing column in C implementation of fetchall_arrayref() 1660 thanks to Philip Molter for the prompt reporting of the problem. 1661 1662=head2 Changes in DBI 1.26, 13th June 2002 1663 1664 Fixed t/40profile.t to work on Windows thanks to Smejkal Petr. 1665 Fixed $h->{Profile} to return undef, not error, if not set. 1666 Fixed DBI->available_drivers in scalar context thanks to Michael Schwern. 1667 1668 Added C implementations of selectrow_arrayref() and fetchall_arrayref() 1669 in Driver.xst. All compiled drivers using Driver.xst will now be 1670 faster making those calls. Most noticeable with fetchall_arrayref for 1671 many rows or selectrow_arrayref with a fast query. For example, using 1672 DBD::mysql a selectrow_arrayref for a single row using a primary key 1673 is ~20% faster, and fetchall_arrayref for 20000 rows is twice as fast! 1674 Drivers just need to be recompiled and reinstalled to enable it. 1675 The fetchall_arrayref speed up only applies if $slice parameter is not used. 1676 Added $max_rows parameter to fetchall_arrayref() to optionally limit 1677 the number of rows returned. Can now fetch batches of rows. 1678 Added MaxRows attribute to selectall_arrayref() 1679 which then passes it to fetchall_arrayref(). 1680 Changed selectrow_array to make use of selectrow_arrayref. 1681 Trace level 1 now shows first two parameters of all methods 1682 (used to only for that for some, like prepare,execute,do etc) 1683 Trace indicator for recursive calls (first char on trace lines) 1684 now starts at 1 not 2. 1685 1686 Documented that $h->func() does not trigger RaiseError etc 1687 so applications must explicitly check for errors. 1688 DBI::Profile with DBI_PROFILE now shows percentage time inside DBI. 1689 HandleError docs updated to show that handler can edit error message. 1690 HandleError subroutine interface is now regarded as stable. 1691 1692=head2 Changes in DBI 1.25, 5th June 2002 1693 1694 Fixed build problem on Windows and some compiler warnings. 1695 Fixed $dbh->{Driver} and $sth->{Statement} for driver internals 1696 These are 'inner' handles as per behaviour prior to DBI 1.16. 1697 Further minor improvements to DBI::PurePerl accuracy. 1698 1699=head2 Changes in DBI 1.24, 4th June 2002 1700 1701 Fixed reference loop causing a handle/memory leak 1702 that was introduced in DBI 1.16. 1703 Fixed DBI::Format to work with 'filehandles' from IO::Scalar 1704 and similar modules thanks to report by Jeff Boes. 1705 Fixed $h->func for DBI::PurePerl thanks to Jeff Zucker. 1706 Fixed $dbh->{Name} for DBI::PurePerl thanks to Dean Arnold. 1707 1708 Added DBI method call profiling and benchmarking. 1709 This is a major new addition to the DBI. 1710 See $h->{Profile} attribute and DBI::Profile module. 1711 For a quick trial, set the DBI_PROFILE environment variable and 1712 run your favourite DBI script. Try it with DBI_PROFILE set to 1, 1713 then try 2, 4, 8, 10, and -10. Have fun! 1714 1715 Added execute_array() and bind_param_array() documentation 1716 with thanks to Dean Arnold. 1717 Added notes about the DBI having not yet been tested with iThreads 1718 (testing and patches for SvLOCK etc welcome). 1719 Removed undocumented Handlers attribute (replaced by HandleError). 1720 Tested with 5.5.3 and 5.8.0 RC1. 1721 1722=head2 Changes in DBI 1.23, 25th May 2002 1723 1724 Greatly improved DBI::PurePerl in performance and accuracy. 1725 Added more detail to DBI::PurePerl docs about what's not supported. 1726 Fixed undef warnings from t/15array.t and DBD::Sponge. 1727 1728=head2 Changes in DBI 1.22, 22nd May 2002 1729 1730 Added execute_array() and bind_param_array() with special thanks 1731 to Dean Arnold. Not yet documented. See t/15array.t for examples. 1732 All drivers now automatically support these methods. 1733 Added DBI::PurePerl, a transparent DBI emulation for pure-perl drivers 1734 with special thanks to Jeff Zucker. Perldoc DBI::PurePerl for details. 1735 Added DBI::Const::GetInfo* modules thanks to Steffen Goeldner. 1736 Added write_getinfo_pm utility to DBI::DBD thanks to Steffen Goeldner. 1737 Added $allow_active==2 mode for prepare_cached() thanks to Stephen Clouse. 1738 1739 Updated DBI::Format to Revision 11.4 thanks to Tom Lowery. 1740 Use File::Spec in Makefile.PL (helps VMS etc) thanks to Craig Berry. 1741 Extend $h->{Warn} to commit/rollback ineffective warning thanks to Jeff Baker. 1742 Extended t/preparse.t and removed "use Devel::Peek" thanks to Scott Hildreth. 1743 Only copy Changes to blib/lib/Changes.pm once thanks to Jonathan Leffler. 1744 Updated internals for modern perls thanks to Jonathan Leffler and Jeff Urlwin. 1745 Tested with perl 5.7.3 (just using default perl config). 1746 1747 Documentation changes: 1748 1749 Added 'Catalog Methods' section to docs thanks to Steffen Goeldner. 1750 Updated README thanks to Michael Schwern. 1751 Clarified that driver may choose not to start new transaction until 1752 next use of $dbh after commit/rollback. 1753 Clarified docs for finish method. 1754 Clarified potentials problems with prepare_cached() thanks to Stephen Clouse. 1755 1756 1757=head2 Changes in DBI 1.21, 7th February 2002 1758 1759 The minimum supported perl version is now 5.005_03. 1760 1761 Fixed DBD::Proxy support for AutoCommit thanks to Jochen Wiedmann. 1762 Fixed DBI::ProxyServer bind_param(_inout) handing thanks to Oleg Mechtcheriakov. 1763 Fixed DBI::ProxyServer fetch loop thanks to nobull@mail.com. 1764 Fixed install_driver do-the-right-thing with $@ on error. It, and connect(), 1765 will leave $@ empty on success and holding the error message on error. 1766 Thanks to Jay Lawrence, Gavin Sherlock and others for the bug report. 1767 Fixed fetchrow_hashref to assign columns to the hash left-to-right 1768 so later fields with the same name overwrite earlier ones 1769 as per DBI < 1.15, thanks to Kay Roepke. 1770 1771 Changed tables() to use quote_indentifier() if the driver returns a 1772 true value for $dbh->get_info(29) # SQL_IDENTIFIER_QUOTE_CHAR 1773 Changed ping() so it no longer triggers RaiseError/PrintError. 1774 Changed connect() to not call $class->install_driver unless needed. 1775 Changed DESTROY to catch fatal exceptions and append to $@. 1776 1777 Added ISO SQL/CLI & ODBCv3 data type definitions thanks to Steffen Goeldner. 1778 Removed the definition of SQL_BIGINT data type constant as the value is 1779 inconsistent between standards (ODBC=-5, SQL/CLI=25). 1780 Added $dbh->column_info(...) thanks to Steffen Goeldner. 1781 Added $dbh->foreign_key_info(...) thanks to Steffen Goeldner. 1782 Added $dbh->quote_identifier(...) insipred by Simon Oliver. 1783 Added $dbh->set_err(...) for DBD authors and DBI subclasses 1784 (actually been there for a while, now expanded and documented). 1785 Added $h->{HandleError} = sub { ... } addition and/or alternative 1786 to RaiseError/PrintError. See the docs for more info. 1787 Added $h->{TraceLevel} = N attribute to set/get trace level of handle 1788 thus can set trace level via an (eg externally specified) DSN 1789 using the embedded attribute syntax: 1790 $dsn = 'dbi:DB2(PrintError=1,TraceLevel=2):dbname'; 1791 Plus, you can also now do: local($h->{TraceLevel}) = N; 1792 (but that leaks a little memory in some versions of perl). 1793 Added some call tree information to trace output if trace level >= 3 1794 With thanks to Graham Barr for the stack walking code. 1795 Added experimental undocumented $dbh->preparse(), see t/preparse.t 1796 With thanks to Scott T. Hildreth for much of the work. 1797 Added Fowler/Noll/Vo hash type as an option to DBI::hash(). 1798 1799 Documentation changes: 1800 1801 Added DBI::Changes so now you can "perldoc DBI::Changes", yeah! 1802 Added selectrow_arrayref & selectrow_hashref docs thanks to Doug Wilson. 1803 Added 'Standards Reference Information' section to docs to gather 1804 together all references to relevant on-line standards. 1805 Added link to poop.sourceforge.net into the docs thanks to Dave Rolsky. 1806 Added link to hyperlinked BNF for SQL92 thanks to Jeff Zucker. 1807 Added 'Subclassing the DBI' docs thanks to Stephen Clouse, and 1808 then changed some of them to reflect the new approach to subclassing. 1809 Added stronger wording to description of $h->{private_*} attributes. 1810 Added docs for DBI::hash. 1811 1812 Driver API changes: 1813 1814 Now a COPY of the DBI->connect() attributes is passed to the driver 1815 connect() method, so it can process and delete any elements it wants. 1816 Deleting elements reduces/avoids the explicit 1817 $dbh->{$_} = $attr->{$_} foreach keys %$attr; 1818 that DBI->connect does after the driver connect() method returns. 1819 1820 1821=head2 Changes in DBI 1.20, 24th August 2001 1822 1823 WARNING: This release contains two changes that may affect your code. 1824 : Any code using selectall_hashref(), which was added in March 2001, WILL 1825 : need to be changed. Any code using fetchall_arrayref() with a non-empty 1826 : hash slice parameter may, in a few rare cases, need to be changed. 1827 : See the change list below for more information about the changes. 1828 : See the DBI documentation for a description of current behaviour. 1829 1830 Fixed memory leak thanks to Toni Andjelkovic. 1831 Changed fetchall_arrayref({ foo=>1, ...}) specification again (sorry): 1832 The key names of the returned hashes is identical to the letter case of 1833 the names in the parameter hash, regardless of the L</FetchHashKeyName> 1834 attribute. The letter case is ignored for matching. 1835 Changed fetchall_arrayref([...]) array slice syntax specification to 1836 clarify that the numbers in the array slice are perl index numbers 1837 (which start at 0) and not column numbers (which start at 1). 1838 Added { Columns=>... } and { Slice =>... } attributes to selectall_arrayref() 1839 which is passed to fetchall_arrayref() so it can fetch hashes now. 1840 Added a { Columns => [...] } attribute to selectcol_arrayref() so that 1841 the list it returns can be built from more than one column per row. 1842 Why? Consider my %hash = @{$dbh->selectcol_arrayref($sql,{ Columns=>[1,2]})} 1843 to return id-value pairs which can be used directly to build a hash. 1844 Added $hash_ref = $sth->fetchall_hashref( $key_field ) 1845 which returns a ref to a hash with, typically, one element per row. 1846 $key_field is the name of the field to get the key for each row from. 1847 The value of the hash for each row is a hash returned by fetchrow_hashref. 1848 Changed selectall_hashref to return a hash ref (from fetchall_hashref) 1849 and not an array of hashes as it has since DBI 1.15 (end March 2001). 1850 WARNING: THIS CHANGE WILL BREAK ANY CODE USING selectall_hashref()! 1851 Sorry, but I think this is an important regularization of the API. 1852 To get previous selectall_hashref() behaviour (an array of hash refs) 1853 change $ary_ref = $dbh->selectall_hashref( $statement, undef, @bind); 1854 to $ary_ref = $dbh->selectall_arrayref($statement, { Columns=>{} }, @bind); 1855 Added NAME_lc_hash, NAME_uc_hash, NAME_hash statement handle attributes. 1856 which return a ref to a hash of field_name => field_index (0..n-1) pairs. 1857 Fixed select_hash() example thanks to Doug Wilson. 1858 Removed (unbundled) DBD::ADO and DBD::Multiplex from the DBI distribution. 1859 The latest versions of those modules are available from CPAN sites. 1860 Added $dbh->begin_work. This method causes AutoCommit to be turned 1861 off just until the next commit() or rollback(). 1862 Driver authors: if the DBIcf_BegunWork flag is set when your commit or 1863 rollback method is called then please turn AutoCommit on and clear the 1864 DBIcf_BegunWork flag. If you don't then the DBI will but it'll be much 1865 less efficient and won't handle error conditions very cleanly. 1866 Retested on perl 5.4.4, but the DBI won't support 5.4.x much longer. 1867 Added text to SUPPORT section of the docs: 1868 For direct DBI and DBD::Oracle support, enhancement, and related work 1869 I am available for consultancy on standard commercial terms. 1870 Added text to ACKNOWLEDGEMENTS section of the docs: 1871 Much of the DBI and DBD::Oracle was developed while I was Technical 1872 Director (CTO) of the Paul Ingram Group (www.ig.co.uk). So I'd 1873 especially like to thank Paul for his generosity and vision in 1874 supporting this work for many years. 1875 1876=head2 Changes in DBI 1.19, 20th July 2001 1877 1878 Made fetchall_arrayref({ foo=>1, ...}) be more strict to the specification 1879 in relation to wanting hash slice keys to be lowercase names. 1880 WARNING: If you've used fetchall_arrayref({...}) with a hash slice 1881 that contains keys with uppercase letters then your code will break. 1882 (As far as I recall the spec has always said don't do that.) 1883 Fixed $sth->execute() to update $dbh->{Statement} to $sth->{Statement}. 1884 Added row number to trace output for fetch method calls. 1885 Trace level 1 no longer shows fetches with row>1 (to reduce output volume). 1886 Added $h->{FetchHashKeyName} = 'NAME_lc' or 'NAME_uc' to alter 1887 behaviour of fetchrow_hashref() method. See docs. 1888 Added type_info quote caching to quote() method thanks to Dean Kopesky. 1889 Makes using quote() with second data type param much much faster. 1890 Added type_into_all() caching to type_info(), spotted by Dean Kopesky. 1891 Added new API definition for table_info() and tables(), 1892 driver authors please note! 1893 Added primary_key_info() to DBI API thanks to Steffen Goeldner. 1894 Added primary_key() to DBI API as simpler interface to primary_key_info(). 1895 Indent and other fixes for DBI::DBD doc thanks to H.Merijn Brand. 1896 Added prepare_cached() insert_hash() example thanks to Doug Wilson. 1897 Removed false docs for fetchall_hashref(), use fetchall_arrayref({}). 1898 1899=head2 Changes in DBI 1.18, 4th June 2001 1900 1901 Fixed that altering ShowErrorStatement also altered AutoCommit! 1902 Thanks to Jeff Boes for spotting that clanger. 1903 Fixed DBD::Proxy to handle commit() and rollback(). Long overdue, sorry. 1904 Fixed incompatibility with perl 5.004 (but no one's using that right? :) 1905 Fixed connect_cached and prepare_cached to not be affected by the order 1906 of elements in the attribute hash. Spotted by Mitch Helle-Morrissey. 1907 Fixed version number of DBI::Shell 1908 reported by Stuhlpfarrer Gerhard and others. 1909 Defined and documented table_info() attribute semantics (ODBC compatible) 1910 thanks to Olga Voronova, who also implemented then in DBD::Oracle. 1911 Updated Win32::DBIODBC (Win32::ODBC emulation) thanks to Roy Lee. 1912 1913=head2 Changes in DBI 1.16, 30th May 2001 1914 1915 Reimplemented fetchrow_hashref in C, now fetches about 25% faster! 1916 Changed behaviour if both PrintError and RaiseError are enabled 1917 to simply do both (in that order, obviously :) 1918 Slight reduction in DBI handle creation overhead. 1919 Fixed $dbh->{Driver} & $sth->{Database} to return 'outer' handles. 1920 Fixed execute param count check to honour RaiseError spotted by Belinda Giardie. 1921 Fixed build for perl5.6.1 with PERLIO thanks to H.Merijn Brand. 1922 Fixed client sql restrictions in ProxyServer.pm thanks to Jochen Wiedmann. 1923 Fixed batch mode command parsing in Shell thanks to Christian Lemburg. 1924 Fixed typo in selectcol_arrayref docs thanks to Jonathan Leffler. 1925 Fixed selectrow_hashref to be available to callers thanks to T.J.Mather. 1926 Fixed core dump if statement handle didn't define Statement attribute. 1927 Added bind_param_inout docs to DBI::DBD thanks to Jonathan Leffler. 1928 Added note to data_sources() method docs that some drivers may 1929 require a connected database handle to be supplied as an attribute. 1930 Trace of install_driver method now shows path of driver file loaded. 1931 Changed many '||' to 'or' in the docs thanks to H.Merijn Brand. 1932 Updated DBD::ADO again (improvements in error handling) from Tom Lowery. 1933 Updated Win32::DBIODBC (Win32::ODBC emulation) thanks to Roy Lee. 1934 Updated email and web addresses in DBI::FAQ thanks to Michael A Chase. 1935 1936=head2 Changes in DBI 1.15, 28th March 2001 1937 1938 Added selectrow_arrayref 1939 Added selectrow_hashref 1940 Added selectall_hashref thanks to Leon Brocard. 1941 Added DBI->connect(..., { dbi_connect_method => 'method' }) 1942 Added $dbh->{Statement} aliased to most recent child $sth->{Statement}. 1943 Added $h->{ShowErrorStatement}=1 to cause the appending of the 1944 relevant Statement text to the RaiseError/PrintError text. 1945 Modified type_info to always return hash keys in uppercase and 1946 to not require uppercase 'DATA_TYPE' key from type_info_all. 1947 Thanks to Jennifer Tong and Rob Douglas. 1948 Added \%attr param to tables() and table_info() methods. 1949 Trace method uses warn() if it can't open the new file. 1950 Trace shows source line and filename during global destruction. 1951 Updated packages: 1952 Updated Win32::DBIODBC (Win32::ODBC emulation) thanks to Roy Lee. 1953 Updated DBD::ADO to much improved version 0.4 from Tom Lowery. 1954 Updated DBD::Sponge to include $sth->{PRECISION} thanks to Tom Lowery. 1955 Changed DBD::ExampleP to use lstat() instead of stat(). 1956 Documentation: 1957 Documented $DBI::lasth (which has been there since day 1). 1958 Documented SQL_* names. 1959 Clarified and extended docs for $h->state thanks to Masaaki Hirose. 1960 Clarified fetchall_arrayref({}) docs (thanks to, er, someone!). 1961 Clarified type_info_all re lettercase and index values. 1962 Updated DBI::FAQ to 0.38 thanks to Alligator Descartes. 1963 Added cute bind_columns example thanks to H.Merijn Brand. 1964 Extended docs on \%attr arg to data_sources method. 1965 Makefile.PL 1966 Removed obscure potential 'rm -rf /' (thanks to Ulrich Pfeifer). 1967 Removed use of glob and find (thanks to Michael A. Chase). 1968 Proxy: 1969 Removed debug messages from DBD::Proxy AUTOLOAD thanks to Brian McCauley. 1970 Added fix for problem using table_info thanks to Tom Lowery. 1971 Added better determination of where to put the pid file, and... 1972 Added KNOWN ISSUES section to DBD::Proxy docs thanks to Jochen Wiedmann. 1973 Shell: 1974 Updated DBI::Format to include DBI::Format::String thanks to Tom Lowery. 1975 Added describe command thanks to Tom Lowery. 1976 Added columnseparator option thanks to Tom Lowery (I think). 1977 Added 'raw' format thanks to, er, someone, maybe Tom again. 1978 Known issues: 1979 Perl 5.005 and 5.006 both leak memory doing local($handle->{Foo}). 1980 Perl 5.004 doesn't. The leak is not a DBI or driver bug. 1981 1982=head2 Changes in DBI 1.14, 14th June 2000 1983 1984 NOTE: This version is the one the DBI book is based on. 1985 NOTE: This version requires at least Perl 5.004. 1986 Perl 5.6 ithreads changes with thanks to Doug MacEachern. 1987 Changed trace output to use PerlIO thanks to Paul Moore. 1988 Fixed bug in RaiseError/PrintError handling. 1989 (% chars in the error string could cause a core dump.) 1990 Fixed Win32 PerlEx IIS concurrency bugs thanks to Murray Nesbitt. 1991 Major documentation polishing thanks to Linda Mui at O'Reilly. 1992 Password parameter now shown as **** in trace output. 1993 Added two fields to type_info and type_info_all. 1994 Added $dsn to PrintError/RaiseError message from DBI->connect(). 1995 Changed prepare_cached() croak to carp if sth still Active. 1996 Added prepare_cached() example to the docs. 1997 Added further DBD::ADO enhancements from Thomas Lowery. 1998 1999=head2 Changes in DBI 1.13, 11th July 1999 2000 2001 Fixed Win32 PerlEx IIS concurrency bugs thanks to Murray Nesbitt. 2002 Fixed problems with DBD::ExampleP long_list test mode. 2003 Added SQL_WCHAR SQL_WVARCHAR SQL_WLONGVARCHAR and SQL_BIT 2004 to list of known and exportable SQL types. 2005 Improved data fetch performance of DBD::ADO. 2006 Added GetTypeInfo to DBD::ADO thanks to Thomas Lowery. 2007 Actually documented connect_cached thanks to Michael Schwern. 2008 Fixed user/key/cipher bug in ProxyServer thanks to Joshua Pincus. 2009 2010=head2 Changes in DBI 1.12, 29th June 1999 2011 2012 Fixed significant DBD::ADO bug (fetch skipped first row). 2013 Fixed ProxyServer bug handling non-select statements. 2014 Fixed VMS problem with t/examp.t thanks to Craig Berry. 2015 Trace only shows calls to trace_msg and _set_fbav at high levels. 2016 Modified t/examp.t to workaround Cygwin buffering bug. 2017 2018=head2 Changes in DBI 1.11, 17th June 1999 2019 2020 Fixed bind_columns argument checking to allow a single arg. 2021 Fixed problems with internal default_user method. 2022 Fixed broken DBD::ADO. 2023 Made default $DBI::rows more robust for some obscure cases. 2024 2025=head2 Changes in DBI 1.10, 14th June 1999 2026 2027 Fixed trace_msg.al error when using Apache. 2028 Fixed dbd_st_finish enhancement in Driver.xst (internals). 2029 Enable drivers to define default username and password 2030 and temporarily disabled warning added in 1.09. 2031 Thread safety optimised for single thread case. 2032 2033=head2 Changes in DBI 1.09, 9th June 1999 2034 2035 Added optional minimum trace level parameter to trace_msg(). 2036 Added warning in Makefile.PL that DBI will require 5.004 soon. 2037 Added $dbh->selectcol_arrayref($statement) method. 2038 Fixed fetchall_arrayref hash-slice mode undef NAME problem. 2039 Fixed problem with tainted parameter checking and t/examp.t. 2040 Fixed problem with thread safety code, including 64 bit machines. 2041 Thread safety now enabled by default for threaded perls. 2042 Enhanced code for MULTIPLICITY/PERL_OBJECT from ActiveState. 2043 Enhanced prepare_cached() method. 2044 Minor changes to trace levels (less internal info at level 2). 2045 Trace log now shows "!! ERROR..." before the "<- method" line. 2046 DBI->connect() now warn's if user / password is undefined and 2047 DBI_USER / DBI_PASS environment variables are not defined. 2048 The t/proxy.t test now ignores any /etc/dbiproxy.conf file. 2049 Added portability fixes for MacOS from Chris Nandor. 2050 Updated mailing list address from fugue.com to isc.org. 2051 2052=head2 Changes in DBI 1.08, 12th May 1999 2053 2054 Much improved DBD::ADO driver thanks to Phlip Plumlee and others. 2055 Connect now allows you to specify attribute settings within the DSN 2056 E.g., "dbi:Driver(RaiseError=>1,Taint=>1,AutoCommit=>0):dbname" 2057 The $h->{Taint} attribute now also enables taint checking of 2058 arguments to almost all DBI methods. 2059 Improved trace output in various ways. 2060 Fixed bug where $sth->{NAME_xx} was undef in some situations. 2061 Fixed code for MULTIPLICITY/PERL_OBJECT thanks to Alex Smishlajev. 2062 Fixed and documented DBI->connect_cached. 2063 Workaround for Cygwin32 build problem with help from Jong-Pork Park. 2064 bind_columns no longer needs undef or hash ref as first parameter. 2065 2066=head2 Changes in DBI 1.07, 6th May 1999 2067 2068 Trace output now shows contents of array refs returned by DBI. 2069 Changed names of some result columns from type_info, type_info_all, 2070 tables and table_info to match ODBC 3.5 / ISO/IEC standards. 2071 Many fixes for DBD::Proxy and ProxyServer. 2072 Fixed error reporting in install_driver. 2073 Major enhancement to DBI::W32ODBC from Patrick Hollins. 2074 Added $h->{Taint} to taint fetched data if tainting (perl -T). 2075 Added code for MULTIPLICITY/PERL_OBJECT contributed by ActiveState. 2076 Added $sth->more_results (undocumented for now). 2077 2078=head2 Changes in DBI 1.06, 6th January 1999 2079 2080 Fixed Win32 Makefile.PL problem in 1.04 and 1.05. 2081 Significant DBD::Proxy enhancements and fixes 2082 including support for bind_param_inout (Jochen and I) 2083 Added experimental DBI->connect_cached method. 2084 Added $sth->{NAME_uc} and $sth->{NAME_lc} attributes. 2085 Enhanced fetchrow_hashref to take an attribute name arg. 2086 2087=head2 Changes in DBI 1.05, 4th January 1999 2088 2089 Improved DBD::ADO connect (thanks to Phlip Plumlee). 2090 Improved thread safety (thanks to Jochen Wiedmann). 2091 [Quick release prompted by truncation of copies on CPAN] 2092 2093=head2 Changes in DBI 1.04, 3rd January 1999 2094 2095 Fixed error in Driver.xst. DBI build now tests Driver.xst. 2096 Removed unused variable compiler warnings in Driver.xst. 2097 DBI::DBD module now tested during DBI build. 2098 Further clarification in the DBI::DBD driver writers manual. 2099 Added optional name parameter to $sth->fetchrow_hashref. 2100 2101=head2 Changes in DBI 1.03, 1st January 1999 2102 2103 Now builds with Perl>=5.005_54 (PERL_POLLUTE in DBIXS.h) 2104 DBI trace trims path from "at yourfile.pl line nnn". 2105 Trace level 1 now shows statement passed to prepare. 2106 Assorted improvements to the DBI manual. 2107 Assorted improvements to the DBI::DBD driver writers manual. 2108 Fixed $dbh->quote prototype to include optional $data_type. 2109 Fixed $dbh->prepare_cached problems. 2110 $dbh->selectrow_array behaves better in scalar context. 2111 Added a (very) experimental DBD::ADO driver for Win32 ADO. 2112 Added experimental thread support (perl Makefile.PL -thread). 2113 Updated the DBI::FAQ - thanks to Alligator Descartes. 2114 The following changes were implemented and/or packaged 2115 by Jochen Wiedmann - thanks Jochen: 2116 Added a Bundle for CPAN installation of DBI, the DBI proxy 2117 server and prerequisites (lib/Bundle/DBI.pm). 2118 DBI->available_drivers uses File::Spec, if available. 2119 This makes it work on MacOS. (DBI.pm) 2120 Modified type_info to work with read-only values returned 2121 by type_info_all. (DBI.pm) 2122 Added handling of magic values in $sth->execute, 2123 $sth->bind_param and other methods (Driver.xst) 2124 Added Perl's CORE directory to the linkers path on Win32, 2125 required by recent versions of ActiveState Perl. 2126 Fixed DBD::Sponge to work with empty result sets. 2127 Complete rewrite of DBI::ProxyServer and DBD::Proxy. 2128 2129=head2 Changes in DBI 1.02, 2nd September 1998 2130 2131 Fixed DBI::Shell including @ARGV and /current. 2132 Added basic DBI::Shell test. 2133 Renamed DBI::Shell /display to /format. 2134 2135=head2 Changes in DBI 1.01, 2nd September 1998 2136 2137 Many enhancements to Shell (with many contributions from 2138 Jochen Wiedmann, Tom Lowery and Adam Marks). 2139 Assorted fixes to DBD::Proxy and DBI::ProxyServer. 2140 Tidied up trace messages - trace(2) much cleaner now. 2141 Added $dbh->{RowCacheSize} and $sth->{RowsInCache}. 2142 Added experimental DBI::Format (mainly for DBI::Shell). 2143 Fixed fetchall_arrayref($slice_hash). 2144 DBI->connect now honours PrintError=1 if connect fails. 2145 Assorted clarifications to the docs. 2146 2147=head2 Changes in DBI 1.00, 14th August 1998 2148 2149 The DBI is no longer 'alpha' software! 2150 Added $dbh->tables and $dbh->table_info. 2151 Documented \%attr arg to data_sources method. 2152 Added $sth->{TYPE}, $sth->{PRECISION} and $sth->{SCALE}. 2153 Added $sth->{Statement}. 2154 DBI::Shell now uses neat_list to print results 2155 It also escapes "'" chars and converts newlines to spaces. 2156 2157=head2 Changes in DBI 0.95, 10th August 1998 2158 2159 WARNING: THIS IS AN EXPERIMENTAL RELEASE! 2160 2161 Fixed 0.94 slip so it will build on pre-5.005 again. 2162 Added DBI_AUTOPROXY environment variable. 2163 Array ref returned from fetch/fetchrow_arrayref now readonly. 2164 Improved connect error reporting by DBD::Proxy. 2165 All trace/debug messages from DBI now go to trace file. 2166 2167=head2 Changes in DBI 0.94, 9th August 1998 2168 2169 WARNING: THIS IS AN EXPERIMENTAL RELEASE! 2170 2171 Added DBD::Shell and dbish interactive DBI shell. Try it! 2172 Any database attribs can be set via DBI->connect(,,, \%attr). 2173 Added _get_fbav and _set_fbav methods for Perl driver developers 2174 (see ExampleP driver for perl usage). Drivers which don't use 2175 one of these methods (either via XS or Perl) are not compliant. 2176 DBI trace now shows adds " at yourfile.pl line nnn"! 2177 PrintError and RaiseError now prepend driver and method name. 2178 The available_drivers method no longer returns NullP or Sponge. 2179 Added $dbh->{Name}. 2180 Added $dbh->quote($value, $data_type). 2181 Added more hints to install_driver failure message. 2182 Added DBD::Proxy and DBI::ProxyServer (from Jochen Wiedmann). 2183 Added $DBI::neat_maxlen to control truncation of trace output. 2184 Added $dbh->selectall_arrayref and $dbh->selectrow_array methods. 2185 Added $dbh->tables. 2186 Added $dbh->type_info and $dbh->type_info_all. 2187 Added $h->trace_msg($msg) to write to trace log. 2188 Added @bool = DBI::looks_like_number(@ary). 2189 Many assorted improvements to the DBI docs. 2190 2191=head2 Changes in DBI 0.93, 13th February 1998 2192 2193 Fixed DBI::DBD::dbd_postamble bug causing 'Driver.xsi not found' errors. 2194 Changes to handling of 'magic' values in neatsvpv (used by trace). 2195 execute (in Driver.xst) stops binding after first bind error. 2196 This release requires drivers to be rebuilt. 2197 2198=head2 Changes in DBI 0.92, 3rd February 1998 2199 2200 Fixed per-handle memory leak (with many thanks to Irving Reid). 2201 Added $dbh->prepare_cached() caching variant of $dbh->prepare. 2202 Added some attributes: 2203 $h->{Active} is the handle 'Active' (vague concept) (boolean) 2204 $h->{Kids} e.g. number of sth's associated with a dbh 2205 $h->{ActiveKids} number of the above which are 'Active' 2206 $dbh->{CachedKids} ref to prepare_cached sth cache 2207 Added support for general-purpose 'private_' attributes. 2208 Added experimental support for subclassing the DBI: see t/subclass.t 2209 Added SQL_ALL_TYPES to exported :sql_types. 2210 Added dbd_dbi_dir() and dbd_dbi_arch_dir() to DBI::DBD module so that 2211 DBD Makefile.PLs can work with the DBI installed in non-standard locations. 2212 Fixed 'Undefined value' warning and &sv_no output from neatsvpv/trace. 2213 Fixed small 'once per interpreter' leak. 2214 Assorted minor documentation fixes. 2215 2216=head2 Changes in DBI 0.91, 10th December 1997 2217 2218 NOTE: This fix may break some existing scripts: 2219 DBI->connect("dbi:...",$user,$pass) was not setting AutoCommit and PrintError! 2220 DBI->connect(..., { ... }) no longer sets AutoCommit or PrintError twice. 2221 DBI->connect(..., { RaiseError=>1 }) now croaks if connect fails. 2222 Fixed $fh parameter of $sth->dump_results; 2223 Added default statement DESTROY method which carps. 2224 Added default driver DESTROY method to silence AUTOLOAD/__DIE__/CGI::Carp 2225 Added more SQL_* types to %EXPORT_TAGS and @EXPORT_OK. 2226 Assorted documentation updates (mainly clarifications). 2227 Added workaround for perl's 'sticky lvalue' bug. 2228 Added better warning for bind_col(umns) where fields==0. 2229 Fixed to build okay with 5.004_54 with or without USE_THREADS. 2230 Note that the DBI has not been tested for thread safety yet. 2231 2232=head2 Changes in DBI 0.90, 6th September 1997 2233 2234 Can once again be built with Perl 5.003. 2235 The DBI class can be subclassed more easily now. 2236 InactiveDestroy fixed for drivers using the *.xst template. 2237 Slightly faster handle creation. 2238 Changed prototype for dbd_*_*_attrib() to add extra param. 2239 Note: 0.90, 0.89 and possibly some other recent versions have 2240 a small memory leak. This will be fixed in the next release. 2241 2242=head2 Changes in DBI 0.89, 25th July 1997 2243 2244 Minor fix to neatsvpv (mainly used for debug trace) to workaround 2245 bug in perl where SvPV removes IOK flag from an SV. 2246 Minor updates to the docs. 2247 2248=head2 Changes in DBI 0.88, 22nd July 1997 2249 2250 Fixed build for perl5.003 and Win32 with Borland. 2251 Fixed documentation formatting. 2252 Fixed DBI_DSN ignored for old-style connect (with explicit driver). 2253 Fixed AutoCommit in DBD::ExampleP 2254 Fixed $h->trace. 2255 The DBI can now export SQL type values: use DBI ':sql_types'; 2256 Modified Driver.xst and renamed DBDI.h to dbd_xsh.h 2257 2258=head2 Changes in DBI 0.87, 18th July 1997 2259 2260 Fixed minor type clashes. 2261 Added more docs about placeholders and bind values. 2262 2263=head2 Changes in DBI 0.86, 16th July 1997 2264 2265 Fixed failed connect causing 'unblessed ref' and other errors. 2266 Drivers must handle AutoCommit FETCH and STORE else DBI croaks. 2267 Added $h->{LongReadLen} and $h->{LongTruncOk} attributes for BLOBS. 2268 Added DBI_USER and DBI_PASS env vars. See connect docs for usage. 2269 Added DBI->trace() to set global trace level (like per-handle $h->trace). 2270 PERL_DBI_DEBUG env var renamed DBI_DEBUG (old name still works for now). 2271 Updated docs, including commit, rollback, AutoCommit and Transactions sections. 2272 Added bind_param method and execute(@bind_values) to docs. 2273 Fixed fetchall_arrayref. 2274 2275 Since the DBIS structure has change the internal version numbers have also 2276 changed (DBIXS_VERSION == 9 and DBISTATE_VERSION == 9) so drivers will have 2277 to be recompiled. The test is also now more sensitive and the version 2278 mismatch error message now more clear about what to do. Old drivers are 2279 likely to core dump (this time) until recompiled for this DBI. In future 2280 DBI/DBD version mismatch will always produce a clear error message. 2281 2282 Note that this DBI release contains and documents many new features 2283 that won't appear in drivers for some time. Driver writers might like 2284 to read perldoc DBI::DBD and comment on or apply the information given. 2285 2286=head2 Changes in DBI 0.85, 25th June 1997 2287 2288 NOTE: New-style connect now defaults to AutoCommit mode unless 2289 { AutoCommit => 0 } specified in connect attributes. See the docs. 2290 AutoCommit attribute now defined and tracked by DBI core. 2291 Drivers should use/honour this and not implement their own. 2292 Added pod doc changes from Andreas and Jonathan. 2293 New DBI_DSN env var default for connect method. See docs. 2294 Documented the func method. 2295 Fixed "Usage: DBD::_::common::DESTROY" error. 2296 Fixed bug which set some attributes true when there value was fetched. 2297 Added new internal DBIc_set() macro for drivers to use. 2298 2299=head2 Changes in DBI 0.84, 20th June 1997 2300 2301 Added $h->{PrintError} attribute which, if set true, causes all errors to 2302 trigger a warn(). 2303 New-style DBI->connect call now automatically sets PrintError=1 unless 2304 { PrintError => 0 } specified in the connect attributes. See the docs. 2305 The old-style connect with a separate driver parameter is deprecated. 2306 Fixed fetchrow_hashref. 2307 Renamed $h->debug to $h->trace() and added a trace filename arg. 2308 Assorted other minor tidy-ups. 2309 2310=head2 Changes in DBI 0.83, 11th June 1997 2311 2312 Added driver specification syntax to DBI->connect data_source 2313 parameter: DBI->connect('dbi:driver:...', $user, $passwd); 2314 The DBI->data_sources method should return data_source 2315 names with the appropriate 'dbi:driver:' prefix. 2316 DBI->connect will warn if \%attr is true but not a hash ref. 2317 Added the new fetchrow methods: 2318 @row_ary = $sth->fetchrow_array; 2319 $ary_ref = $sth->fetchrow_arrayref; 2320 $hash_ref = $sth->fetchrow_hashref; 2321 The old fetch and fetchrow methods still work. 2322 Driver implementors should implement the new names for 2323 fetchrow_array and fetchrow_arrayref ASAP (use the xs ALIAS: 2324 directive to define aliases for fetch and fetchrow). 2325 Fixed occasional problems with t/examp.t test. 2326 Added automatic errstr reporting to the debug trace output. 2327 Added the DBI FAQ from Alligator Descartes in module form for 2328 easy reading via "perldoc DBI::FAQ". Needs reformatting. 2329 Unknown driver specific attribute names no longer croak. 2330 Fixed problem with internal neatsvpv macro. 2331 2332=head2 Changes in DBI 0.82, 23rd May 1997 2333 2334 Added $h->{RaiseError} attribute which, if set true, causes all errors to 2335 trigger a die(). This makes it much easier to implement robust applications 2336 in terms of higher level eval { ... } blocks and rollbacks. 2337 Added DBI->data_sources($driver) method for implementation by drivers. 2338 The quote method now returns the string NULL (without quotes) for undef. 2339 Added VMS support thanks to Dan Sugalski. 2340 Added a 'quick start guide' to the README. 2341 Added neatsvpv function pointer to DBIS structure to make it available for 2342 use by drivers. A macro defines neatsvpv(sv,len) as (DBIS->neatsvpv(sv,len)). 2343 Old XS macro SV_YES_NO changes to standard boolSV. 2344 Since the DBIS structure has change the internal version numbers have also 2345 changed (DBIXS_VERSION == 8 and DBISTATE_VERSION == 8) so drivers will have 2346 to be recompiled. 2347 2348=head2 Changes in DBI 0.81, 7th May 1997 2349 2350 Minor fix to let DBI build using less modern perls. 2351 Fixed a suprious typo warning. 2352 2353=head2 Changes in DBI 0.80, 6th May 1997 2354 2355 Builds with no changes on NT using perl5.003_99 (with thanks to Jeffrey Urlwin). 2356 Automatically supports Apache::DBI (with thanks to Edmund Mergl). 2357 DBI scripts no longer need to be modified to make use of Apache::DBI. 2358 Added a ping method and an experimental connect_test_perf method. 2359 Added a fetchhash and fetch_all methods. 2360 The func method no longer pre-clears err and errstr. 2361 Added ChopBlanks attribute (currently defaults to off, that may change). 2362 Support for the attribute needs to be implemented by individual drivers. 2363 Reworked tests into standard t/*.t form. 2364 Added more pod text. Fixed assorted bugs. 2365 2366 2367=head2 Changes in DBI 0.79, 7th Apr 1997 2368 2369 Minor release. Tidied up pod text and added some more descriptions 2370 (especially disconnect). Minor changes to DBI.xs to remove compiler 2371 warnings. 2372 2373=head2 Changes in DBI 0.78, 28th Mar 1997 2374 2375 Greatly extended the pod documentation in DBI.pm, including the under 2376 used bind_columns method. Use 'perldoc DBI' to read after installing. 2377 Fixed $h->err. Fetching an attribute value no longer resets err. 2378 Added $h->{InactiveDestroy}, see documentation for details. 2379 Improved debugging of cached ('quick') attribute fetches. 2380 errstr will return err code value if there is no string value. 2381 Added DBI/W32ODBC to the distribution. This is a pure-perl experimental 2382 DBI emulation layer for Win32::ODBC. Note that it's unsupported, your 2383 mileage will vary, and bug reports without fixes will probably be ignored. 2384 2385=head2 Changes in DBI 0.77, 21st Feb 1997 2386 2387 Removed erroneous $h->errstate and $h->errmsg methods from DBI.pm. 2388 Added $h->err, $h->errstr and $h->state default methods in DBI.xs. 2389 Updated informal DBI API notes in DBI.pm. Updated README slightly. 2390 DBIXS.h now correctly installed into INST_ARCHAUTODIR. 2391 (DBD authors will need to edit their Makefile.PL's to use 2392 -I$(INSTALLSITEARCH)/auto/DBI -I$(INSTALLSITEARCH)/DBI) 2393 2394 2395=head2 Changes in DBI 0.76, 3rd Feb 1997 2396 2397 Fixed a compiler type warnings (pedantic IRIX again). 2398 2399=head2 Changes in DBI 0.75, 27th Jan 1997 2400 2401 Fix problem introduced by a change in Perl5.003_XX. 2402 Updated README and DBI.pm docs. 2403 2404=head2 Changes in DBI 0.74, 14th Jan 1997 2405 2406 Dispatch now sets dbi_debug to the level of the current handle 2407 (this makes tracing/debugging individual handles much easier). 2408 The '>> DISPATCH' log line now only logged at debug >= 3 (was 2). 2409 The $csr->NUM_OF_FIELDS attribute can be set if not >0 already. 2410 You can log to a file using the env var PERL_DBI_DEBUG=/tmp/dbi.log. 2411 Added a type cast needed by IRIX. 2412 No longer sets perl_destruct_level unless debug set >= 4. 2413 Make compatible with PerlIO and sfio. 2414 2415=head2 Changes in DBI 0.73, 10th Oct 1996 2416 2417 Fixed some compiler type warnings (IRIX). 2418 Fixed DBI->internal->{DebugLog} = $filename. 2419 Made debug log file unbuffered. 2420 Added experimental bind_param_inout method to interface. 2421 Usage: $dbh->bind_param_inout($param, \$value, $maxlen [, \%attribs ]) 2422 (only currently used by DBD::Oracle at this time.) 2423 2424=head2 Changes in DBI 0.72, 23 Sep 1996 2425 2426 Using an undefined value as a handle now gives a better 2427 error message (mainly useful for emulators like Oraperl). 2428 $dbh->do($sql, @params) now works for binding placeholders. 2429 2430=head2 Changes in DBI 0.71, 10 July 1996 2431 2432 Removed spurious abort() from invalid handle check. 2433 Added quote method to DBI interface and added test. 2434 2435=head2 Changes in DBI 0.70, 16 June 1996 2436 2437 Added extra invalid handle check (dbih_getcom) 2438 Fixed broken $dbh->quote method. 2439 Added check for old GCC in Makefile.PL 2440 2441=head2 Changes in DBI 0.69 2442 2443 Fixed small memory leak. 2444 Clarified the behaviour of DBI->connect. 2445 $dbh->do now returns '0E0' instead of 'OK'. 2446 Fixed "Can't read $DBI::errstr, lost last handle" problem. 2447 2448 2449=head2 Changes in DBI 0.68, 2 Mar 1996 2450 2451 Changes to suit perl5.002 and site_lib directories. 2452 Detects old versions ahead of new in @INC. 2453 2454 2455=head2 Changes in DBI 0.67, 15 Feb 1996 2456 2457 Trivial change to test suite to fix a problem shown up by the 2458 Perl5.002gamma release Test::Harness. 2459 2460 2461=head2 Changes in DBI 0.66, 29 Jan 1996 2462 2463 Minor changes to bring the DBI into line with 5.002 mechanisms, 2464 specifically the xs/pm VERSION checking mechanism. 2465 No functionality changes. One no-last-handle bug fix (rare problem). 2466 Requires 5.002 (beta2 or later). 2467 2468 2469=head2 Changes in DBI 0.65, 23 Oct 1995 2470 2471 Added $DBI::state to hold SQL CLI / ODBC SQLSTATE value. 2472 SQLSTATE "00000" (success) is returned as "" (false), all else is true. 2473 If a driver does not explicitly initialise it (via $h->{State} or 2474 DBIc_STATE(imp_xxh) then $DBI::state will automatically return "" if 2475 $DBI::err is false otherwise "S1000" (general error). 2476 As always, this is a new feature and liable to change. 2477 2478 The is *no longer* a default error handler! 2479 You can add your own using push(@{$h->{Handlers}}, sub { ... }) 2480 but be aware that this interface may change (or go away). 2481 2482 The DBI now automatically clears $DBI::err, errstr and state before 2483 calling most DBI methods. Previously error conditions would persist. 2484 Added DBIh_CLEAR_ERROR(imp_xxh) macro. 2485 2486 DBI now EXPORT_OK's some utility functions, neat($value), 2487 neat_list(@values) and dump_results($sth). 2488 2489 Slightly enhanced t/min.t minimal test script in an effort to help 2490 narrow down the few stray core dumps that some porters still report. 2491 2492 Renamed readblob to blob_read (old name still works but warns). 2493 Added default blob_copy_to_file method. 2494 2495 Added $sth = $dbh->tables method. This returns an $sth for a query 2496 which has these columns: TABLE_CATALOGUE, TABLE_OWNER, TABLE_NAME, 2497 TABLE_TYPE, REMARKS in that order. The TABLE_CATALOGUE column 2498 should be ignored for now. 2499 2500 2501=head2 Changes in DBI 0.64, 23 Oct 1995 2502 2503 Fixed 'disconnect invalidates 1 associated cursor(s)' problem. 2504 Drivers using DBIc_ACTIVE_on/off() macros should not need any changes 2505 other than to test for DBIc_ACTIVE_KIDS() instead of DBIc_KIDS(). 2506 Fixed possible core dump in dbih_clearcom during global destruction. 2507 2508 2509=head2 Changes in DBI 0.63, 1 Sep 1995 2510 2511 Minor update. Fixed uninitialised memory bug in method 2512 attribute handling and streamlined processing and debugging. 2513 Revised usage definitions for bind_* methods and readblob. 2514 2515 2516=head2 Changes in DBI 0.62, 26 Aug 1995 2517 2518 Added method redirection method $h->func(..., $method_name). 2519 This is now the official way to call private driver methods 2520 that are not part of the DBI standard. E.g.: 2521 @ary = $sth->func('ora_types'); 2522 It can also be used to call existing methods. Has very low cost. 2523 2524 $sth->bind_col columns now start from 1 (not 0) to match SQL. 2525 $sth->bind_columns now takes a leading attribute parameter (or undef), 2526 e.g., $sth->bind_columns($attribs, \$col1 [, \$col2 , ...]); 2527 2528 Added handy DBD_ATTRIBS_CHECK macro to vet attribs in XS. 2529 Added handy DBD_ATTRIB_GET_SVP, DBD_ATTRIB_GET_BOOL and 2530 DBD_ATTRIB_GET_IV macros for handling attributes. 2531 2532 Fixed STORE for NUM_OF_FIELDS and NUM_OF_PARAMS. 2533 Added FETCH for NUM_OF_FIELDS and NUM_OF_PARAMS. 2534 2535 Dispatch no longer bothers to call _untie(). 2536 Faster startup via install_method/_add_dispatch changes. 2537 2538 2539=head2 Changes in DBI 0.61, 22 Aug 1995 2540 2541 Added $sth->bind_col($column, \$var [, \%attribs ]); 2542 2543 This method enables perl variable to be directly and automatically 2544 updated when a row is fetched. It requires no driver support 2545 (if the driver has been written to use DBIS->get_fbav). 2546 Currently \%attribs is unused. 2547 2548 Added $sth->bind_columns(\$var [, \$var , ...]); 2549 2550 This method is a short-cut for bind_col which binds all the 2551 columns of a query in one go (with no attributes). It also 2552 requires no driver support. 2553 2554 Added $sth->bind_param($parameter, $var [, \%attribs ]); 2555 2556 This method enables attributes to be specified when values are 2557 bound to placeholders. It also enables binding to occur away 2558 from the execute method to improve execute efficiency. 2559 The DBI does not provide a default implementation of this. 2560 See the DBD::Oracle module for a detailed example. 2561 2562 The DBI now provides default implementations of both fetch and 2563 fetchrow. Each is written in terms of the other. A driver is 2564 expected to implement at least one of them. 2565 2566 More macro and assorted structure changes in DBDXS.h. Sorry! 2567 The old dbihcom definitions have gone. All fields have macros. 2568 The imp_xxh_t type is now used within the DBI as well as drivers. 2569 Drivers must set DBIc_NUM_FIELDS(imp_sth) and DBIc_NUM_PARAMS(imp_sth). 2570 2571 test.pl includes a trivial test of bind_param and bind_columns. 2572 2573 2574=head2 Changes in DBI 0.60, 17 Aug 1995 2575 2576 This release has significant code changes but much less 2577 dramatic than the previous release. The new implementors data 2578 handling mechanism has matured significantly (don't be put off 2579 by all the struct typedefs in DBIXS.h, there's just to make it 2580 easier for drivers while keeping things type-safe). 2581 2582 The DBI now includes two new methods: 2583 2584 do $dbh->do($statement) 2585 2586 This method prepares, executes and finishes a statement. It is 2587 designed to be used for executing one-off non-select statements 2588 where there is no benefit in reusing a prepared statement handle. 2589 2590 fetch $array_ref = $sth->fetch; 2591 2592 This method is the new 'lowest-level' row fetching method. The 2593 previous @row = $sth->fetchrow method now defaults to calling 2594 the fetch method and expanding the returned array reference. 2595 2596 The DBI now provides fallback attribute FETCH and STORE functions 2597 which drivers should call if they don't recognise an attribute. 2598 2599 THIS RELEASE IS A GOOD STARTING POINT FOR DRIVER DEVELOPERS! 2600 Study DBIXS.h from the DBI and Oracle.xs etc from DBD::Oracle. 2601 There will be further changes in the interface but nothing 2602 as dramatic as these last two releases! (I hope :-) 2603 2604 2605=head2 Changes in DBI 0.59 15 Aug 1995 2606 2607 NOTE: THIS IS AN UNSTABLE RELEASE! 2608 2609 Major reworking of internal data management! 2610 Performance improvements and memory leaks fixed. 2611 Added a new NullP (empty) driver and a -m flag 2612 to test.pl to help check for memory leaks. 2613 Study DBD::Oracle version 0.21 for more details. 2614 (Comparing parts of v0.21 with v0.20 may be useful.) 2615 2616 2617=head2 Changes in DBI 0.58 21 June 1995 2618 2619 Added DBI->internal->{DebugLog} = $filename; 2620 Reworked internal logging. 2621 Added $VERSION. 2622 Made disconnect_all a compulsory method for drivers. 2623 2624 2625=head1 ANCIENT HISTORY 2626 262712th Oct 1994: First public release of the DBI module. 2628 (for Perl 5.000-beta-3h) 2629 263019th Sep 1994: DBperl project renamed to DBI. 2631 263229th Sep 1992: DBperl project started. 2633 2634=cut 2635