Commit Graph

73 Commits

Author SHA1 Message Date
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
461fd98bb0 *: rename the plan interface. (#2547) 2017-01-25 15:10:44 +08:00
fb429408c9 *: make schema as a pointer. (#2533) 2017-01-23 16:23:47 +08:00
fce6256117 *: Clean up error trace (#2475) 2017-01-16 13:13:49 +08:00
2828e29a5b executor: refine statement count metrics (#2477) 2017-01-16 12:34:21 +08:00
527256627b ast: clean some code. (#2465) 2017-01-16 10:17:41 +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
c24c90b4d3 tidb, variable: refactor retry, add TransactionContext (#2256) 2016-12-16 11:07:59 +08:00
d406c77c1f Revert "tidb, variable: refactor retry, add TransactionContext" (#2255) 2016-12-15 10:42:04 +08:00
ff0ceb1785 tidb, variable: refactor retry, add TransactionContext (#2254) 2016-12-15 10:35:57 +08:00
9ec16203f0 *: rewrite the logic of execute. (#2217) 2016-12-10 02:13:01 +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