Debian Bug report logs - #434067
libodbc-ruby1.8: Query execution generates random values in queries for SMALLINT values on MySQL

version graph

Package: libmyodbc; Maintainer for libmyodbc is Steve Langasek <vorlon@debian.org>; Source for libmyodbc is src:myodbc.

Reported by: Enrico Zini <enrico@enricozini.org>

Date: Sat, 21 Jul 2007 09:54:03 UTC

Severity: important

Found in version myodbc/3.51.11-6.1

Fixed in version 3.51.15r409-1

Done: Steve Langasek <vorlon@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Daigo Moriwaki <daigo@debian.org>:
Bug#434067; Package libodbc-ruby1.8. Full text and rfc822 format available.

Acknowledgement sent to Enrico Zini <enrico@enricozini.org>:
New Bug report received and forwarded. Copy sent to Daigo Moriwaki <daigo@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Enrico Zini <enrico@enricozini.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libodbc-ruby1.8: Query execution generates random values in queries for SMALLINT values on MySQL
Date: Sat, 21 Jul 2007 11:51:59 +0200
Package: libodbc-ruby1.8
Version: 0.9993-1
Severity: important

Hello,

thank you for maintaining libodbc-ruby1.8.

I wanted to deploy some code of mine on an etch system and it failed
miserably.  I've managed to reliably reproduce the problem on my amd64
server with the following script:

#!/usr/bin/ruby

require 'odbc'
require 'csv'

$dsn = ARGV.shift
$uid = ARGV.shift
$pwd = ARGV.shift

@conn = ODBC.connect($dsn, $uid, $pwd)

begin
	@conn.do("DROP TABLE test")
rescue
	# Ignore errors on DROP TABLE
end
@conn.do("CREATE TABLE test ( id SMALLINT PRIMARY KEY );")

begin
	newtest = @conn.proc("INSERT INTO test (id) VALUES (?)") { |stmt| stmt.nrows }

	newtest.call(1)
	newtest.call(2)
	newtest.call(3)

	select = @conn.prepare("SELECT id FROM test")
	select.execute.each { |row| puts row }
ensure
	newtest.statement.drop
end

If I enable logging in MySQL, these are the queries that I get:

    DROP TABLE test
    CREATE TABLE test ( id SMALLINT PRIMARY KEY )
    INSERT INTO test (id) VALUES ('7734156594425888769')
    INSERT INTO test (id) VALUES ('2')
    INSERT INTO test (id) VALUES ('651089476973494275')


Best regards,

Enrico

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-amd64
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)

Versions of packages libodbc-ruby1.8 depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libiodbc2                   3.52.4-5     iODBC Driver Manager
ii  libruby1.8                  1.8.5-4      Libraries necessary to run Ruby 1.

libodbc-ruby1.8 recommends no packages.

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#434067; Package libodbc-ruby1.8. Full text and rfc822 format available.

Acknowledgement sent to Daigo Moriwaki <daigo@debian.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #10 received at 434067@bugs.debian.org (full text, mbox):

From: Daigo Moriwaki <daigo@debian.org>
To: 434067@bugs.debian.org
Subject: Re: Bug#434067: libodbc-ruby1.8: Query execution generates random values in queries for SMALLINT values on MySQL
Date: Sat, 25 Aug 2007 13:08:40 +0900
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Enrico,

Sorry for the late reply.

With libmyodbc 3.51.11-6.1 (etch) and MySQL 5.0.45-Debian_1-log (testing) on my
box (amd64, 64 bits), the inserting '1' became '32767'. While, there was no
problem with libmyodbc 3.51.15r409-1+b1 (testing). They were tested with both
libodbc-ruby1.8 0.9993 (etch) and 0.9995 (testing).

It seems to be an issue of libmyodbc as you reported[1].
Taking a look at the upstream's changelog, some 64-bit issues were fixed at
3.51.14. Probably, this:
  * Connector/ODBC may insert the wrong parameter values when using prepared
    statements under 64-bit Linux. (Bug #22446)

So, I'd like to forward this report to libmyodbc.


[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=415401


Thanks,
Daigo

- --
Daigo Moriwaki
daigo at debian dot org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGz6tINcPj+ukc0lARAkDfAJ9iTFHFh5nsLJAzD/krF2JmUC8RQwCgwrD5
gR38GGneuSKYjNDT10IsGB8=
=CNzU
-----END PGP SIGNATURE-----



Bug reassigned from package `libodbc-ruby1.8' to `libmyodbc'. Request was from "Daigo Moriwaki" <daigo@sgtpepper.net> to control@bugs.debian.org. (Sat, 25 Aug 2007 04:18:01 GMT) Full text and rfc822 format available.

Reply sent to Steve Langasek <vorlon@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Enrico Zini <enrico@enricozini.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #17 received at 434067-done@bugs.debian.org (full text, mbox):

From: Steve Langasek <vorlon@debian.org>
To: 434067-done@bugs.debian.org
Cc: Daigo Moriwaki <daigo@sgtpepper.net>, Daigo Moriwaki <daigo@debian.org>
Subject: Re: Processed: reassign 434067 to libmyodbc
Date: Fri, 24 Aug 2007 23:53:10 -0700
Version: 3.51.15r409-1

> With libmyodbc 3.51.11-6.1 (etch) and MySQL 5.0.45-Debian_1-log (testing)
> on my box (amd64, 64 bits), the inserting '1' became '32767'. While, there
> was no problem with libmyodbc 3.51.15r409-1+b1 (testing). They were tested
> with both libodbc-ruby1.8 0.9993 (etch) and 0.9995 (testing).

> It seems to be an issue of libmyodbc as you reported[1].
> Taking a look at the upstream's changelog, some 64-bit issues were fixed
> at 3.51.14. Probably, this:
>  * Connector/ODBC may insert the wrong parameter values when using prepared
>     statements under 64-bit Linux. (Bug #22446)

Well, if this is a libmyodbc bug (which I'm not sure of, libodbc-ruby is
the only place that the bug manifests in my tests), then it's fixed in the
current version in testing.  So closing the report...

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon@debian.org                                   http://www.debian.org/



Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 22 Sep 2007 07:29:00 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 13:25:29 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.