Bug#919006: FTBFS: test failure with new DBD::SQLite
Niko Tyni
ntyni at debian.org
Mon Jan 21 19:28:43 GMT 2019
Control: tag -1 patch
On Fri, Jan 11, 2019 at 05:37:52PM +0100, gregor herrmann wrote:
> Source: libclass-dbi-plugin-type-perl
> Version: 0.02-8
> Severity: serious
> Tags: upstream buster sid ftbfs
> Justification: fails to build from source
> Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=128135
> ok 1 - use Class::DBI::Plugin::Type;
> not ok 2 - notes is text
> # Failed test 'notes is text'
> # at t/1.t line 28.
> # undef
> # doesn't match '(?^:text|blob)'
>From Class::DBI::Plugin::Type::import() :
@hash{@{$sth->{NAME}}} =
map {
my $info = scalar $self->db_Main->type_info($_);
if ($info) { $info->{TYPE_NAME} }
else { $_ } # Typeless databases (SQLite)
}
@{$sth->{TYPE}};
Looks like type_info() now returns more than it used to: with the older
libdbd-sqlite3-perl it gave just 'undef', but now it gives (somewhat
unhelpful)
$VAR1 = {
'CASE_SENSITIVE' => undef,
'MAXIMUM_SCALE' => undef,
'NUM_PREC_RADIX' => undef,
'MINIMUM_SCALE' => undef,
'SQL_DATETIME_SUB' => undef,
'NULLABLE' => undef,
'LOCAL_TYPE_NAME' => undef,
'LITERAL_PREFIX' => undef,
'INTERVAL_PRECISION' => undef,
'TYPE_NAME' => undef,
'DATA_TYPE' => 0,
'FIXED_PREC_SCALE' => undef,
'AUTO_UNIQUE_VALUE' => undef,
'SEARCHABLE' => undef,
'UNSIGNED_ATTRIBUTE' => undef,
'CREATE_PARAMS' => undef,
'COLUMN_SIZE' => undef,
'LITERAL_SUFFIX' => undef,
'SQL_DATA_TYPE' => undef
};
I'm not sure how intentional this is, but it seems to have changed
in DBD-SQLite 1.61_02 as noted in the upstream bug.
https://metacpan.org/diff/file?target=ISHIGAKI/DBD-SQLite-1.61_02/&source=ISHIGAKI/DBD-SQLite-1.61_01/
Checking that the value is defined seems to fix / work around this,
as seen in the attached patch. I'm not totally sure that this
won't break things on other DBD implementations though.
--
Niko Tyni ntyni at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-compatibility-with-DBD-SQLite-1.61_02.patch
Type: text/x-diff
Size: 1088 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20190121/6752b4b3/attachment.patch>
More information about the pkg-perl-maintainers
mailing list