BeginTx does not verify TxOptions
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 9.2k
- Forks
- 1.2k
- Avg merge
- 19m
- Merged PRs (30d)
- 4
Description
The documentation for ConnBeginTx.BeginTx says the following:
// This must check opts.Isolation to determine if there is a set
// isolation level. If the driver does not support a non-default
// level and one is set or if there is a non-default isolation level
// that is not supported, an error must be returned.
//
// This must also check opts.ReadOnly to determine if the read-only
// value is true to either set the read-only transaction property if supported
// or return an error if it is not supported.
However, this library simply throws away the provided TxOptions without verifying them (link). This violates the contract. This library must verify that opts.Isolation is sql.LevelDefault and that ReadOnly is false.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read sqlite3_go18.go at the linked ConnBeginTx.BeginTx entry point first, then compare its handling with the database/sql TxOptions contract. Run the repository's relevant Go tests. Done means unsupported isolation or read-only options are rejected rather than silently ignored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sqlite
- Domain
- database
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100