|
|
|
@ -504,6 +504,8 @@ bool TQMYSQLDriver::open( const TQString& db,
|
|
|
|
|
optionFlags |= CLIENT_ODBC;
|
|
|
|
|
else if ( opt == "CLIENT_SSL" )
|
|
|
|
|
optionFlags |= CLIENT_SSL;
|
|
|
|
|
else if ( opt == "MYSQL_OPT_RECONNECT" )
|
|
|
|
|
optionFlags |= MYSQL_OPT_RECONNECT;
|
|
|
|
|
else
|
|
|
|
|
tqWarning( "TQMYSQLDriver::open: Unknown connect option '%s'", (*it).latin1() );
|
|
|
|
|
}
|
|
|
|
@ -544,6 +546,21 @@ void TQMYSQLDriver::close()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool TQMYSQLDriver::ping()
|
|
|
|
|
{
|
|
|
|
|
if ( !isOpen() ) {
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (mysql_ping( d->mysql )) {
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
setLastError( qMakeError("Unable to execute ping", TQSqlError::Statement, d ) );
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQSqlQuery TQMYSQLDriver::createQuery() const
|
|
|
|
|
{
|
|
|
|
|
return TQSqlQuery( new TQMYSQLResult( this ) );
|
|
|
|
|