Commit Graph

61 Commits

Author SHA1 Message Date
084aa5a030 config: add initChunkSize config item, make chunk start with 32 (#8480) 2019-01-07 11:14:47 +08:00
a7907ede7a *: remove fail field from TxnState (#8712)
Originally, `fail` is added to simplify error handling, avoiding large changes on
the Txn() interface API. But it turns out that `fail` becomes the root of many bugs.
So this commit remove the `fail` and make an API refactory.
2018-12-20 16:36:12 +08:00
93acd10f53 *: add context.Context to NewTxn(), tiny refactor (#8530) 2018-12-06 17:45:16 +08:00
c137cada68 *: change golang.org/x/net/context to standard context (#8579) 2018-12-05 13:54:00 +08:00
3742a0d602 *: Txn() function signature refactor and remove ActivePendingTxn() (#8327)
* change Txn() function signature to Txn(active bool)
* ActivePendingTxn() is not used any more because Txn() does the work
* change executor builder getStartTS() uint64 to getStartTS() (uint64, error)
2018-11-16 11:10:39 +08:00
0c3e9c1652 session,executor: run statement without transaction (#8260)
`set @@autocommit = 0`
`select 1` // This statement should not make the session enter a transaction,
because it never need Txn().
Make txn lazy initialize
2018-11-14 20:10:58 +08:00
32b1dbd8d5 *: rename "github.com/pkg/errors" to "github.com/pingcap/errors" (#8136)
We import "github.com/pkg/errors" in the code, and actually put
the "github.com/pingcap/errors" there in the vendor path.
That's a dirty hack, and prevent the introduce of Go module.
2018-11-01 16:09:07 +08:00
edaec7bdaf *: move Statement and RecordSet from ast to sqlexec package (#7970) 2018-10-21 13:21:26 +08:00
cb03f2bec1 move from juju/errors to pkg/errors (#7151) 2018-09-12 15:42:20 +08:00
55ca8512fc ddl: worker add ctxPool field to make executing sql in ddl package possible. (#7447)
* ddl: worker add ctxPool field to make executing sql in ddl package possible.
2018-09-04 17:56:50 +08:00
a5af7a0e1f *: remove variable 'tidb_import_data' and rename SessionVars.ImportingData to LightningMode (#7262) 2018-08-03 10:00:03 +08:00
e3ba021f5a *: make system variable 'group_concat_max_len' work (#7080) 2018-07-26 20:02:56 +08:00
46da21b5c1 *: support select tidb_is_ddl_owner, to figure out whether tidb instance is ddl owner (#6682) 2018-06-01 17:56:44 +08:00
87ce884b2e *:check max/min timestamp bound with timezone aware (#6581)
- mytime: max/min configure with UTC tz, convert to local tz during process starting, convert it to session tz before checking bound.
- time: so `check()`/`add()` need force pass `StatementContext` parameter.
- builtin_time: pass `StatementContext` from `b.ctx.sessionVars` into check/add.
- dump: also set timezone for StatementContext with UTC.
- *_test/mock: fix test case, make mock context with stmt TimeZone.
- add testcase for checkTimestamp and mytime convert timezone.
2018-05-24 15:27:38 +08:00
f287451eed tidb: move tidb/*.go to session directory (#6062)
This change makes our top level directory clean.
2018-03-20 09:06:11 -05:00
89dd754579 *: Improve code readability and unified aliases (#5958) 2018-03-06 10:25:18 +08:00
e1121814d2 *: don't import golang.org/x/net/context as goctx alias (#5895)
Now that there is no conflict with sessionctx.Context, this can be
import directly
2018-02-24 03:40:56 -06:00
4e1a114e68 *: move package context to sessionctx (#5890) 2018-02-22 18:03:38 +08:00
d9e16e104f *: Cleanup code (#5852) 2018-02-12 23:17:03 +08:00
c92b3056c0 *: refine code for StmtTxn (#5763) 2018-02-08 07:07:12 -06:00
f1eefc147b *: handle dirty table in StmtTxn (#5711) 2018-01-31 02:30:06 -06:00
24333b3b29 *: don't record binlog when statement rollback (#5699) 2018-01-25 06:50:57 -06:00
eddff3429a *: importing data reduce memory allocations. (#5549) 2018-01-07 12:48:07 +08:00
90401445d2 *: collect and store query feedback (#5438) 2017-12-22 11:33:05 +08:00
ae9d7f5dab *: set session variable MaxChunkSize to 2 for test (#5238) 2017-11-28 13:48:36 +08:00
02f6bb27c7 *: remove goCtx from session struct (#5174)
1. go context should not be stored
2. change Executor interface to Open(goctx.Context)
3. many other changes forced by this refactor
2017-11-22 02:17:38 -06:00
37681cf435 *: opentracing for two phase commit (#4900) 2017-10-26 17:43:45 +08:00
0306bb0070 tidb: support a plan cache for prepared statements (#3956)
* tidb: support a plan cache for prepared statements
2017-10-24 00:55:51 -05:00
4bfa5faf63 executor: Add unit test case for ShowExecutor. (#4763) 2017-10-16 10:50:14 +08:00
1c99d41ca2 expression: Quit builtin function SLEEP when KILLed. (#4708) 2017-10-08 21:12:36 -05:00
1eebb87156 ddl: remove backgroud worker, use delete-range to speed up something. (#3993) 2017-08-09 16:59:25 +08:00
213954d2e7 *: add specified columns for LOAD DATA INFILE Syntax (#3240)
* : add specified columns for LOAD DATA INFILE Syntax
2017-05-15 16:40:47 +08:00
5494a54db4 util: correct comments mistake (#3121) 2017-04-25 09:16:50 +08:00
b698bb54c3 *: fix data race when defer cancel() is called (#3068)
* *: fix data race when defer cancel() is called

defer cancel() was introduced in this PR
https://github.com/pingcap/tidb/pull/3010
2017-04-17 17:17:07 +08:00
87d39986fe *: show processlist (#2744) 2017-03-01 14:39:13 +08:00
4f95252ab0 *: add Cancel method for tidb.Session, Canceled for context.Context (#2636) 2017-02-22 12:56:20 +08:00
6859d121b9 txn:improvement for point get by unique key or pk (#2631) 2017-02-20 22:39:36 +08:00
36e9570051 *: concurrently begin a transaction and compile (#2393) 2017-01-05 15:00:43 +08:00
64484a4257 *: refactor context.Context (#2298)
Make transaction life cycle under control, prepare for correctly handle schema out of date error.
The old `GetTxn(forceNew boll)` is replaced by `Txn` and `NewTxn`,
`CommitTxn` and `RollbackTxn` is removed.
2016-12-23 13:02:41 +08:00
7e2f769e54 *: remove mockContext in the package of ddl (#2132) 2016-11-29 19:44:15 +08:00
ea894e8b77 *: Add a function GenByArgs for Error (#2033)
*: Add a function GenByArgs for Error
2016-11-27 13:18:43 +08:00
0af8520a78 sessionctx/variable: remove dependency on context package. (#2064)
Makes using session variable easier and faster.
Prepare for use session variable to handle data truncated error.
2016-11-23 14:39:48 +08:00
ade11fe9f4 *: support history read. (#1734)
* *: support history read.

This commit only handles the case when scheme does not change.
Use history schema will be supported in the following PR.
2016-09-19 15:37:30 +08:00
945fd1d371 *: add error trace (#1477) 2016-07-20 11:50:33 +08:00
d3cb90559b *: change Context method FinishTxn to CommitTxn and RollbackTxn. (#1253)
Makes it easier to read.
2016-05-24 13:17:01 +08:00
0b99e0440b *: Move variable errors to sessionctx/variable 2015-12-24 15:27:41 +08:00
xia
22bb76409b *: address comments 2015-12-14 11:36:49 +08:00
7583446a5d *: address comments 2015-12-12 16:41:12 +08:00
xia
200686bd57 *: rename mockStatist to mockStatistics, and
do tiny clean
2015-11-18 13:33:38 +08:00
xia
051a476b2a *: update code structure 2015-11-17 14:49:55 +08:00