|
|
@ -6351,6 +6351,8 @@ MySqlConnection::MySqlConnection( const MySqlConfig* config )
|
|
|
|
// if ( config->username().isEmpty() )
|
|
|
|
// if ( config->username().isEmpty() )
|
|
|
|
// pApp->slotConfigAmarok("MySql");
|
|
|
|
// pApp->slotConfigAmarok("MySql");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int reconnect = 1;
|
|
|
|
|
|
|
|
mysql_options( m_db, MYSQL_OPT_RECONNECT, &reconnect );
|
|
|
|
if ( mysql_real_connect( m_db, config->host().latin1(),
|
|
|
|
if ( mysql_real_connect( m_db, config->host().latin1(),
|
|
|
|
config->username().latin1(),
|
|
|
|
config->username().latin1(),
|
|
|
|
config->password().latin1(),
|
|
|
|
config->password().latin1(),
|
|
|
@ -6370,7 +6372,6 @@ MySqlConnection::MySqlConnection( const MySqlConfig* config )
|
|
|
|
error() << "Failed to set database charset\n";
|
|
|
|
error() << "Failed to set database charset\n";
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
m_db->reconnect = 1; //setting reconnect flag for newer mysqld
|
|
|
|
|
|
|
|
m_connected = true;
|
|
|
|
m_connected = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|