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
5738e7fc18
plan: support pushing agg past union all. ( #2150 )
2016-12-02 18:16:51 +08:00
850b29e98b
plan: update gby cols for pushed agg. ( #2145 )
2016-12-01 19:23:14 +08:00
e288b3563f
types/util: use statement context to handle truncate error. ( #2147 )
...
use statement context to handle truncate error in ConvertTo MyDecimal.
2016-12-01 19:11:07 +08:00
3a721da8fc
*: fix cast decimal allocates large memory. ( #2146 )
...
If precision is too large, encode decimal allocates large amount of memory.
This commit set cast decimal unspecified length to default decimal length (10),
also add check on precision and frac on `MyDecimal.ToBin`.
2016-12-01 17:37:10 +08:00
ad30a5b18f
plan: fix the value of attribute correlated of HashAgg ( #2140 )
2016-12-01 11:31:36 +08:00
e321a72998
executor: fix the error when union_scan's src is mem table. ( #2138 )
2016-11-30 21:27:00 +08:00
33dc01f564
plan: fix panic when explain ( #2136 )
2016-11-30 19:12:33 +08:00
bb203afad4
executor: fix data race ( #2134 )
2016-11-30 11:54:05 +08:00
9311ce64fd
executor: fix a bug when join exists in subquery. ( #2106 )
...
* executor: fix a bug when join exists in subquery.
2016-11-30 10:40:22 +08:00
ebcf494e69
plan: cut unuseful search branch to improve performence. ( #2124 )
2016-11-29 15:00:09 +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
3c349259e4
*: basic support for builtin function STR_TO_DATE ( #2078 )
2016-11-28 14:17:32 +08:00
36f0f307a8
parser: support show events ( #2099 )
...
* parser: support show events
2016-11-27 22:49:49 +08:00
ea894e8b77
*: Add a function GenByArgs for Error ( #2033 )
...
*: Add a function GenByArgs for Error
2016-11-27 13:18:43 +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
856d723718
executor: reset default database after drop current database ( #2089 )
2016-11-24 15:06:17 +08:00
b19cc75a94
mysql, types: move MyDecimal and Time from 'mysql' to 'types' package. ( #2082 )
...
So we don't need to handle sql mode in 'mysql' package, avoid potential dependency cycle.
2016-11-24 10:50:31 +08:00
d179a84610
plan: correct enforcer's correlated attribute. ( #2079 )
2016-11-23 20:04:23 +08:00
2a3426ca9d
*: make explain result more clearly. ( #2063 )
2016-11-23 18:58:12 +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