Kaydet (Commit) 99c6e8dc authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

HSQLDB connection flush: safer handling when createStatement or execute fails

Change-Id: I32f3014bbf32c4a4a990bea03ee565c9b4c0164d
üst 8607f8b5
...@@ -150,12 +150,19 @@ namespace connectivity { namespace hsqldb ...@@ -150,12 +150,19 @@ namespace connectivity { namespace hsqldb
m_bReadOnly = true; m_bReadOnly = true;
} }
} }
try
{
if ( !m_bReadOnly ) if ( !m_bReadOnly )
{ {
Reference< XStatement > xStmt( m_xConnection->createStatement(), UNO_QUERY_THROW ); Reference< XStatement > xStmt( m_xConnection->createStatement(), UNO_QUERY_THROW );
xStmt->execute( OUString( "CHECKPOINT DEFRAG" ) ); xStmt->execute( OUString( "CHECKPOINT DEFRAG" ) );
} }
} }
catch(const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
}
EventObject aFlushedEvent( *this ); EventObject aFlushedEvent( *this );
m_aFlushListeners.notifyEach( &XFlushListener::flushed, aFlushedEvent ); m_aFlushListeners.notifyEach( &XFlushListener::flushed, aFlushedEvent );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment