Your message dated Mon, 21 Mar 2005 23:30:25 +0100
with message-id <[EMAIL PROTECTED]>
has caused the Debian Bug report #300324,
regarding python-mysqldb: Python True is mysql false when inserting
to be marked as having been forwarded to the upstream software
author(s) Andy Dustman <[EMAIL PROTECTED]>.

(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 300324-forwarded) by bugs.debian.org; 21 Mar 2005 22:30:37 +0000
>From [EMAIL PROTECTED] Mon Mar 21 14:30:36 2005
Return-path: <[EMAIL PROTECTED]>
Received: from ns1.kidns.de (diana50.kidns.de) [62.75.128.97] (Debian-exim)
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1DDVPw-00068t-00; Mon, 21 Mar 2005 14:30:36 -0800
Received: from p54b19c24.dip0.t-ipconnect.de
        ([84.177.156.36] helo=resivo.mejo.net ident=Debian-exim)
        by diana50.kidns.de with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA:32)
        (Exim 4.44)
        id 1DDVPe-00087G-UG; Mon, 21 Mar 2005 23:30:22 +0100
Received: from jonas by resivo.mejo.net with local (Exim 4.50)
        id 1DDVPl-00076o-49; Mon, 21 Mar 2005 23:30:25 +0100
Date: Mon, 21 Mar 2005 23:30:25 +0100
From: Jonas Meurer <[EMAIL PROTECTED]>
To: Andy Dustman <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED], Tim Freeman <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040907i
X-SA-Exim-Connect-IP: 84.177.156.36
X-SA-Exim-Mail-From: [EMAIL PROTECTED]
Subject: [EMAIL PROTECTED]: Bug#300324: python-mysqldb: Python True is mysql 
false when inserting]
X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100)
X-SA-Exim-Scanned: Yes (on diana50.kidns.de)
Delivered-To: [EMAIL PROTECTED]
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=-11.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER,
        HAS_PACKAGE autolearn=ham version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

here's the bug again, to tag it 'forwarded to upstream' in debian bts.

bye
 jonas

----- Forwarded message from Tim Freeman <[EMAIL PROTECTED]> -----

Date: Fri, 18 Mar 2005 15:53:12 -0700
From: Tim Freeman <[EMAIL PROTECTED]>
From-Tims-Fingers: true
Subject: Bug#300324: python-mysqldb: Python True is mysql false when inserting
To: [EMAIL PROTECTED]
Reply-To: Tim Freeman <[EMAIL PROTECTED]>, [EMAIL PROTECTED]

Package: python-mysqldb
Version: 1.1.6-1
Severity: normal

*** Please type your report below this line ***
Using python2.3-mysqldb against mysql-server 4.1.9-2, I can run this program

   import MySQLdb
   import MySQLdb.converters
   _conversions = MySQLdb.converters.conversions.copy()
   # To make the bug go away, comment in the next line.
   #_conversions[bool] = lambda x, d: int(x)
   conn = MySQLdb.connect(host='x', user='x', passwd='x', db='x',
                          conv = _conversions)
   cursor = conn.cursor()
   cursor.execute("drop table if exists foo");
   cursor.execute("create table foo (x boolean)");
   # Inserting a print statement strategically into the MySQLdb package shows
   # that the next execute does this mysql: 
   #    insert into foo(x) values ('True');
   # which, when I do it directly from the mysql command line, inserts a 0 into
   # foo, not a 1.
   cursor.execute("insert into foo (x) values (%s)", (True,))
   cursor.execute("select * from foo")
   (value,) = cursor.fetchone()
   print "Value is %r" % (value,) # prints 0, should print True or 1.
   assert value

and it hits the assert because inserting True inserts a 0 into the database.
There's a workaround commented out at the top of the script.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (700, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-1-386
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages python-mysqldb depends on:
ii  python                        2.3.4-5    An interactive high-level object-o
ii  python2.3-mysqldb             1.1.6-1    A Python interface to MySQL

-- no debconf information


----- End forwarded message -----


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to