Commit Graph

324 Commits

Author SHA1 Message Date
6d51ad33fd *: Optimize struct memory usage by adjust field order (#11629) 2019-08-13 17:20:53 +08:00
140718d230 executor: fix auto retry when transaction has select for update (#11714) 2019-08-12 16:32:15 +08:00
02ab1ed7ee executor,session: display the tree-like format of the trace statement (#11633) 2019-08-06 14:18:31 +08:00
265b654809 model: add schema name, table name to ddl job. (#11561) 2019-08-05 17:30:23 +08:00
cffd04518c executor: no need to wait for fetchInnerRows if buildHashTableForList fails, and clean code (#11571) 2019-08-02 17:07:43 +08:00
ea16273d44 executor: fix baseExecutor'children may not close (#11570) 2019-08-02 10:50:07 +08:00
576cdcdd0d executor: fix data race of "admin check table" (#11568) 2019-08-01 18:52:59 +08:00
59e3eb75cd *: speed up the operation of "admin check table" (#8572) 2019-07-31 17:11:30 +08:00
da8e7d267c executor: refactor union_scan executor by using txn_mem_buffer_reader (#10673) 2019-07-30 17:40:33 +08:00
1e1cc1f325 types: fix string to integer cast (#11295) 2019-07-26 19:10:30 +08:00
abbca5375e *: add trace support for subquery (#11182)
Test pass, auto merge by Bot
2019-07-24 19:03:47 +08:00
d244723a5e executor: remove unused structure RecordBatch (#10891) 2019-06-26 15:26:16 +08:00
dc378a2cff executor: tiny refactor the runtimeStats collection code (#10917) 2019-06-24 14:09:31 +08:00
8183f35563 executor: tiny clean up (#10875)
code refactor for the tracing related code
2019-06-20 16:35:59 +08:00
421de5ef20 executor,server: re-implement the kill statement by checking the Next() function (#10841) 2019-06-20 11:03:21 +08:00
f6be085bc6 executor: tiny refactor the Executor interface (#10846)
Introduce a base() method to get the baseExecutor, so we don't need to add
method from baseExecutor to the Executor interface any more

Before:
```
type Executor interface {
	Open(context.Context) error
	Next(ctx context.Context, req *chunk.RecordBatch) error
	Close() error
	Schema() *expression.Schema

	retTypes() []*types.FieldType
	newFirstChunk() *chunk.Chunk
}
```

After:
```
type Executor interface {
        base() *baseExecutor
	Open(context.Context) error
	Next(ctx context.Context, req *chunk.RecordBatch) error
	Close() error
	Schema() *expression.Schema
}
```
2019-06-19 15:55:28 +08:00
b0d6c5b35b *: print an expensive query log when a query is out of memQuota (#10799) 2019-06-18 16:18:48 +08:00
7bf3d69313 *: split index region with lower upper syntax (#10409) 2019-06-06 10:47:24 +08:00
08e4bd988f store/tikv: support single statement rollback for pessimistic transaction (#10654) 2019-06-05 13:40:12 +08:00
c4db7b7655 planner, executor: fix show view privileges for explain (#10585) 2019-05-27 13:22:28 +08:00
373748adf7 *: support pessimistic transaction (experimental feature) (#10297) 2019-05-11 09:48:45 +08:00
7ecb3159a6 *: add split index region syntax (#10203) 2019-05-06 17:41:50 +08:00
0b037aadf6 Fix incorrect "Internal" display in admin show slow output (#10338) 2019-05-05 23:28:42 +08:00
718871646b executor: reduce alloc and lock-hold-time caused by err/warn count (#10223) 2019-04-24 09:51:02 +08:00
5fcc7e2a61 executor: tiny clean up by removing unnecessary string creation (#10213)
* executor: clean up by remove unnecessary string creation
* check if id is nil
2019-04-22 15:32:15 +08:00
d6396daa77 *: lazy eval explain id and tracker label (#10139) 2019-04-22 14:23:33 +08:00
70c37188ac executor: fix bad null error handling for insert statement when disabling the strict SQL mode (#10161) 2019-04-21 15:53:47 +08:00
e9653675dd *: remove errors.Trace in main handle path (#10033) 2019-04-04 14:27:15 +08:00
6125f49baf *: fix the read-only check for the prepare/execute statement (#9723) 2019-04-01 13:27:49 +08:00
f738ba24ad executor: replace logger with zap logger (#9521) 2019-03-14 15:14:38 +08:00
e3983227b4 log: generate digest and log it in slow log (#9662) 2019-03-14 13:45:32 +08:00
52c8267a73 *: tiny refactor, more go idiom (#9660) 2019-03-12 14:12:56 +08:00
3e0f51b474 executor: control Chunk size for Selection&Projection (#9398) 2019-02-26 14:24:30 +08:00
5a283a98dd plan/executor: make semi joins null and empty aware (#9051) 2019-02-25 15:42:38 +08:00
789f7006ac Control the number of rows in chunks returned by LimitExec (#9354) 2019-02-19 18:21:55 +08:00
40fa006cac *: collect coprocessor runtime stats for explain analyze (#9057) 2019-02-19 16:22:00 +08:00
47ea05d017 executor,planner: adjust the result of 'admin show ddl' (#9020) 2019-01-16 18:02:55 +08:00
ec833bc4d2 *: fix some lints produced by golangci-lint (#8999) 2019-01-16 16:44:49 +08:00
f20c849857 types: support sql_mode ALLOW_INVALID_DATES (#9027) 2019-01-14 19:34:22 +08:00
00c4ff4fa9 *: refactor Executor.Next() to receive RecordBatch (#8994) 2019-01-14 15:04:36 +08:00
68ddb7f0e6 *: fix the lower bound when converting numbers less than 0 to unsigned integers (#8544) 2019-01-10 16:04:07 +08:00
084aa5a030 config: add initChunkSize config item, make chunk start with 32 (#8480) 2019-01-07 11:14:47 +08:00
bd69b15e79 *: add the error check (#8770) 2018-12-24 22:22:00 +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
18b2a7884b admin: only check public index (#8748) 2018-12-19 17:05:07 +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
c137cada68 *: change golang.org/x/net/context to standard context (#8579) 2018-12-05 13:54:00 +08:00
6fb260f8a6 *: redesign trace statement with json output (#8357) 2018-11-21 13:50:18 +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