Commit Graph

85 Commits

Author SHA1 Message Date
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
8b15cb52b7 *: move StatementContext to its own package. (#5177) 2017-11-22 00:11:14 +08:00
dd2812fa55 mysql, expression: support sql_mode 'PAD_CHAR_TO_FULL_LENGTH' (#5065) 2017-11-21 13:22:29 +08:00
f8c96f1f92 plan, executor: build logical plan to check column name validation when doPrepare (#5116) 2017-11-16 13:49:55 +08:00
cd5c665c8c executor: use baseExecutor for all Executors (#5087)
Makes it easy to add new method on Executor interface.
2017-11-13 21:06:31 +08:00
15212587e1 *: remove resolver.go (#4988) 2017-11-10 14:42:10 +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
e6f86e35d2 plan: build prepared statement plan in Optimize phase. (#4914)
When we build the `Execute` plan, the underlying plan is not built, so we don't know what the plan is before we execute it.
This PR move the plan building for prepared statement to optimizer, so we know what plan we are going to execute before we execute it.
2017-10-28 23:04:07 +08:00
25879d3649 expression: support builtin function ROW_COUNT (#4853) 2017-10-28 09:18:58 +08:00
2285e65cd9 excutor: tiny code cleanup (#4899) 2017-10-25 21:15:08 +08:00
ebf090b0dc plan, executor: remove some XXStmt from resolver.go (#4823)
* plan, executor: remove AdminStmt, AlterTableStmt, AnalyzeTableStmt, DropStatsStmt, CreateIndexStmt,
CreateTableStmt, DoStmt, DropTableStmt, DropIndexStmt, RenameTableStmt, SetStmt, ShowStmt from resolver.go
2017-10-24 06:16:34 -05: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
d88344f869 plan, tidb: support plan cache for SELECT statement (#4644) 2017-10-11 22:34:04 -05:00
7d2804e43c *: check sc.IgnoreZeroInDate when parsing string or number to date/datetime/timestamp (#4732) 2017-10-10 23:38:53 -05:00
a6b5c666c5 *: support NotFillCache kv request option (#4658)
If TiDB send a request with NotFillCache option, the LRU cache of underlying
storage will not be touched. select statement with SQL_NO_CACHE will use it.
2017-09-29 02:06:38 -05:00
c899e5bb16 expression: rewrite builtin function: MOD (#4407) 2017-09-21 09:48:51 +08:00
1ae31c9fad Support delete ignore with strict sql mode produces warnings in truncate error (#4564) 2017-09-19 16:20:13 +08:00
c4a2824ca9 Support update ignore for truncate as warning (#4431) 2017-09-19 11:02:17 +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
d0dcb5b0a6 expression, parser: fix issue #3691, cast compatibility (#3894) 2017-08-01 16:47:38 +08:00
91ba0841b0 executor, sessionctx, util: treat decimal truncation as warning during inserting (#3897) 2017-07-26 19:10:42 +08:00
e008c6c36a expression: fix #3762, signed integer overflow handle in minus unary scalar function (#3780) 2017-07-26 11:44:00 +08:00
d35acbdf08 types: Fix insert error when column length is zero (#3849) 2017-07-25 18:59:38 +08:00
9c3ac28541 sessionctx/variable: store a copy of timezone in StatementContext (#3495)
There are many place need access to timezone, they come with a StatementContext argument.
So put a copy of timezone into StatementContext to achieve the goal with minimal changes.
2017-06-16 18:33:13 +08:00
78319c7530 *: reset statement context for prepared statements (#3413) 2017-06-07 10:06:32 +08:00
ad52a2462c executor: add open inteferce for Executor. (#3221) 2017-05-09 21:13:22 +08:00
95f6b237ab executor: fix statement count metrics for prepared statement. (#2704) 2017-02-22 13:22:45 +08:00
6859d121b9 txn:improvement for point get by unique key or pk (#2631) 2017-02-20 22:39:36 +08:00
4d2cfb78f2 tidb: return fields for prepared statements. (#2642)
Prepared statement should return result fields.
2017-02-15 11:41:22 +08:00
1aa005190f executor: set text for execute prepared statement. (#2620) 2017-02-09 19:22:43 +08:00
e68dcf77dc *: remove ctx from function args. (#2566) 2017-01-28 18:44:02 +08:00