Commit Graph

19 Commits

Author SHA1 Message Date
217c26bd0b *: Support the statement of rename table (#2444) 2017-01-15 00:58:10 +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
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
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
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
856d723718 executor: reset default database after drop current database (#2089) 2016-11-24 15:06:17 +08:00
cbf024e8f7 *: clean code. (#1987) 2016-11-10 15:38:22 +08:00
1550e76e6c executor: add comments in executor package. (#1876)
* executor: add comments in executor package.
2016-10-31 10:51:17 +08:00
b399060118 ddl: truncate table by DDL operation. (#1766)
Currently, truncate table deletes rows in table in one large transaction,
too large transaction is very likely to fail.
This commit use DDL to do the work, it returns instantly, old data will be
deleted by background worker.
2016-09-29 14:22:02 +08:00
10359b0052 rewrite executor. (#1294)
* rewrite executor.
2016-06-07 20:32:15 +08:00
965e704412 executor: makes dirty table supports XAPI. (#1245) 2016-05-24 10:53:17 +08:00
xia
4319909e08 *: unify error format in infoschema package 2016-03-29 11:10:56 +08:00
ce96978182 *: Add index option in IndexInfo
1. Add index option in IndexInfo.
2. Show index option content when running show index statement.
2016-03-16 22:09:11 +08:00
515f193bd2 *: Remove coldef package
There are lots of redundancies between ast and coldef. So we remove
coldef.
2016-03-05 19:11:04 +08:00
ec475aae5f *: simplify 'table.Table` interface.
Makes it easier to implement a in-memory table.
2016-02-18 20:58:53 +08:00
4f2f242fdf executor: support DDL statements. 2016-02-17 16:36:26 +08:00