Source:
public ResultWithGeneratedKeys executeUpdate(Object generatedKeysRequest) { long start = 0; Database database = session.getDatabase(); Object sync = database.getMvStore() != null ? null : database.isMultiThreaded() ? session : database; session.waitIfExclusiveModeEnabled(); boolean callStop = true; boolean writing = !isReadOnly(); if (writing) { while (!database.beforeWriting()) { } } Session.Savepoint rollback = session.setSavepoint(); session.startStatementWithinTransaction(); session.setCurrentCommand(this, generatedKeysRequest); try { while (true) { database.checkPowerOff(); try { int updateCount; if (sync != null) { synchronized (sync) { updateCount = update(); } } else { updateCount = update(); } if (!Boolean.FALSE.equals(generatedKeysRequest)) { return new ResultWithGeneratedKeys.WithKeys(updateCount, session.getGeneratedKeys().getKeys(session)); } return ResultWithGeneratedKeys.of(updateCount); } catch (DbException e) { start = filterConcurrentUpdate(e, start); } catch (OutOfMemoryError e) { callStop = false; database.shutdownImmediately(); throw DbException.convert(e); } catch (Throwable e) { throw DbException.convert(e); } } } catch (DbException e) { e = e.addSQL(sql); SQLException s = e.getSQLException(); database.exceptionThrown(s, sql); if (s.getErrorCode() == ErrorCode.OUT_OF_MEMORY) { callStop = false; database.shutdownImmediately(); throw e; } database.checkPowerOff(); if (s.getErrorCode() == ErrorCode.DEADLOCK_1) { session.rollback(); } else { session.rollbackTo(rollback, false); } throw e; } finally { try { if (callStop) { stop(); } } finally { if (writing) { database.afterWriting(); } } } }

Target:
public ResultWithGeneratedKeys executeUpdate(Object generatedKeysRequest) { long start = 0; Database database = session.getDatabase(); Object sync = database.isMultiThreaded() || database.getMvStore() != null ? session : database; session.waitIfExclusiveModeEnabled(); boolean callStop = true; boolean writing = !isReadOnly(); if (writing) { while (!database.beforeWriting()) { } } synchronized (sync) { Session.Savepoint rollback = session.setSavepoint(); session.startStatementWithinTransaction(); session.setCurrentCommand(this, generatedKeysRequest); try { while (true) { database.checkPowerOff(); try { int updateCount = update(); if (!Boolean.FALSE.equals(generatedKeysRequest)) { return new ResultWithGeneratedKeys.WithKeys(updateCount, session.getGeneratedKeys().getKeys(session)); } return ResultWithGeneratedKeys.of(updateCount); } catch (DbException e) { start = filterConcurrentUpdate(e, start); } catch (OutOfMemoryError e) { callStop = false; database.shutdownImmediately(); throw DbException.convert(e); } catch (Throwable e) { throw DbException.convert(e); } } } catch (DbException e) { e = e.addSQL(sql); SQLException s = e.getSQLException(); database.exceptionThrown(s, sql); if (s.getErrorCode() == ErrorCode.OUT_OF_MEMORY) { callStop = false; database.shutdownImmediately(); throw e; } database.checkPowerOff(); if (s.getErrorCode() == ErrorCode.DEADLOCK_1) { session.rollback(); } else { session.rollbackTo(rollback, false); } throw e; } finally { try { if (callStop) { stop(); } } finally { if (writing) { database.afterWriting(); } } } } }