Commit Graph

48 Commits

Author SHA1 Message Date
ec833bc4d2 *: fix some lints produced by golangci-lint (#8999) 2019-01-16 16:44:49 +08:00
00c4ff4fa9 *: refactor Executor.Next() to receive RecordBatch (#8994) 2019-01-14 15:04:36 +08:00
d6d97259ec planner/core: fix a bug that check update privilege use wrong AsName and DBName (#9003)
* Fix issue 8911
* Check privilege should use table OrigName, instead of AsName
2019-01-10 17:49:25 +08:00
084aa5a030 config: add initChunkSize config item, make chunk start with 32 (#8480) 2019-01-07 11:14:47 +08:00
164747c76b session: validate value for global time_zone sys variable (#8876) 2018-12-29 15:57:40 +08:00
44f2c2c381 Makefile: make 'make check' faster (#8755)
* remove vet check
* make lint check on $(FILES)
2018-12-21 11:12:18 +08:00
a7907ede7a *: remove fail field from TxnState (#8712)
Originally, `fail` is added to simplify error handling, avoiding large changes on
the Txn() interface API. But it turns out that `fail` becomes the root of many bugs.
So this commit remove the `fail` and make an API refactory.
2018-12-20 16:36:12 +08:00
7528a059cf executor/server/session: add extra info message sent to mysql client (#8285) 2018-12-19 15:32:49 +08:00
7056bb0d32 executor, session: refine insert unsigned bigint autoIncreID (#8181) 2018-12-18 23:01:10 +08:00
e3f3ac24f6 session: add a batch commit session variable for the large transaction (#8293) 2018-12-10 18:29:39 +08:00
ce622ec6d8 session: move more session vars to stmt context for retrying (#8034) 2018-12-10 16:39:43 +08:00
93acd10f53 *: add context.Context to NewTxn(), tiny refactor (#8530) 2018-12-06 17:45:16 +08:00
312e0f7e9d session: skip global variable cache in unit test (#8594)
If the global variable cache is used, the test code has to sleep a while
to ensure it load the fresh data. This may slow the CI
2018-12-06 16:15:03 +08:00
c137cada68 *: change golang.org/x/net/context to standard context (#8579) 2018-12-05 13:54:00 +08:00
654c6a9888 session: add GoString() for TxnState and make the log more use friendly (#8434) 2018-11-29 10:30:39 +08:00
89cd59d217 planner/core,session: fix privilege check for update (#8376)
In the statement: "update t1,t2 set t1.id = t2.id"
TiDB should check update privilege for t1 and select privilege for t2,
Fix a bug that it checks update privilege for both t1 and t2
2018-11-21 18:15:13 +08:00
3742a0d602 *: Txn() function signature refactor and remove ActivePendingTxn() (#8327)
* change Txn() function signature to Txn(active bool)
* ActivePendingTxn() is not used any more because Txn() does the work
* change executor builder getStartTS() uint64 to getStartTS() (uint64, error)
2018-11-16 11:10:39 +08:00
0c3e9c1652 session,executor: run statement without transaction (#8260)
`set @@autocommit = 0`
`select 1` // This statement should not make the session enter a transaction,
because it never need Txn().
Make txn lazy initialize
2018-11-14 20:10:58 +08:00
ce6a7150b3 executor: Support NO_AUTO_CREATE_USER sql mode (#8160) 2018-11-12 13:45:37 +08:00
508f5dd626 binlog: use pumps client to write binlog (#8070) 2018-10-27 17:52:01 +08:00
89dda9d9a8 *: move parser to a separate repository (#8036) 2018-10-25 11:12:10 +08:00
ee0d4d6c64 executor: print arguments in execute statement in log files (#7684) 2018-10-09 15:24:25 +08:00
e79bd946ed *: change package name from plan to planner (#7760) 2018-09-25 11:16:39 +08:00
5b689e8c5b server: fix insert zero timestamp bug with prepared statement (#7506) 2018-08-28 13:36:36 +08:00
98d2a03136 session:don't use utc to created a customized timezone but empty string (#7424) 2018-08-21 17:31:29 +08:00
6e7d75299d test: refine test (#7414) 2018-08-16 17:05:59 +08:00
a7fc9c323e distsql: disable read committed isolation level (#7280)
read committed isolation may cause inconsistent read.
Only Analyze request use read committed isolation level.
2018-08-06 13:07:06 +08:00
6178cfd225 *: fixed some typo. (#7277) 2018-08-05 13:50:51 +08:00
e3ba021f5a *: make system variable 'group_concat_max_len' work (#7080) 2018-07-26 20:02:56 +08:00
b5f9b35a45 plan: refactor the code of building Insert. (#7068) 2018-07-25 22:41:42 +08:00
63c4562c27 *: remove non-prepared plan cache (#7040)
* *: remove non-prepared plan cache

non-prepared plan cache is not usable if we can only do full string match.
And further development doesn't worth the effort.
2018-07-13 18:15:05 +08:00
e28a81813c *: check the schema-validity when the DDL fails (#6797) 2018-07-09 17:35:04 +08:00
490af37d1e *: add scope check when get system variables (#6958) 2018-07-03 17:12:18 +08:00
8bec188b6a session: add a global/session variable 'tidb_disable_txn_auto_retry' (#6872) 2018-06-21 17:26:14 +08:00
2219be27c5 sessionctx: make tidb_max_chunk_size as a global variable (#6585) 2018-05-22 16:45:57 +08:00
5ee28538fe session: make unit test TestErrorRollback more stable (#6486) 2018-05-08 09:06:41 +08:00
e215e93948 *: provide a configurable tidb_retry_limit session variable (#6369) 2018-05-03 19:52:53 +08:00
cd15501cf9 privilege: clean up privilege.Enable variable (#6427) 2018-04-28 07:13:23 -05:00
1376b99096 session: cache global variable for a short while (#6315) 2018-04-20 16:56:52 +08:00
5da8ac0957 *: make session variables control TiKV layer. (#6322)
And add a system variable `tidb_backoff_lock_fast` to change the backoff base time on read lock.
2018-04-20 16:06:34 +08:00
f994f4f987 *: clean up MvccStore in mocktikv (#6256)
* *: clean up MvccStore in mocktikv
2018-04-11 10:30:27 +08:00
13a7f1943c *: fix data race in plan cache (#6234) 2018-04-09 08:24:38 +08:00
6287cfb8c2 *: modify 'session transaction isolation level' to take effect once (#6175) 2018-04-04 18:39:44 +08:00
313d9d3660 parser: fix the result of cast (0x10 as binary(2)). (#6211) 2018-04-03 21:44:36 +08:00
ccf6da1a46 *: rename NextChunk to Next (#6214) 2018-04-03 20:00:30 +08:00
57afbe2680 session: upgrade mysql.db user column length to 32 (#6209)
To keep consistent with MySQL, so we won't meet this error:

tidb(127.0.0.1)> grant all privileges on test.* to 'abcddfjakldfjaldddds'@'%' identified by '';
ERROR 1406 (22001): Data too long for column 'User' at row 1
2018-04-03 05:39:50 -05:00
67f920a650 executor: Improve the aesthetics of code review (#6137) 2018-03-31 17:06:19 +08:00
f287451eed tidb: move tidb/*.go to session directory (#6062)
This change makes our top level directory clean.
2018-03-20 09:06:11 -05:00