[server/session] add missing rollback when freeing a db connection
When we let go of a cnxset and give it back to the pool, we need to make
sure it's not in the middle of a transaction.
We got bitten by a migration where the connection used by admin's
repo.connect was not rolled back before attempting the migration,
causing a deadlock because it had a lock on a table. This could
potentially also be an issue for e.g. hooks or looping tasks that didn't
explicitly rollback before calling free_cnxset or moving out of a
ensure_cnx_set block.
<?xml version="1.0" encoding="UTF-8"?>
<display window-flags="sticky, below" width="185" height="200">
<sensor id="r" module="rqlsensor"/>
<sensor id="FS" module="FontSelector,1,Sans 10 black"/>
<!-- left border -->
<group x="0" width="5" height="200" bg-uri="gfx/border-left.png"/>
<image x="10" y="0" uri="gfx/logo_erudi.png"/>
<array id="results" x="10" y="30"
watch="layout=r:layout, length=r:length">
<label id="lbls1" color="black"
on-enter="r:enter-line"
on-leave="r:leave-line"
on-click="r:click-line"
watch="value=r:result, font=FS:font0, color=r:resultbg"/>
</array>
</display>