Commit Graph

474 Commits

Author SHA1 Message Date
61868f44dc *: Support the statement of "create table ... like" (#2707) 2017-02-22 23:57:04 +08:00
ceeeb2ad36 ddl: remove useless argument (#2710) 2017-02-22 18:49:59 +08:00
bb2aace0d6 ddl: Fix the bug that showing status row count is 0 (#2696) 2017-02-21 21:01:14 +08:00
fee2ed1849 ddl: Make verification background job more stable (#2683) 2017-02-20 22:43:11 +08:00
417122af42 ddl: save original schema ID for allocator when rename table. (#2671)
Fixes a bug that renamed table to another database failed to insert.
2017-02-17 22:19:00 +08:00
cd0cfa0a75 tidb-server: add a parameter to optionally disable ddl worker. (#2656)
If we don't want the tidb-server run ddl jobs, we can use this parameter `-run-ddl false` to disable it.
2017-02-16 18:19:29 +08:00
3aa6be2bb1 plan/typeinferer: refine type inferer of builtin func greatest/least (#2628) 2017-02-14 18:28:54 +08:00
96e8ab6128 ddl: fix the statement of modify | change column (#2627) 2017-02-13 13:26:00 +08:00
05413a474f ddl: Support some definitions and fix a bug to modify|change column (#2629) 2017-02-13 11:18:41 +08:00
60cf9eddc4 ddl: Support to modify column with default value and comment (#2621) 2017-02-10 12:32:59 +08:00
1972558dc9 *: change default collation to utf8_bin (#2617)
Currently we doesn't support case insensitive index, our duplication check is always case sensitive.

We should not use case insensitive collation as default collation.
2017-02-10 11:45:35 +08:00
51defd89bb *: Support the statement of drop default (#2616) 2017-02-09 17:21:44 +08:00
4cab38cd1b *: fix issue2600 (#2614) 2017-02-09 13:53:19 +08:00
87f51736ee *: support the statement of alter table alter column set default (#2608) 2017-02-08 15:03:27 +08:00
76bf890f0b ddl/model: fix ddl log format (#2599) 2017-02-07 09:12:31 +08:00
6f8fc91a76 ddl: remove the useless test to make TestCheckOwner more stable (#2596) 2017-02-06 16:36:13 +08:00
8bafc3d515 tidb: accelerate unit test (#2590)
Avoid BootstrapSession everytime, just do it once in testSessionSuite.SetUpSuite
2017-02-06 15:11:38 +08:00
19af8d720f ddl: Add the function of close (#2562)
add the function of close, use Stop instead of close and add log.
2017-01-26 13:23:27 +08:00
14d0c4e36d ddl: make reorg_test stable (#2531) 2017-01-23 12:54:56 +08:00
ac10a37ee3 *: support alter table rename table (#2503) 2017-01-22 12:39:54 +08:00
9d536e34a7 *: run a bootstrap session before store is ready (fix race) (#2491) 2017-01-22 11:39:25 +08:00
d0a9ab5abe ddl: Fix error format and clean up error trace. (#2500) 2017-01-18 23:58:53 +08:00
999517c4f1 Revert "*: run a bootstrap session before store is ready" (#2490) 2017-01-17 15:14:24 +08:00
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