[email protected]
[Top] [All Lists]

Bug#300324: marked as forwarded (python-mysqldb: Python True is mysql fa

Subject: Bug#300324: marked as forwarded python-mysqldb: Python True is mysql false when inserting
From: Debian Bug Tracking System
Date: Mon, 21 Mar 2005 14:48:36 -0800
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) [] (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
        ([] 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-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

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


----- 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]

<Prev in Thread] Current Thread [Next in Thread>
  • Bug#300324: marked as forwarded (python-mysqldb: Python True is mysql false when inserting), Debian Bug Tracking System <=