Skip Menu |
 

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

Report information
The Basics
Id: 115465
Status: resolved
Priority: 0/
Queue: DBD-SQLite

People
Owner: Nobody in particular
Requestors: ilmari [...] ilmari.org
Cc:
AdminCc:

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



Subject: column_info doesn't parse sizes with spaces
Date: Sun, 19 Jun 2016 22:10:26 +0100
To: bug-DBD-SQLite [...] rt.cpan.org
From: ilmari [...] ilmari.org (Dagfinn Ilmari Mannsåker)
Download (untitled) / with headers
text/plain 1.2k
Column type specifications like 'varchar( 10 )' or 'decimal(5, 3)' don't get parsed correctly into the size and decimal digits fields: Show quoted text
0> my $dbh = DBI->connect('dbi:SQLite:')
$res[0] = bless( {}, 'DBI::db' ) Show quoted text
1> $dbh->do('create table test ( foo varchar(10), bar varchar( 15 ), baz decimal(3,3), bat decimal(4, 4))')
$res[1] = '0E0' Show quoted text
2> +{ map +($_->{COLUMN_NAME} => { $_->%{qw(TYPE_NAME COLUMN_SIZE DECIMAL_DIGITS)} }), $dbh->column_info(undef, undef, 'test', '%')->fetchall_arrayref({})->@* }
$res[2] = { 'bar' => { 'COLUMN_SIZE' => undef, 'DECIMAL_DIGITS' => undef, 'TYPE_NAME' => 'varchar( 15 )' }, 'bat' => { 'COLUMN_SIZE' => undef, 'DECIMAL_DIGITS' => undef, 'TYPE_NAME' => 'decimal(4, 4)' }, 'baz' => { 'COLUMN_SIZE' => '3', 'DECIMAL_DIGITS' => '3', 'TYPE_NAME' => 'decimal' }, 'foo' => { 'COLUMN_SIZE' => '10', 'DECIMAL_DIGITS' => undef, 'TYPE_NAME' => 'varchar' } } -- "The surreality of the universe tends towards a maximum" -- Skud's Law "Never formulate a law or axiom that you're not prepared to live with the consequences of." -- Skud's Meta-Law
Download (untitled) / with headers
text/plain 1.3k
On Mon Jun 20 06:10:44 2016, ilmari@ilmari.org wrote: Show quoted text
> > Column type specifications like 'varchar( 10 )' or 'decimal(5, 3)' > don't > get parsed correctly into the size and decimal digits fields: >
> 0> my $dbh = DBI->connect('dbi:SQLite:')
> $res[0] = bless( {}, 'DBI::db' ) >
> 1> $dbh->do('create table test ( foo varchar(10), bar varchar( 15 ), > 1> baz decimal(3,3), bat decimal(4, 4))')
> $res[1] = '0E0' >
> 2> +{ map +($_->{COLUMN_NAME} => { $_->%{qw(TYPE_NAME COLUMN_SIZE > 2> DECIMAL_DIGITS)} }), $dbh->column_info(undef, undef, 'test', '%')-
> 2> >fetchall_arrayref({})->@* }
> $res[2] = { > 'bar' => { > 'COLUMN_SIZE' => undef, > 'DECIMAL_DIGITS' => undef, > 'TYPE_NAME' => 'varchar( 15 )' > }, > 'bat' => { > 'COLUMN_SIZE' => undef, > 'DECIMAL_DIGITS' => undef, > 'TYPE_NAME' => 'decimal(4, 4)' > }, > 'baz' => { > 'COLUMN_SIZE' => '3', > 'DECIMAL_DIGITS' => '3', > 'TYPE_NAME' => 'decimal' > }, > 'foo' => { > 'COLUMN_SIZE' => '10', > 'DECIMAL_DIGITS' => undef, > 'TYPE_NAME' => 'varchar' > } > }
Thanks. Fixed and shipped 1.51_05. https://github.com/DBD-SQLite/DBD-SQLite/commit/25321bfda15e0f0996fa9b202d5243918f620786
Closed as 1.52 is out. Thanks.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.