Commit Graph

62 Commits

Author SHA1 Message Date
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
cbf024e8f7 *: clean code. (#1987) 2016-11-10 15:38:22 +08:00
1550e76e6c executor: add comments in executor package. (#1876)
* executor: add comments in executor package.
2016-10-31 10:51:17 +08:00
f86a32d261 ddl: write DDL binlog. (#1752)
Pass query string in context, also disallows prepare DDL, so we can be sure that
DDL query do not contains parameter marker.

change binlog row encoding format.

including columnID in binlog row, so it can be adapted to different schema version.

prepend old row for update binlog when don't have PK.
2016-10-08 11:48:58 +08:00
6dec14119a Fix typos (#1714) 2016-09-09 22:58:47 +08:00
e4ac5301ce remove useless code. (#1609) 2016-08-20 16:00:20 +08:00
db4cdcfaec parser: reduce memory allocation (#1408) 2016-07-07 16:42:30 +08:00
921677399e Hanfei/apply (#1318)
add apply operator.
2016-06-15 15:23:05 +08:00
9ec42dbc4c *: Tiny clean up (#1303)
* *: rename DbName to DBName and fix plan shadows.
2016-06-08 16:33:41 +08:00
a71005710f plan: merge 'optimizer/plan' and 'optimizer' into one package. (#1300) 2016-06-07 20:49:05 +08:00
10359b0052 rewrite executor. (#1294)
* rewrite executor.
2016-06-07 20:32:15 +08:00
041dfd97c1 executor: evaluate subquery before executing outer query. (#1133)
* executor: evaluate subquery before executing outer query.

So outer query can push down subquery values.

* evaluator: extract a function to evaluate subquery.

* evaluator: add comments on exported function.
2016-04-21 21:51:39 +08:00