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,10 +150,17 @@ namespace connectivity { namespace hsqldb ...@@ -150,10 +150,17 @@ namespace connectivity { namespace hsqldb
m_bReadOnly = true; m_bReadOnly = true;
} }
} }
if ( !m_bReadOnly ) try
{ {
Reference< XStatement > xStmt( m_xConnection->createStatement(), UNO_QUERY_THROW ); if ( !m_bReadOnly )
xStmt->execute( OUString( "CHECKPOINT DEFRAG" ) ); {
Reference< XStatement > xStmt( m_xConnection->createStatement(), UNO_QUERY_THROW );
xStmt->execute( OUString( "CHECKPOINT DEFRAG" ) );
}
}
catch(const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
} }
} }
......
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