Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
session: add a batch commit session variable for the large transaction #8293
What problem does this PR solve?
tidb_batch_insert / tidb_batch_delete only split the statement into several batches. If the transaction contains many statements, TiDB could not commit it in batch.
What is changed and how it works?
Add a session level variable to control if the transaction should return an error or start a new transaction when it exceeds the statements limit of the transaction. It will be useful when importing data.
1 similar comment
IMHO, it's better let
Just as description above, this config only useful in prepare data situation and only can be "safe" use in prepare data situation.
make variable in server level will be problem, just imagine: we have a tidb running under heavy online transaction processing, now we want add a table and using a "import program" to import some data in new table. we just want to import fast in import program's sql, the sql from online processing should never affect by
So, we should better use session variable, and set it in program's database dsn