mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 19:51:58 +01:00
removed automatic registration as it can cause a deadlock in mysql_library_init
This commit is contained in:
@@ -21,15 +21,12 @@
|
||||
#include <mysql.h>
|
||||
|
||||
|
||||
const MySQLConnectorRegistrator pocoMySQLConnectorRegistrator;
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace MySQL {
|
||||
|
||||
|
||||
std::string Connector::KEY(POCO_DATA_MYSQL_CONNECTOR_NAME);
|
||||
std::string Connector::KEY("mysql");
|
||||
|
||||
|
||||
Connector::Connector()
|
||||
@@ -41,12 +38,13 @@ Connector::~Connector()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const std::string& Connector::name() const
|
||||
{
|
||||
static const std::string n(POCO_DATA_MYSQL_CONNECTOR_NAME);
|
||||
return n;
|
||||
return KEY;
|
||||
}
|
||||
|
||||
|
||||
Poco::AutoPtr<Poco::Data::SessionImpl> Connector::createSession(const std::string& connectionString,
|
||||
std::size_t timeout)
|
||||
{
|
||||
@@ -67,7 +65,7 @@ void Connector::registerConnector()
|
||||
|
||||
void Connector::unregisterConnector()
|
||||
{
|
||||
Poco::Data::SessionFactory::instance().remove(POCO_DATA_MYSQL_CONNECTOR_NAME);
|
||||
Poco::Data::SessionFactory::instance().remove(KEY);
|
||||
mysql_library_end();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user