← Back to team overview

agesys-dev team mailing list archive

[Bug 686246] Re: odd mis-interpretation of bind parameter on OSX

 

I can't reproduce this either. Is this still an issue for you?

-- 
You received this bug notification because you are a member of Agesys
Team, which is subscribed to oursql.
https://bugs.launchpad.net/bugs/686246

Title:
  odd mis-interpretation of bind parameter on OSX

Status in oursql:
  Incomplete

Bug description:
  I'm not sure what this one is about, as I've used OurSQL successfully
  on OSX in the past and I don't recall a bug like this one.  This is
  reproducible with OurSQL 0.9.2 as well as trunk (your trunk still has
  "0.9.2" for __version__, FYI), on Mac OSX 10.6.5 MySQL 5.1.22:

      import oursql
      c = oursql.connect(user='scott', db='test', passwd='tiger')

      cursor = c.cursor()
      cursor.execute("select ?", ('foo', ))
      print cursor.fetchall()

  result:

  [(u'f',)]

  it doesn't get much better if you try adding params:

      import oursql
      c = oursql.connect(user='scott', db='test', passwd='tiger')

      cursor = c.cursor()
      cursor.execute("select ?, 'bar', ?", ('foo', 'bat'))
      print cursor.fetchall()

  [(u'f', u'bar', u'b')]

  the correct answer is of course "(('foo', 'bar', 'bat'),)" which is
  what you get with MySQLdb, so this is an OurSQL issue.

To manage notifications about this bug go to:
https://bugs.launchpad.net/oursql/+bug/686246/+subscriptions


References