sql: Added testing mode (always run in transactions, and always rollback).