Skip Menu |

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 46109
Status: resolved
Priority: 0/
Queue: DBD-Pg

People
Owner: greg [...] turnstep.com
Requestors: h.m.brand [...] xs4all.nl
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: 2.14.0



Subject: local $dbh->{FetchHashKeyName} = "NAME_uc" will assert
--8<--- test.pl use strict; use warnings; use DBI; use Data::Peek; my $dbh = DBI->connect ($ENV{DBI_DSN}, undef, undef, { AutoCommit => 0, ChopBlanks => 1, FetchHashKeyName => "NAME_lc", PrintError => 1, RaiseError => 1, ShowErrorStatement => 1, # dbd_verbose => 9, }) or die $DBI::errstr; my $sch = "public"; my $tbl = "test$$"; $dbh->do ("create table B$tbl (c_test integer primary key, test varchar (4))"); $dbh->do ("insert into B$tbl values (1, 'test')"); $dbh->do ("create table $tbl (c_test integer)"); $dbh->do ("alter table $tbl add constraint ". "L$tbl foreign key (c_test) references ". "B$tbl (c_test)"); $dbh->do ("insert into $tbl values (1)"); { local $dbh->{FetchHashKeyName} = "NAME_uc"; my $stl = $dbh->foreign_key_info ( undef, undef, undef, undef, $sch, $tbl) or die; $stl->execute; DDumper ($stl->fetchrow_hashref); } $dbh->do ("drop table $tbl"); $dbh->do ("drop table B$tbl"); -->8--- $ perl test.pl NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "btest11765_pkey" for table "btest11765" Use of uninitialized value in string eq at /pro/lib/perl5/ site_perl/5.8.8/x86_64-linux/DBD/Pg.pm line 948. Use of uninitialized value in string eq at /pro/lib/perl5/ site_perl/5.8.8/x86_64-linux/DBD/Pg.pm line 948. Assertion i == (((((SV *) (name_av))->sv_flags & 0x00008000)) ? Perl_mg_size((SV *) name_av) : ((XPVAV*) (name_av)->sv_any)- Show quoted text
>xav_fill)+1 failed: file "DBI.xs", line 2001 at /pro/lib/perl5/
site_perl/5.8.8/x86_64-linux/DBI.pm line 2001. Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at /pro/lib/perl5/site_perl/5.8.8/x86_64-linux/DBI.pm line 2001. Together with bug #46103, this means there is no way to write code that will always work.
This should be fixed with revision 12779.