Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConnBeginTx #19192

Closed
ghost opened this issue Feb 19, 2017 · 1 comment
Closed

ConnBeginTx #19192

ghost opened this issue Feb 19, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 19, 2017

What version of Go are you using (go version)?
Go 1.8

Hi

Sorry for not raising this during the beta, but I just started testing mysql read only transactions.

It appears that query cancellation in mysql would require a non-trivial design go-sql-driver/mysql#496 which might delay the availability of TxOptions.

Perhaps context and TxOptions should be separated into two interfaces as they appear to be two orthogonal concerns..

Something like:

type ConnBeginTx interface {
	BeginTx(opts TxOptions) (Tx, error)
}

type ConnBeginCancelableTx interface {
	BeginCancelableTx(ctx context.Context, opts TxOptions) (Tx, error)
}

Regards,

-Itai

@bradfitz
Copy link
Contributor

Sorry, too late.

The API is now frozen due to the Go1 compat promise.

Closing because any fix will have to be in the MySQL driver at this point. I'll trust @kardianos to track the MySQL driver progress and file concrete bugs for API additions in database/sql as appropriate. But we can't change or remove things now.

@golang golang locked and limited conversation to collaborators Feb 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants