@@ -11,7 +11,7 @@ package DBI;
11
11
require 5.008_001;
12
12
13
13
BEGIN {
14
- our $XS_VERSION = our $VERSION = " 1.631 " ; # ==> ALSO update the version in the pod text below!
14
+ our $XS_VERSION = our $VERSION = " 1.633 " ; # ==> ALSO update the version in the pod text below!
15
15
$VERSION = eval $VERSION ;
16
16
}
17
17
@@ -144,7 +144,7 @@ sure that your issue isn't related to the driver you're using.
144
144
145
145
=head2 NOTES
146
146
147
- This is the DBI specification that corresponds to DBI version 1.631
147
+ This is the DBI specification that corresponds to DBI version 1.633
148
148
(see L<DBI::Changes> for details).
149
149
150
150
The DBI is evolving at a steady pace, so it's good to check that
@@ -328,6 +328,7 @@ sub DBI::var::STORE { Carp::croak("Can't modify \$DBI::${$_[0]} special varia
328
328
329
329
my $dbd_prefix_registry = {
330
330
ad_ => { class => ' DBD::AnyData' , },
331
+ ad2_ => { class => ' DBD::AnyData2' , },
331
332
ado_ => { class => ' DBD::ADO' , },
332
333
amzn_ => { class => ' DBD::Amazon' , },
333
334
best_ => { class => ' DBD::BestWins' , },
@@ -350,6 +351,7 @@ my $dbd_prefix_registry = {
350
351
msql_ => { class => ' DBD::mSQL' , },
351
352
mvsftp_ => { class => ' DBD::MVS_FTPSQL' , },
352
353
mysql_ => { class => ' DBD::mysql' , },
354
+ multi_ => { class => ' DBD::Multi' },
353
355
mx_ => { class => ' DBD::Multiplex' , },
354
356
neo_ => { class => ' DBD::Neo4p' , },
355
357
nullp_ => { class => ' DBD::NullP' , },
@@ -411,6 +413,7 @@ my $keeperr = { O=>0x0004 };
411
413
' FIRSTKEY' => $keeperr ,
412
414
' NEXTKEY' => $keeperr ,
413
415
' STORE' => { O => 0x0418 | 0x4 },
416
+ ' DELETE' => { O => 0x0404 },
414
417
can => { O => 0x0100 }, # special case, see dispatch
415
418
debug => { U => [1,2,' [$debug_level]' ], O => 0x0004 }, # old name for trace
416
419
dump_handle => { U => [1,3,' [$message [, $level]]' ], O => 0x0004 },
@@ -1388,7 +1391,7 @@ sub _new_sth { # called by DBD::<drivername>::db::prepare)
1388
1391
unless $class =~ / ^DBD::(\w +)::(dr|db|st)$ / ;
1389
1392
my ($driver , $subtype ) = ($1 , $2 );
1390
1393
Carp::croak(" invalid method name '$method '" )
1391
- unless $method =~ m / ^([a-z]+ _)\w +$ / ;
1394
+ unless $method =~ m / ^([a-z][a-z0-9]* _)\w +$ / ;
1392
1395
my $prefix = $1 ;
1393
1396
my $reg_info = $dbd_prefix_registry -> {$prefix };
1394
1397
Carp::carp(" method name prefix '$prefix ' is not associated with a registered driver" ) unless $reg_info ;
@@ -1635,9 +1638,9 @@ sub _new_sth { # called by DBD::<drivername>::db::prepare)
1635
1638
sub _do_selectrow {
1636
1639
my ($method , $dbh , $stmt , $attr , @bind ) = @_ ;
1637
1640
my $sth = ((ref $stmt ) ? $stmt : $dbh -> prepare($stmt , $attr ))
1638
- or return ;
1641
+ or return undef ;
1639
1642
$sth -> execute(@bind )
1640
- or return ;
1643
+ or return undef ;
1641
1644
my $row = $sth -> $method ()
1642
1645
and $sth -> finish;
1643
1646
return $row ;
@@ -2417,6 +2420,11 @@ If the C<:>I<N> form of placeholder is supported by the driver you're using,
2417
2420
then you should be able to use either L</bind_param> or L</execute> to bind
2418
2421
values. Check your driver documentation.
2419
2422
2423
+ Some drivers allow you to prevent the recognition of a placeholder by placing a
2424
+ single backslash character (C<\ > ) immediately before it. The driver will remove
2425
+ the backslash character and ignore the placeholder, passing it unchanged to the
2426
+ backend. If the driver supports this then L</get_info> (9000) will return true.
2427
+
2420
2428
With most drivers, placeholders can't be used for any element of a
2421
2429
statement that would prevent the database server from validating the
2422
2430
statement and creating a query execution plan for it. For example:
@@ -3689,8 +3697,8 @@ the destruction of inherited handles cause the corresponding handles in the
3689
3697
parent process to cease working.
3690
3698
3691
3699
Either the parent or the child process, but not both, should set
3692
- C<InactiveDestroy > true on all their shared handles. Alternatively the
3693
- L</AutoInactiveDestroy> can be set in the parent on connect.
3700
+ C<InactiveDestroy > true on all their shared handles. Alternatively, and
3701
+ preferably, the L</AutoInactiveDestroy> can be set in the parent on connect.
3694
3702
3695
3703
To help tracing applications using fork the process id is shown in
3696
3704
the trace log whenever a DBI or handle trace() method is called.
@@ -3703,12 +3711,15 @@ from the DBI's method dispatcher, e.g. >= 9.
3703
3711
Type: boolean, inherited
3704
3712
3705
3713
The L</InactiveDestroy> attribute, described above, needs to be explicitly set
3706
- in the child process after a fork(). This is a problem if the code that performs
3707
- the fork() is not under your control, perhaps in a third-party module.
3708
- Use C<AutoInactiveDestroy > to get around this situation.
3714
+ in the child process after a fork(), on every active database and statement handle.
3715
+ This is a problem if the code that performs the fork() is not under your
3716
+ control, perhaps in a third-party module. Use C<AutoInactiveDestroy > to get
3717
+ around this situation.
3709
3718
3710
3719
If set true, the DESTROY method will check the process id of the handle and, if
3711
3720
different from the current process id, it will set the I<InactiveDestroy > attribute.
3721
+ It is strongly recommended that C<AutoInactiveDestroy > is enabled on all new code
3722
+ (it's only not enabled by default to avoid backwards compatibility problems).
3712
3723
3713
3724
This is the example it's designed to deal with:
3714
3725
@@ -4963,6 +4974,13 @@ of information types to ensure the DBI itself works properly:
4963
4974
41 SQL_CATALOG_NAME_SEPARATOR '.' '@'
4964
4975
114 SQL_CATALOG_LOCATION 1 2
4965
4976
4977
+ Values from 9000 to 9999 for get_info are officially reserved for use by Perl DBI.
4978
+ Values in that range which have been assigned a meaning are defined here:
4979
+
4980
+ C<9000 > : true if a backslash character (C<\ > ) before placeholder-like text
4981
+ (e.g. C<? > , C<:foo > ) will prevent it being treated as a placeholder by the driver.
4982
+ The backslash will be removed before the text is passed to the backend.
4983
+
4966
4984
=head3 C<table_info >
4967
4985
4968
4986
$sth = $dbh->table_info( $catalog, $schema, $table, $type );
@@ -7078,7 +7096,7 @@ For example:
7078
7096
my $sth2 = $dbh->prepare( $sth1->{Statement} );
7079
7097
my $ParamValues = $sth1->{ParamValues} || {};
7080
7098
my $ParamTypes = $sth1->{ParamTypes} || {};
7081
- $sth2->bind_param($_, $ParamValues->{$_} $ParamTypes->{$_})
7099
+ $sth2->bind_param($_, $ParamValues->{$_}, $ParamTypes->{$_})
7082
7100
for keys %{ {%$ParamValues, %$ParamTypes} };
7083
7101
$sth2->execute();
7084
7102
0 commit comments