Commit Graph

451 Commits

Author SHA1 Message Date
e1ecc1059e *: run a bootstrap session before store is ready (#2481) 2017-01-17 14:46:35 +08:00
f386df1020 ddl: avoid assert in lock (#2482)
assert in lock may cause dead lock
2017-01-17 13:09:49 +08:00
d3f0612263 ddl: avoid assert in hook function. (#2479) 2017-01-16 16:38:29 +08:00
fce6256117 *: Clean up error trace (#2475) 2017-01-16 13:13:49 +08:00
244de11287 *: Make column test stable and fix prepare statement issue (#2473) 2017-01-15 22:59:05 +08:00
5940259073 ddl: tiny clean up (#2468) 2017-01-15 14:36:41 +08:00
217c26bd0b *: Support the statement of rename table (#2444) 2017-01-15 00:58:10 +08:00
5b7ec4c6cf ddl/ddl_db_test: locate errors occurred in goroutine (#2443) 2017-01-14 11:32:10 +08:00
849071221c Wrong behavior when executing alter table t add index c (c(3)); (#2432) (#2441) 2017-01-11 18:25:57 +08:00
468af824a9 *: Fix the wrong error message and fix missing type (#2431) 2017-01-10 14:43:38 +08:00
d4f1a0a28d ddl: Add the index key prefix limit (#2272) (#2380) 2017-01-10 11:32:20 +08:00
6bc6f7e98b *: Add the field of history information in job structure (#2046) 2017-01-05 16:34:39 +08:00
c8cc389fdc ddl: bug in columnDefToCol, Length shouldn't be set for unspecified fields. (#2381) (#2382) 2017-01-05 12:04:21 +08:00
fb3d981d74 tidb: sleep for a while and retry when schema out of date (#2379)
also adjust schema lease duration in ddl test
2017-01-04 13:17:24 +08:00
cc5fcae0a3 ddl: Speed up adding index phase (#2341) 2017-01-04 12:32:58 +08:00
f35ab30127 *: change the implementation of domain schema lease (#2327)
lease is based on pd timestamp oracle instead of TiDB local time
return retryable error when schema check find schema changed
move schema lease check to 2PC, use commitTS
2017-01-03 19:45:08 +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
2248b6226b ddl: Add a ddl_op file (#2324)
* ddl: add a ddl_api file
2016-12-26 14:31:01 +08:00
cd9bd133db ddl: fix issue 2293 (#2316) 2016-12-26 10:52:16 +08:00
6f95d18e01 *: remove a useless argument (#2319) 2016-12-25 16:18:53 +08:00
7414bede41 ddl: Speed up adding index phase (#2309)
* ddl: speed up adding index phase
2016-12-23 18:18:30 +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
26e5c0c867 *: move evaluator's helper to expression package. (#2291) 2016-12-23 11:34:52 +08:00
a49b661f62 ddl: Fix issue 2293 (#2297)
* ddl: fix issue 2293
2016-12-21 21:32:26 +08:00
cbe49fa24f *: remove evaluate.Eval from ddl (#2264) 2016-12-19 14:40:08 +08:00
368b4db48d ddl: Reduce the unnecessary memory allocation and make code clearer (#2268)
*ddl: Reduce the unnecessary memory allocation and make code clearer
2016-12-19 11:16:38 +08:00
5c41bfe549 ddl: Speed up add index phase (#2260)
* ddl: speed up add index phase
2016-12-16 19:56:30 +08:00
1f6737ef67 *: remove SetLease method in domain (#2149) 2016-12-12 18:26:38 +08:00
9f48b1b2a5 ddl: fix issue #2176 (#2214) 2016-12-09 21:11:17 +08:00
b723e72baf ddl: Add a check before building jobs (#2213)
* ddl: add check before building jobs
2016-12-09 18:48:45 +08:00
99b3465c1e ddl: allocate column ID and index ID in TableInfo. (#2205) 2016-12-09 12:31:27 +08:00
b134396b1a ddl: unsupport dropping the column that is pk handle (#2203) 2016-12-08 19:45:04 +08:00
f5792b5e80 *: the first setp of adding the field of history information in job structure (#2170) 2016-12-07 18:29:37 +08:00
196b6b18fe *: Support for changing column (#2174)
*: support for changing column in parser
* ddl: support for changing column in ddl
2016-12-07 11:19:37 +08:00
fb12b1a510 ddl: pass data race (#2167) 2016-12-05 11:38:33 +08:00
e02c2688bd ddl: use hookCtx in test (#2159)
hook function will be called by ddl worker goroutine. use the same context can cause
context be committed more than once time.
2016-12-02 23:56:44 +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
7e2f769e54 *: remove mockContext in the package of ddl (#2132) 2016-11-29 19:44:15 +08:00
ebfcd3df92 validator: check duplicate key cols when create table (#2123) 2016-11-29 15:58:55 +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
2c34a75aba ddl: check duplicated cols when execute alter table add index (#2103) 2016-11-28 15:06:17 +08:00
ea894e8b77 *: Add a function GenByArgs for Error (#2033)
*: Add a function GenByArgs for Error
2016-11-27 13:18:43 +08:00
40faf7da3c ddl: Support creating anonymous index (#2075)
* ddl: support creating anonymous index
2016-11-24 22:13:00 +08:00
4388bfd57d ddl: update lease (#2086) 2016-11-24 12:13:04 +08:00
15e446c25b *: Speed up test (#2083)
* *: reduce test time
2016-11-24 11:34:52 +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
f8c0b059d5 driver.go & interpreter: remove driver.go and interpreter.go (#2066) 2016-11-23 18:17:57 +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
1181acc640 *: Reduce loading schema times (#1984)
* *: only if it's success to do DDL or in reloadLoop to load schema
2016-11-22 18:34:06 +08:00
c9d114f3d5 ddl: Fix the data race in foreign_key_test.go (#2054)
* ddl: fix the data race in foreign_key_test.go
2016-11-22 16:02:42 +08:00