Bug#314232: marked as done (libdbd-sqlite3-perl: bind variables
change from text to integer)
Debian Bug Tracking System
owner at bugs.debian.org
Thu Jul 28 08:35:10 UTC 2005
Your message dated Thu, 28 Jul 2005 01:18:32 -0700
with message-id <E1Dy3b6-0006DC-00 at spohr.debian.org>
and subject line Bug#314232: fixed in libdbd-sqlite3-perl 1.09-1
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--------------------------------------
Received: (at submit) by bugs.debian.org; 15 Jun 2005 10:06:23 +0000
>From jhnc%stone at newton.cam.ac.uk Wed Jun 15 03:06:23 2005
Return-path: <jhnc%stone at newton.cam.ac.uk>
Received: from edge.newton.cam.ac.uk [131.111.145.141]
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1DiUms-0003Sc-00; Wed, 15 Jun 2005 03:06:22 -0700
Received: from stone.newton.cam.ac.uk (stone.newton.cam.ac.uk [131.111.145.119])
by edge.newton.cam.ac.uk (8.12.10/8.12.10) with ESMTP id j5FA6LrY009187;
Wed, 15 Jun 2005 11:06:21 +0100 (BST)
Received: from stone.newton.cam.ac.uk (localhost [127.0.0.1])
by stone.newton.cam.ac.uk (8.12.11/8.12.11/Debian-3) with ESMTP id j5FA6Krm028881;
Wed, 15 Jun 2005 11:06:20 +0100
Received: (from jhnc at localhost)
by stone.newton.cam.ac.uk (8.12.11/8.12.11/Debian-3) id j5FA6KJr028879;
Wed, 15 Jun 2005 11:06:20 +0100
Date: Wed, 15 Jun 2005 11:06:20 +0100
From: Jonathan H N Chin <jc254%stone at newton.cam.ac.uk>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: libdbd-sqlite3-perl: bind variables change from text to integer
Message-ID: <20050615100620.GA28871 at stone.newton.cam.ac.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Mailer: reportbug 3.12
User-Agent: Mutt/1.5.4i
Delivered-To: submit at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE
autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level:
Package: libdbd-sqlite3-perl
Version: 1.08-1
Severity: important
[ I have marked this as important.
However it caused me data loss, so perhaps it should be grave. ]
I have textual data that may look like integers.
On insertion, any leading "0" will vanish.
For example:
sqlite3 test 'create table t ( k text unique, v text );'
perl -e 'use DBI;
$db = DBI->connect( "dbi:SQLite:dbname=test" );
$db->do( qq[REPLACE INTO t VALUES(?,?);],
undef, "key", "0325763213" );'
sqlite3 test 'select * from t;'
gives:
key|325763213
When I asked about this problem on the sqlite-users mailing list,
the responses I got indicated:
1. sqlite doesn't do the conversion, so presumably it is something
in one of the Perl modules.
http://www.mail-archive.com/sqlite-users%40sqlite.org/msg08557.html
2. This doesn't appear to be the behaviour on Windows:
http://www.mail-archive.com/sqlite-users%40sqlite.org/msg08558.html
3. It is suggested that the problem is in DBI or DBD::SQLite,
possibly to do with lack of the use of a "prepared statement feature":
http://www.mail-archive.com/sqlite-users%40sqlite.org/msg08560.html
I have tried going through the Perl modules but don't know enough
to attempt any kind of fix. However the place where the conversion
happens is the test for looks_like_number in dbdimp.c.
What would break if that test were removed?
The comment mentions sorting.
A more generic solution might be to extend the DBI do() syntax to
take bind_type as well as bind_values. Another might be to provide
a mechanism to override the automatic conversion to integer of bind
values that look like integers.
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.4.27-c800-1
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages libdbd-sqlite3-perl depends on:
hi libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
hi libdbi-perl 1.48-1 Perl5 database interface by Tim Bu
hi perl 5.8.7-3 Larry Wall's Practical Extraction
hi perl-base [perlapi-5.8.4] 5.8.7-3 The Pathologically Eclectic Rubbis
-- no debconf information
---------------------------------------
Received: (at 314232-close) by bugs.debian.org; 28 Jul 2005 08:33:44 +0000
>From katie at spohr.debian.org Thu Jul 28 01:33:44 2005
Return-path: <katie at spohr.debian.org>
Received: from katie by spohr.debian.org with local (Exim 3.36 1 (Debian))
id 1Dy3b6-0006DC-00; Thu, 28 Jul 2005 01:18:32 -0700
From: mmagallo at debian.org (Marcelo E. Magallon)
To: 314232-close at bugs.debian.org
X-Katie: $Revision: 1.56 $
Subject: Bug#314232: fixed in libdbd-sqlite3-perl 1.09-1
Message-Id: <E1Dy3b6-0006DC-00 at spohr.debian.org>
Sender: Archive Administrator <katie at spohr.debian.org>
Date: Thu, 28 Jul 2005 01:18:32 -0700
Delivered-To: 314232-close at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level:
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER
autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 2
Source: libdbd-sqlite3-perl
Source-Version: 1.09-1
We believe that the bug you reported is fixed in the latest version of
libdbd-sqlite3-perl, which is due to be installed in the Debian FTP archive:
libdbd-sqlite3-perl_1.09-1.diff.gz
to pool/main/libd/libdbd-sqlite3-perl/libdbd-sqlite3-perl_1.09-1.diff.gz
libdbd-sqlite3-perl_1.09-1.dsc
to pool/main/libd/libdbd-sqlite3-perl/libdbd-sqlite3-perl_1.09-1.dsc
libdbd-sqlite3-perl_1.09-1_i386.deb
to pool/main/libd/libdbd-sqlite3-perl/libdbd-sqlite3-perl_1.09-1_i386.deb
libdbd-sqlite3-perl_1.09.orig.tar.gz
to pool/main/libd/libdbd-sqlite3-perl/libdbd-sqlite3-perl_1.09.orig.tar.gz
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 314232 at bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Marcelo E. Magallon <mmagallo at debian.org> (supplier of updated libdbd-sqlite3-perl package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster at debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Mon, 25 Jul 2005 09:12:39 -0600
Source: libdbd-sqlite3-perl
Binary: libdbd-sqlite3-perl
Architecture: source i386
Version: 1.09-1
Distribution: unstable
Urgency: low
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Changed-By: Marcelo E. Magallon <mmagallo at debian.org>
Description:
libdbd-sqlite3-perl - Perl DBI driver with a self-contained RDBMS
Closes: 302861 314232
Changes:
libdbd-sqlite3-perl (1.09-1) unstable; urgency=low
.
* New upstream.
+ fixes the "don't convert to number if it isn't a number" bug.
(Sorry about the delay Jonathan) (closes: bug#314232)
* debian/control: add build dependency on libsqlite3-dev.
* debian/rules: don't use the SQLite sources shipped with the package, link
against system's sqlite3. (closes: bug#302861)
* Makefile.PL, debian/control: hack arround bug in libsqlite3-dev, the
proper version _is_ installed, disable check in Makefile.PL.
* debian/control: Standards-Version: 3.6.2, noop.
Files:
3bb125f4ec613a5228f0ca6d0d1f8775 1100 perl optional libdbd-sqlite3-perl_1.09-1.dsc
02cde1aba9cc2d8474666d8258d8256d 474797 perl optional libdbd-sqlite3-perl_1.09.orig.tar.gz
fce7411d439c8a57763e1ac6dcc3b846 4249 perl optional libdbd-sqlite3-perl_1.09-1.diff.gz
c4fdaa5c4f98063f99352457a9e806aa 46870 perl optional libdbd-sqlite3-perl_1.09-1_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iQEcBAEBAgAGBQJC5Q2IAAoJEHGYqCCEBNUAVi4IAIPQqMnNAkMqFcSFn5EsT8An
0x294b8Lh2zPuJrOYoUCDzoH/r8yOdq4MjACNj6by/srQkHYA8jY8NLAucSxB2Ff
ncBEt4PE+jgX4/6HOvT7hgRtsk3v4WZnG6T1cYxyZGEClK/gl8JbWlyQcxV2zT3/
QxH1/4FH+1GinLe00MjJHHh3QjhkAW50blZXagcg+xes5w4ZSRul67QFWWtjceW1
Zn/tCt2hSe0aNP0rXTMOOSyG0Nn56/eNJYwZmwjio3wrI/AHgGtNR0db0eKPtG+q
K3YOCkk0eZKTqVabLhenhLa3WLElxtVytqHKB75MaiZKA064M/0B8McxP9QZXB8=
=nGpB
-----END PGP SIGNATURE-----
More information about the pkg-perl-maintainers
mailing list