Permalink
Browse files

Merge pull request #11 from hongqn/feature/empty-db

Stop raising SystemError when no database name given
  • Loading branch information...
2 parents ce3a47a + fca017f commit e59545a91e815ad9b2639a531bf2ff83b01791cc @jskorpan jskorpan committed Apr 20, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/Connection.cpp
  2. +1 −1 python/umysql.c
View
@@ -294,7 +294,7 @@ bool Connection::processHandshake()
return false;
}
- if (!(serverCaps & MCP_CONNECT_WITH_DB) && m_database.empty())
+ if ((serverCaps & MCP_CONNECT_WITH_DB) && m_database.empty())
{
m_clientCaps &= ~MCP_CONNECT_WITH_DB;
}
View
@@ -860,7 +860,7 @@ PyObject *Connection_connect(Connection *self, PyObject *args)
if (!UMConnection_Connect (self->conn, host, port, username, password, database, acObj ? &autoCommit : NULL, charset))
{
- return NULL;
+ return HandleError(self, "connect");
}
Py_RETURN_NONE;

0 comments on commit e59545a

Please sign in to comment.