Hi Victor,
Thank you very much for your message. I've created a bug report for this issue, which I believe is a bug:
At first sight, the outer query should throw an exception, as the transactional semantics is undefined. We could, of course, define it retroactively. I *think* that what happens is you inherit the datasource's default auto commit flag, which might be "true", so you will run each query in its own transaction.
Fixing this will not be easy as a lot of applications may already depend on the current behaviour. We'll think about it. Thanks again for bringing this to our attention.
Lukas