afsql: txn error fix

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>