Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Stop raising SystemError when no database name given #11

Merged
merged 1 commit into from
Apr 20, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion python/umysql.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,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;
Expand Down