Commit Graph

140 Commits

Author SHA1 Message Date
16fa15d890 *: support revoke statement (#2661) 2017-02-21 22:05:50 +08:00
4dcd7c8d41 *: fix bug about scalar subquery. (#2674) 2017-02-18 15:42:26 +08:00
37977865df *: add max1row info and refine scalar subquery's decorrelation. (#2646) 2017-02-17 19:25:00 +08:00
dcc7715ec2 *: support with grant option for grant statement (#2647) 2017-02-16 12:58:07 +08:00
4d9b70f0a6 plan, executor: give special treat for index columns when analyze table (#2436)
* plan/statistics: statistics support add index info
2017-01-26 11:24:53 +08:00
461fd98bb0 *: rename the plan interface. (#2547) 2017-01-25 15:10:44 +08:00
96ee4446e3 *: refactor function. (#2499) 2017-01-22 18:10:38 +08:00
f145a32063 *: refactor apply plan and executor. (#2411) 2017-01-22 11:06:17 +08:00
6ae4b77d7f plan, executor: clean code (#2520) 2017-01-22 10:18:10 +08:00
a28ab3eb73 *: add GetArgs interface (#2343) 2016-12-29 19:10:01 +08:00
5f96f67cbc *: change schema from []*Column to struct (#2321) 2016-12-27 14:02:19 +08:00
751a81b77e *: add physical mem table plan (#2296) 2016-12-25 16:13:18 +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
a89fa8a8d3 *: refact insert logic (#2252) 2016-12-20 17:38:23 +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
35edefb757 *: rewrite the logic of set. (#2223) 2016-12-12 17:54:16 +08:00
379363266e plan: optimize the filter condition push down logic when do index double read (#2166)
Origin design will put index conditions into table scan, but it can
be pushed down into index scan.
2016-12-07 17:02:16 +08:00
74a1c9935d *: add StatementContext argument to functions. (#2157)
Add StatementContext argument to more functions where it is needed.
2016-12-02 23:28:11 +08:00
e321a72998 executor: fix the error when union_scan's src is mem table. (#2138) 2016-11-30 21:27:00 +08:00
5230f5eabd variable: define StatementContext. (#2121)
StatementContext is used to hold statement execution mode and state.
As every computation need this, there are many API changes.
2016-11-29 14:25:38 +08:00
73f2ffad90 varsutil: remove dependency on 'types' for 'variable' package (#2095)
* varsutil: remove dependency on 'types' for 'variable' package

'variable' package will be used in 'types', remove dependency on 'types' by
moving functions to a new 'varsutil' package.

Also extract 'SetExec' from 'SimpleExec'
2016-11-25 13:44:49 +08:00
440abb21f2 plan: set apply's innerplan be the second child of it. (#2092) 2016-11-25 11:07:41 +08:00
79a8c3fc8d plan: add a Cache plan in physical plan (#2052)
plan: add Cache plan

* format code

* tiny change

* optimize the logic of code

* rename some variable and optimize logic

* move e.cursor++ down
2016-11-23 15:53:44 +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
af5b0e71fc infoschema: implement infoschema table. (#2034)
Creates a information schema specific table that implements table.Table interface.
The rows in this table is generated by `[]*model.DBInfo` on request.

Further reduce memory allocation.
2016-11-21 19:47:41 +08:00
421ceeb8fa *: make golint happy. 2016-11-15 11:12:24 +08:00
cbf024e8f7 *: clean code. (#1987) 2016-11-10 15:38:22 +08:00
e17644716d refactor show clause. (#1940) 2016-11-10 11:14:37 +08:00
88a66a57ea *: Improve test for push down. (#1927) 2016-11-07 11:42:05 +08:00
5d1a069ada executor: set scanConcurrency varialbe for distsql Executor on building. (#1943)
Prevent worker goroutines from reading session variable map, Fixes race.
2016-11-04 09:46:00 +08:00
bfc1ca679a tidb: load and apply common global variables for the session (#1942)
Fixes a bug some global variables like 'sql_mode' not applied to session.
2016-11-03 22:01:15 +08:00
3bcb4bedd8 executor: let union_scan executor use its own schema. (#1925) 2016-11-02 13:26:11 +08:00
76f420595b *:support aggregate function push cross outer join. (#1899) 2016-11-01 17:59:12 +08:00
1550e76e6c executor: add comments in executor package. (#1876)
* executor: add comments in executor package.
2016-10-31 10:51:17 +08:00
82971c4779 plan: support aggregation push down. (#1886) 2016-10-31 01:17:21 +08:00
9b9c01100e plan: support topn push down in plan phase. (#1769) 2016-10-11 15:17:00 +08:00
471731b04e plan: consider limit during building physcial plan. (#1760)
Consider limit in CBO framework.
2016-09-26 21:53:17 +08:00
2456804b25 remove useless code. (#1745) 2016-09-20 21:42:57 +08:00
b8994bb139 *: Support stream aggregation. (#1735)
* *: Support stream aggregation.
2016-09-20 17:14:31 +08:00
ade11fe9f4 *: support history read. (#1734)
* *: support history read.

This commit only handles the case when scheme does not change.
Use history schema will be supported in the following PR.
2016-09-19 15:37:30 +08:00
5caa0f5e29 decide push down conditions during plan building phase. (#1731) 2016-09-18 10:35:52 +08:00
efa2db0b05 *: Rename xapi to distsql (#1725)
distsql is a more clear name.
2016-09-14 10:20:33 +08:00
4d22f97013 support heap sort in sql layer. (#1697) 2016-09-08 12:57:03 +08:00
ed4649e85d *: Support load data local (#1634) 2016-08-30 09:38:37 +08:00
f2d8b3c108 remove New*** from variable name. (#1644) 2016-08-29 10:18:45 +08:00
e33587ed47 support explain (#1632) 2016-08-26 11:19:23 +08:00
c90d91cba9 *: Support insert ignore (#1579)
Ignore duplicate key errors for insert ignore stmt, Fix #1570
2016-08-22 14:18:56 +08:00