esnme / ultramysql

A fast MySQL driver written in pure C/C++ for Python. Compatible with gevent through monkey patching.

Home Page:http://www.esn.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non existing db when connecting gives cryptic error

hrosenhorn opened this issue · comments

When connecting to a db and specifying a database that does not exist you get the error "SystemError: error return without exception set". Setting the db arg to a empty string is a work around.

Minimal example:

import unittest, umysql

class TestMySQL(unittest.TestCase):
def testUnique(self):
conn = umysql.Connection()
conn.connect ('127.0.0.1', 3306, 'testuser', 'testuser', 'NO_EXISTING_DB')

    conn.close()

if name == 'main':
unittest.main()

I get the same cryptic error message when using bad username/password combination.

Is this with monkey patched gevent sockets?

Den 27 februari 2012 11:32 skrev Hkan Rosenhorn <
reply@reply.github.com

:

When connecting to a db and specifying a database that does not exist you
get the error "SystemError: error return without exception set". Setting
the db arg to a empty string is a work around.

Minimal example:

import unittest, umysql

class TestMySQL(unittest.TestCase):
def testUnique(self):
conn = umysql.Connection()
conn.connect ('127.0.0.1', 3306, 'testuser', 'testuser',
'NO_EXISTING_DB')

   conn.close()

if name == 'main':
unittest.main()


Reply to this email directly or view it on GitHub:
#9

Jonas Trnstrm
Product Manager
e-mail: jonas.tarnstrom@esn.me
skype: full name "Jonas Trnstrm"
phone: +46 (0)734 231 552

ESN Social Software AB
www.esn.me

Fixed, give proper SQLError