Commit Graph

511 Commits

Author SHA1 Message Date
e1ecc1059e *: run a bootstrap session before store is ready (#2481) 2017-01-17 14:46:35 +08:00
fce6256117 *: Clean up error trace (#2475) 2017-01-16 13:13:49 +08:00
5f6f101c9a executor: optimize begin (#2474) 2017-01-16 12:57:03 +08:00
2828e29a5b executor: refine statement count metrics (#2477) 2017-01-16 12:34:21 +08:00
ba8b6a9c26 fix bug of union type converting (#2471) 2017-01-16 12:09:27 +08:00
527256627b ast: clean some code. (#2465) 2017-01-16 10:17:41 +08:00
122195718b executor: fix log format and add transaction start TS. (#2469) 2017-01-15 13:34:37 +08:00
c470a46283 *: remove useless code. (#2457) 2017-01-15 11:37:48 +08:00
217c26bd0b *: Support the statement of rename table (#2444) 2017-01-15 00:58:10 +08:00
554293a73e executor: add more information on slow dist sql. (#2451) 2017-01-13 14:41:11 +08:00
a3c1d47058 parser: count multiple expression doesn't return error. (#2429) (#2448) 2017-01-13 10:24:22 +08:00
07f756b818 plan/statistics: statistics support add index info (#2349) 2017-01-10 15:22:01 +08:00
7c66138042 executor: optimize delete statement. (#2421) 2017-01-10 15:13:00 +08:00
47316499fd plan: add cache for statistics table (#2398) 2017-01-08 01:09:23 +08:00
1b72b11ffa util/types: fix truncate float (#2405) 2017-01-06 17:14:04 +08:00
696bea9f37 *: Support batch load data (#2394) 2017-01-05 16:15:00 +08:00
36e9570051 *: concurrently begin a transaction and compile (#2393) 2017-01-05 15:00:43 +08:00
e38c67e086 executor: implements nested loop join. (#2365) 2017-01-03 19:53:03 +08:00
d40e24ce46 *: in prepared statement limit/offset may be placeholder (#2364) 2017-01-03 14:52:14 +08:00
235a7979b9 sessionctx/varsutil: refactor system variable (#2359)
Make varsutil package manage all the system variable get and set method.
2017-01-03 11:15:50 +08:00
0b4a8f652d executor: move some exec out of executor.go (#2363) 2016-12-31 23:21:46 +08:00
31d58b69ed executor: consider uint = int in join condition. (#2355) 2016-12-30 19:00:49 +08:00
a28ab3eb73 *: add GetArgs interface (#2343) 2016-12-29 19:10:01 +08:00
ebbbf8993b ddl: speed up create table without the need to change lease. (#2332)
DDLs that doesn't modify rows like create/drop/truncate table, create/drop database
do not need to wait 2 lease on ddl worker, we can safely remove those wait to
speed up DDL.

But user may create a table, then insert data on that table on another TiDB server,
So we need to wait in session.

User can set a session variable to skip DDL wait if needed, and there is no risk of
data inconsistency.

This solution remove the need for user to set lease to zero when loading data,
It's much more safe and easy to use.
2016-12-28 22:08:19 +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
2acbf242a4 parser: support show keys from table from database syntax. (#2308)
Fixes issue https://github.com/pingcap/tidb/issues/2303
2016-12-23 12:54:48 +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
9c83f3f176 executor: 'INSERT IGNORE' should only ignore KeyExists error. (#2241) 2016-12-13 18:31:13 +08:00
35edefb757 *: rewrite the logic of set. (#2223) 2016-12-12 17:54:16 +08:00
dd4dcfee36 fix primary key's type (#2222)
* executor: fix primay key type error

When we do single read index scan, primay key's type should be determined
by it's flag.

* executor: add test

* executor: format code:

* executor: address comment
2016-12-12 01:35:22 -06:00
1b8051d3c5 *: set and use Flags to properly handle truncate error (#2212) 2016-12-12 11:45:58 +08:00
9ec16203f0 *: rewrite the logic of execute. (#2217) 2016-12-10 02:13:01 +08:00
e149b0ce87 *: rewrite the logic of do statement. (#2215) 2016-12-09 20:18:12 +08:00
107992f050 executor: remove useless file. (#2208) 2016-12-08 23:02:42 +08:00
292e58c2aa *: make union execution parallel and fix a union plan bug. (#2195) 2016-12-08 22:45:49 +08:00
6ef340fb32 util/types: properly handle truncate error for string to float or int. (#2186)
When converting from string to float or int, use StatementContext to handle truncate error.
Also directly convert a string to Int instead converting to float first, then convert float to int.
2016-12-07 19:42:46 +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
8d42cc059e vendor: update tipb, add flags and warnings. (#2189) 2016-12-07 16:25:21 +08:00
51a10a6725 *: Fix issue #2175 (#2188)
*: fix issue #2175
2016-12-07 14:58:22 +08:00
4da8cfd3fa executor: Fix the bug in the statement of "on duplicate..." (#2179)
* executor: fix the statement of "on duplicate..." when updating the PK
handle
2016-12-06 14:04:32 +08:00
fb6ae5acd3 executor: fix a problem that may cause system hang. (#2163) 2016-12-05 10:23:26 +08:00
f42d3b2bcc *: Support the statement of "alter user" (#2144) 2016-12-03 14:01:38 +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
fa4bdc766d executor: support the statement of 'set password ... ' and fix issue 2153 (#2155) 2016-12-02 18:34:20 +08:00