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

when I use in .NET (ef) variable 'tx_isolation' does not yet support value: SERIALIZABLE #8793

Closed
introspection3 opened this issue Dec 25, 2018 · 11 comments
Labels
type/question The issue belongs to a question.

Comments

@introspection3
Copy link

introspection3 commented Dec 25, 2018

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    use .NET (entity framework) code first.

  2. What did you expect to see?

just like mysql

  1. What did you see instead?
    variable 'tx_isolation' does not yet support value: SERIALIZABLE

  2. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
    docker lastest version

MySql.Data.MySqlClient.MySqlException (0x80004005): variable 'tx_isolation' does not yet support value: SERIALIZABLE
在 MySql.Data.MySqlClient.MySqlStream.ReadPacket()
在 MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
在 MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
在 MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)

@introspection3
Copy link
Author

how I can resolve this ?

@alivxxx
Copy link
Contributor

alivxxx commented Dec 25, 2018

@564064202 Please fill the issue template. Do not delete them.

@alivxxx alivxxx added the type/question The issue belongs to a question. label Dec 25, 2018
@introspection3
Copy link
Author

@lamxTyler finished

@alivxxx
Copy link
Contributor

alivxxx commented Dec 25, 2018

@564064202 TiDB only supports Repeatable Read isolation level. You can change the isolation level configuration in the frame work.

@introspection3
Copy link
Author

how I can do in .NET ?

@shenli
Copy link
Member

shenli commented Dec 25, 2018

@564064202 Please consult the .Net's document.

@introspection3
Copy link
Author

no,we can't set any thing on entity framework (code first)

@zhexuany
Copy link
Contributor

zhexuany commented Jan 21, 2019

I also met this issue in jdbc mysql connector. #8625 brought this change. Some frameworks often send query like "SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE".

Printing a warning message would be better in my opinion.

@564064202 Regarding your case, you may change to release 2.0 which does not contain this change.

@zhexuany
Copy link
Contributor

/cc @shenli What do you think? Simply banned query like SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE could be problematic.

@morgo
Copy link
Contributor

morgo commented Jan 22, 2019

This was discussed in #2712 and fixed in #8625

The issue is that a user could lose data by being led to believe TiDB supports a stronger isolation level than it does. Most clients ignore warnings.

@zhexuany
Copy link
Contributor

@564064202 you can solve this by using the latest master. For more details, please refer to #10065. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/question The issue belongs to a question.
Projects
None yet
Development

No branches or pull requests

5 participants