Commit Graph

80 Commits

Author SHA1 Message Date
93b52805c3 ast, executor: set Fields for SelectStmt in PrepareExec (#5504) 2017-12-27 17:16:49 +08:00
855df184e1 executor: support Chunk for TableDualExec (#5395) 2017-12-22 16:37:21 +08:00
ec1b40d5b3 executor: Close() executors when Open() returns an error to avoid goroutine leak (#5469) 2017-12-22 12:38:07 +08:00
f1e89cde19 *: use lower-case of github.com/sirupsen/logrus (#5400)
*: rename github.com/Sirupsen/logrus to github.com/sirupsen/logrus

* vendor: update pd

* vendor: update github.com/pingcap/tipb/go-mysqlx
2017-12-14 16:25:58 +08:00
6ee266d0ca executor: UpdateExec support NextChunk (#5372) 2017-12-14 15:32:06 +08:00
a2fb741191 *: Chunk add context parameter (#5348) 2017-12-09 11:23:40 +08:00
38f794d875 plan, executor: add physical proj and topn. (#5316) 2017-12-06 13:30:58 +08:00
fb610e6429 *: change executor Next() interface to Next(goctx.Context) (#5223) 2017-11-26 21:17:33 -06:00
af4e73c43a tidb: always rebuild plan for retry. (#5218)
Fixes a bug that results in index and record inconsistency.

We build UnionScan based on if transaction is dirty, but this is a runtime property, may change during retry.

To simplify the logic and avoid potential bug, always rebuild the plan for retrying statements.
2017-11-25 09:50:32 +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
a32b8dbcf6 *: use Chunk for TableReader. (#5142) 2017-11-21 10:08:50 +08:00
cf5a22b5fd *: replace *ast.Row with types.Row (#5124) 2017-11-16 18:36:28 +08:00
1ef93dc274 executor: Add debug logs (#5083) 2017-11-13 21:19:08 +08:00
cedc35ca8c executor: add default database to query log (#5078) 2017-11-12 21:26:56 -06:00
ec9d1f0cc6 *: simplify RecordSet.Fields. (#5068) 2017-11-12 12:07:18 +08:00
49f2a908a6 remove read-only statement from transaction auto retry (#5026)
* *: Ignore readonly statement when retrying

* remove explain statement from retry
* remove all select statement from retry except It has setvar functions
* remove execute statement from retry if it is read-only statement
2017-11-08 19:03:05 +08:00
d122f5826c tidb-server,executor: add command option and log success/fail for slow-query (#4934) 2017-10-30 11:49:08 +08:00
7afae3f89c *: support write slow query log into seperate files (#4804) 2017-10-20 14:22:10 +08:00
21c21973c0 executor: make slow-query log more terminal friendly (#4764) 2017-10-16 06:03:03 -05:00
a34964a36a *: improve the column info for client (#4770)
Add table/database info in the response message.
2017-10-15 08:27:13 -05:00
d88344f869 plan, tidb: support plan cache for SELECT statement (#4644) 2017-10-11 22:34:04 -05:00
3e1d036336 *: log the caller of "terror.Log()" (#4729) 2017-10-10 11:26:43 +08:00
eb8df3519a *: prepare to enforce errcheck, part1 (#4670) 2017-09-30 16:23:37 +08:00
407719e79b executor: change to structured slow log for friendly JSON output (#4657) 2017-09-29 18:19:23 +08:00
e3ab386874 *: revert 4669 "make prepare stmt retriable when schema is out-dated" (#4676)
* Revert "executor: analyze use NewSelectResult (#4667)"

This reverts commit d1d78b726ba6ba4c79d38ce95252fc41753db02e.

* Revert "table: Speed up the add index operation (#4632)"

This reverts commit d782ce103eea7680f289f6a35576dc9349bb0bb4.

* Revert "*: make prepare stmt retriable when schema is out-dated. (#4669)"

This reverts commit 3dfbf52e64cc0af6039758d169bf133b965f5584.
2017-09-28 16:19:53 +08:00
3dfbf52e64 *: make prepare stmt retriable when schema is out-dated. (#4669) 2017-09-28 10:41:22 +08:00
97242d362a config: add config file support. (#4509) 2017-09-14 19:38:49 +08:00
3428d80577 *: hide secure information in SHOW PROCESSLIST (#4451) 2017-09-12 01:40:21 -05:00
88e1666ac6 *: change the log package to logrus (#4452) 2017-09-08 00:45:07 -05:00
21a417ad65 executor: make auto analyze more conservative (#4284) 2017-08-24 20:25:50 +08:00
7c273c0f29 *: implement auto analyze (#4141) 2017-08-18 18:42:28 +08:00
678c6924be *: support priority for SELECT HIGH_PRIORITY statement (#4119)
*: support priority for SELECT HIGH_PRIORITY statement
2017-08-10 01:09:57 -05:00
c7c248eb91 executor: change struct row to []types.Datum (#4072) 2017-08-09 18:37:57 +08:00
8adac8fe6c *: set low priority for expensive SQL and high priority for point get (#3881) 2017-08-02 13:53:36 +08:00
53b27dd3ec tidb/config: Extract the configuration as a package and add two configurations for tidb (#3919)
add the ability to configure the slow query threshold and max log length
2017-07-28 17:01:22 +08:00
b3c43e52ca *: retry commit for prepared statement when schema change (#3297) 2017-05-21 10:42:10 +08:00
c5e864539f executor: fix some bugs about new plan. (#3231) 2017-05-10 16:32:00 +08:00
ad52a2462c executor: add open inteferce for Executor. (#3221) 2017-05-09 21:13:22 +08:00
20be357e86 expression: fix buildin function found_rows() (#3134)
fix issue #3131.
2017-05-02 11:40:10 +08:00
858d76bbe3 executor: fixed comments warning. (#3187) 2017-05-01 19:19:32 +08:00
09a8c1bd7a *: tiny refact move SetProcessInfo (#2790) 2017-03-07 14:48:38 +08:00
87d39986fe *: show processlist (#2744) 2017-03-01 14:39:13 +08:00
6859d121b9 txn:improvement for point get by unique key or pk (#2631) 2017-02-20 22:39:36 +08:00
0d9744261b *: slow log and metrics includes execute prepared statement. (#2512)
Execute prepared statement was ignored in slow query log and query metrics.
2017-01-21 10:06:55 +08:00
2828e29a5b executor: refine statement count metrics (#2477) 2017-01-16 12:34:21 +08:00
36e9570051 *: concurrently begin a transaction and compile (#2393) 2017-01-05 15:00:43 +08:00
5f96f67cbc *: change schema from []*Column to struct (#2321) 2016-12-27 14:02:19 +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
0adabe53a1 *: begin a transaction in PrepareTxnCtx, unify in transaction. (#2290)
Transaction should has the same life cycle as TxnCtx, so create a
new transaction in PrepareTxnCtx if transaction is nil or invalid.
2016-12-21 16:48:19 +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