Commit Graph

206 Commits

Author SHA1 Message Date
a2f2e3f40a tidb,store/tikv: use special session to execute ExecRestrictedSQL (#2687) 2017-02-22 15:08:17 +08:00
4f95252ab0 *: add Cancel method for tidb.Session, Canceled for context.Context (#2636) 2017-02-22 12:56:20 +08:00
6859d121b9 txn:improvement for point get by unique key or pk (#2631) 2017-02-20 22:39:36 +08:00
24fc89333b server, session: add commitRetryLimit config. (#2684) 2017-02-20 22:01:28 +08:00
0f1c182a92 *: Reduce useless log (#2644) 2017-02-16 13:34:04 +08:00
de89263a21 tidb: avoid privilege check in loadCommonGlobalVariablesIfNeeded (#2641) 2017-02-15 12:44:22 +08:00
4d2cfb78f2 tidb: return fields for prepared statements. (#2642)
Prepared statement should return result fields.
2017-02-15 11:41:22 +08:00
13d99938e8 *: add error stack (#2630) 2017-02-14 12:32:50 +08:00
281e8553b4 tidb,privilege: use new privilege implementation for connection verification (#2607) 2017-02-09 18:08:37 +08:00
79be7364a9 *: fix reset stmt ctx when there are multiple statements (#2613) 2017-02-08 21:13:22 +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
cb1c2f0ff9 *: update privilege Checker interface and use it (#2557) 2017-02-06 11:28:06 +08:00
1da75c5399 *: load privilege in a goroutine when server initialize (#2489) 2017-01-24 20:13:56 +08:00
0e76e66e03 store/tikv: log big transaction. (#2525) 2017-01-22 11:59:31 +08:00
9d536e34a7 *: run a bootstrap session before store is ready (fix race) (#2491) 2017-01-22 11:39:25 +08:00
24a970227b session: fix output format (#2514) 2017-01-20 15:49:21 +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
5bb751ee4b *: remove useless code (#2476) 2017-01-16 11:44:03 +08:00
244de11287 *: Make column test stable and fix prepare statement issue (#2473) 2017-01-15 22:59:05 +08:00
c5c4f85a62 session: add connection ID in retry log. (#2472) 2017-01-15 19:44:15 +08:00
42f570ab46 *: add 'max_allowed_packet' in common variables. (#2470)
To save a global query to TiKV when a new connection creates.
2017-01-15 15:52:05 +08:00
0f15c2ec5d kv: limit transaction size, len, and entry length, reduce retry times (#2426) 2017-01-10 12:26:18 +08:00
677a85bbc0 tidb: session retry metrics (#2419) 2017-01-09 23:13:50 +08:00
0066ab6418 tidb, domain: schema lease metrics (#2417) 2017-01-09 15:05:43 +08:00
36e9570051 *: concurrently begin a transaction and compile (#2393) 2017-01-05 15:00:43 +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
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
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
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
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
b0f65761bc *: clean GetTxn and finishTxn (#2248) 2016-12-14 18:37:34 +08:00
1f6737ef67 *: remove SetLease method in domain (#2149) 2016-12-12 18:26:38 +08:00
1b8051d3c5 *: set and use Flags to properly handle truncate error (#2212) 2016-12-12 11:45:58 +08:00
296f4a6cf3 util/types: refact Time introduce a TimeInternal interface (#2098)
Go time representation is not compatible with mysql, this
commit is a prepare before the code refact.

timeInternal is a interface for time representation, and it
would make the refact more smooth.
2016-11-29 21:04:59 +08:00
6ae4cfd001 *: Set the error of schema expired to retryable error (#2110)
* domain: rename an error name
2016-11-29 18:16:16 +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
5c9f073072 *: Do retry when schema is expired (#2094)
*: Do retry when schema is expired
2016-11-28 12:17:40 +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
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
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
a53c700c03 *: clean up log (#2030)
We should not print too long query into log.
2016-11-18 11:40:02 +08:00
421ceeb8fa *: make golint happy. 2016-11-15 11:12:24 +08:00
cbf024e8f7 *: clean code. (#1987) 2016-11-10 15:38:22 +08:00
5d3bb33afd util/types: fix decimal conversion. (#1979)
When datum converts to decimal, we should check the Flen and Decimal of
the given field type, return max value for overflow and round the value
for truncation.
2016-11-09 16:53:30 +08:00
a4d64c2b88 tidb: set one statement query string instead of multi-statement query string (#1950)
When user executing multi-statement query, we should set only one statement query.
2016-11-04 19:57:04 +08:00