Commit Graph

117 Commits

Author SHA1 Message Date
fc7458eef2 Remove a redundant GetInfoSchema call (#9640) 2019-03-11 17:28:58 +08:00
560e8cfe57 *: sleep 0 when retry whole transaction (#9454) 2019-03-02 13:16:28 +08:00
36176be874 *: improve syntax error code & message compatibility (#9103) 2019-01-23 10:46:29 +08:00
ec833bc4d2 *: fix some lints produced by golangci-lint (#8999) 2019-01-16 16:44:49 +08:00
00c4ff4fa9 *: refactor Executor.Next() to receive RecordBatch (#8994) 2019-01-14 15:04:36 +08:00
94df8d1e30 *: ignore unknown hint and return warning instead of return a parser error (#8685) 2018-12-21 13:44:54 +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
c137cada68 *: change golang.org/x/net/context to standard context (#8579) 2018-12-05 13:54:00 +08:00
103f2ac2a3 *: add a session variable for window function parser (#8511) 2018-12-04 11:26:59 +08:00
c677187728 plan: support ? in Order By / Group By / Limit Offset clauses (#8206) 2018-12-03 21:48:54 +08:00
e7e31fae3f *: add preparedStmt metric and add limit to max prepareStmt (#8405) 2018-11-28 20:37:50 +08:00
61ee0da103 planner: cleanup prepare cache when client send deallocate (#8332) 2018-11-20 12:33:44 +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
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
33a0b0c900 planner: fix a sporadic panic due to the PR #7684 when using the prepared plan cache (#7956) 2018-10-29 19:05:04 +08:00
89dda9d9a8 *: move parser to a separate repository (#8036) 2018-10-25 11:12:10 +08:00
edaec7bdaf *: move Statement and RecordSet from ast to sqlexec package (#7970) 2018-10-21 13:21:26 +08:00
25118db843 *: move ast.NewValueExpr to standalone parser_driver package (#7952)
Make the ast package get rid of the dependency of types.Datum
2018-10-19 19:37:55 +08:00
dbdd806c0e *: add session variable "tidb_enable_cascades_planner" (#7879) 2018-10-12 13:21:51 +08:00
ee0d4d6c64 executor: print arguments in execute statement in log files (#7684) 2018-10-09 15:24:25 +08:00
05b37de16e *: use chunk grow for simple executor (#7540) 2018-09-27 09:07:51 +08:00
e79bd946ed *: change package name from plan to planner (#7760) 2018-09-25 11:16:39 +08:00
334e9254d3 *: add a variable to force statement priority of TiDB server (#7694) 2018-09-20 23:48:40 +08:00
cb03f2bec1 move from juju/errors to pkg/errors (#7151) 2018-09-12 15:42:20 +08:00
a5af7a0e1f *: remove variable 'tidb_import_data' and rename SessionVars.ImportingData to LightningMode (#7262) 2018-08-03 10:00:03 +08:00
53ffa1703e *: fix data race in the file of prepare_test.go (#7232) 2018-08-02 17:07:50 +08:00
4a203fd525 executor: add placeholder count check in prepare stage (#7162) 2018-07-29 13:35:59 +08:00
7c18d24933 executor, store: fixed daylight saving time issue (#6823)
Thank you for working on TiDB! Please read TiDB's [CONTRIBUTING](https://github.com/pingcap/tidb/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.

## What have you changed? (mandatory)

During coprocessor dag task,  it first uses timezone `name`, if non-empty, to get legitimate timezone variable. To achieve this, we need to push down such data into tikv which leads to change the logic of building pushdown request. The logic I mentioned mainly resides in `executor` package. 

I change `timeZoneOffset` to `zone` and add second return parameter `name string`.  The intentioned of doing this to adopt the convention of `time` package. 

For the same purpose, I change `GetTimeZone` to `Location`. As you can see, in `time` package, timezone was bind to `Location`. 


## What are the type of the changes (mandatory)?
- Bug fix (non-breaking change which fixes an issue)


## How has this PR been tested (mandatory)?
unit-test
integration-test will be added shortly
2018-07-16 18:15:19 +08:00
2292844f34 *: support session variable 'warning_count' and 'error_count' (#6945) 2018-07-02 19:00:24 +08:00
cef2ebde62 *: support 'SHOW ERRORS' statment and reports errors in 'SHOW WARNINGS' statement (#6936) 2018-06-29 19:09:12 +08:00
ab332eba2a executor: BadNullError should be ignored by insert ignore statement (#6465) 2018-06-29 13:15:31 +08:00
d1bd647732 support high_priority for delete/update/replace into (#6592) 2018-05-23 12:35:16 +08:00
0fda3b408f executor: move IgnoreErr to StmtCtx (#6392) 2018-05-02 17:10:59 +08:00
fb8efa5596 *: clean up code for set SQL statement priority, let it bypass plan (#6328) 2018-04-21 08:58:24 -05:00
ccf6da1a46 *: rename NextChunk to Next (#6214) 2018-04-03 20:00:30 +08:00
ebdcdb1eac executor: remove Next function for prepared.go (#6003) 2018-03-17 08:45:34 +08:00
ad814b0d6c executor, util: employ memory Tracker to track memory usage during query execution (#5826) 2018-03-06 11:02:09 +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
12c87929b8 *:fix some golint && ineffassign && misspell to improve GoReport Result (#5867) 2018-02-23 19:31:05 +08:00
4e1a114e68 *: move package context to sessionctx (#5890) 2018-02-22 18:03:38 +08:00
e6eb3ae9f5 executor, metrics: add metrics for expensive executors and statement nodes (#5798) 2018-02-09 12:15:20 +08:00
5d91dbd5a1 executor: pass operator label from Plan to Executor (#5821) 2018-02-08 13:33:11 +08:00
4d50ae22bc kvencode: enable prepare plan cache. (#5627) 2018-01-14 15:04:36 +08:00
f8a2c807fd executor: support Chunk for ExecuteExec (#5410) 2018-01-11 18:38:12 +08:00
93b52805c3 ast, executor: set Fields for SelectStmt in PrepareExec (#5504) 2017-12-27 17:16:49 +08:00
b35e024ace executor: support Chunk for DeallocateExec (#5457)
* executor: support Chunk for DeallocateExec

* fix build
2017-12-21 10:50:44 +08:00
82b52f53bb executor: support Chunk for PrepareExec (#5408) 2017-12-15 10:15:34 +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