HSQLDB connection flush: safer handling when createStatement or execute fails
Change-Id: I32f3014bbf32c4a4a990bea03ee565c9b4c0164d
This commit is contained in:
@@ -150,10 +150,17 @@ namespace connectivity { namespace hsqldb
|
||||
m_bReadOnly = true;
|
||||
}
|
||||
}
|
||||
if ( !m_bReadOnly )
|
||||
try
|
||||
{
|
||||
Reference< XStatement > xStmt( m_xConnection->createStatement(), UNO_QUERY_THROW );
|
||||
xStmt->execute( OUString( "CHECKPOINT DEFRAG" ) );
|
||||
if ( !m_bReadOnly )
|
||||
{
|
||||
Reference< XStatement > xStmt( m_xConnection->createStatement(), UNO_QUERY_THROW );
|
||||
xStmt->execute( OUString( "CHECKPOINT DEFRAG" ) );
|
||||
}
|
||||
}
|
||||
catch(const Exception& )
|
||||
{
|
||||
DBG_UNHANDLED_EXCEPTION();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user