The SQL storage driver mishandled its explicit transactions in Create
and Delete:
- Delete's not-found and build-select-fail early returns returned
without Rollback or Commit, permanently leaking the pooled connection
and an open server-side transaction.
- Both methods finished with `defer transaction.Commit()`, discarding
the commit error. A commit-time failure (connection drop,
serialization failure, disk full) left the release unpersisted while
the method reported success. In Delete the deferred commit also fired
on the post-delete error paths, committing a partial delete.
Register a single `defer transaction.Rollback()` right after Beginx (a
no-op once committed) so every early return releases the transaction,
and commit explicitly at the success point, returning any commit error.
Error paths after the delete now roll back, making Delete atomic.
Covered by the regression tests added in the previous commit.
Also convert the driver's direct Exec calls to ExecContext with
context.Background(), matching the secrets and cfgmaps drivers. The
new tests import database/sql, which activates noctx's database/sql
checks for the package and flags these pre-existing call sites.
Signed-off-by: Gates Wang <9372086+SetagGnaw@users.noreply.github.com>