HSQLDB connection flush: safer handling when createStatement or execute fails
Change-Id: I32f3014bbf32c4a4a990bea03ee565c9b4c0164d
This commit is contained in:
@@ -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 );
|
||||||
|
Reference in New Issue
Block a user