Commit Graph

34 Commits

Author SHA1 Message Date
036e7e207d *: support new 'log' format for trace (#11681) 2019-08-09 12:43:33 +08:00
c8ed781d51 executor: push-down LoadDataStmt in distsql (#11067)
moving function `statementContextToFlags` to `StatementContext.PushDownFlags()`

Co-authored-by: Lonng <heng@lonng.org>
Co-authored-by: Foreyes <foreyes_1002@163.com>
2019-07-14 17:58:49 +08:00
e1f2b3728d *: make assertion check more reasonable (#10424)
Make sure there are no "ASSERTION fail" logs in session and executor unit test
2019-07-04 16:20:38 +08:00
d244723a5e executor: remove unused structure RecordBatch (#10891) 2019-06-26 15:26:16 +08:00
c8d1ff7ca6 *: replace 'logutil.Logger(context.Background())' with 'logutil.BgLogger()' (#10866) 2019-06-21 19:13:31 +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
373748adf7 *: support pessimistic transaction (experimental feature) (#10297) 2019-05-11 09:48:45 +08:00
e9653675dd *: remove errors.Trace in main handle path (#10033) 2019-04-04 14:27:15 +08:00
f738ba24ad executor: replace logger with zap logger (#9521) 2019-03-14 15:14:38 +08:00
3910a720df *: add assertion in kvproto to check data consistency (#9180) 2019-03-08 16:49:31 +08:00
18449d777a *: merge statement buffer when BatchGetValues (#9374) 2019-02-22 11:06:58 +08:00
00c4ff4fa9 *: refactor Executor.Next() to receive RecordBatch (#8994) 2019-01-14 15:04:36 +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
4899ce5e92 ddl: add error check in ddlCtx.buildDescTableScan (#8726) 2018-12-18 14:47:23 +08:00
c137cada68 *: change golang.org/x/net/context to standard context (#8579) 2018-12-05 13:54:00 +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
32b1dbd8d5 *: rename "github.com/pkg/errors" to "github.com/pingcap/errors" (#8136)
We import "github.com/pkg/errors" in the code, and actually put
the "github.com/pingcap/errors" there in the vendor path.
That's a dirty hack, and prevent the introduce of Go module.
2018-11-01 16:09:07 +08:00
89dda9d9a8 *: move parser to a separate repository (#8036) 2018-10-25 11:12:10 +08:00
05b37de16e *: use chunk grow for simple executor (#7540) 2018-09-27 09:07:51 +08:00
e79bd946ed *: change package name from plan to planner (#7760) 2018-09-25 11:16:39 +08:00
29441950a3 *: write system timezone into mysql.tidb in bootstrap stage. (#7638) 2018-09-14 22:15:00 +08:00
cb03f2bec1 move from juju/errors to pkg/errors (#7151) 2018-09-12 15:42:20 +08:00
7523566bc9 executor: CheckIndexRangeExec should set the types of index columns (#7376) 2018-08-14 13:33:43 +08:00
55d8eff758 executor: fix admin cleanup index for non-unique handles in a unique index (#7248)
* fix one handle to multi unique indices
2018-08-02 17:23:14 +08:00
7c18d24933 executor, store: fixed daylight saving time issue (#6823)
Thank you for working on TiDB! Please read TiDB's [CONTRIBUTING](https://github.com/pingcap/tidb/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.

## What have you changed? (mandatory)

During coprocessor dag task,  it first uses timezone `name`, if non-empty, to get legitimate timezone variable. To achieve this, we need to push down such data into tikv which leads to change the logic of building pushdown request. The logic I mentioned mainly resides in `executor` package. 

I change `timeZoneOffset` to `zone` and add second return parameter `name string`.  The intentioned of doing this to adopt the convention of `time` package. 

For the same purpose, I change `GetTimeZone` to `Location`. As you can see, in `time` package, timezone was bind to `Location`. 


## What are the type of the changes (mandatory)?
- Bug fix (non-breaking change which fixes an issue)


## How has this PR been tested (mandatory)?
unit-test
integration-test will be added shortly
2018-07-16 18:15:19 +08:00
fbba541156 *: move basic functions and definitions to model package, to make constructing dag request more easier. (#6652) 2018-05-26 20:39:22 +08:00
5c2d21eab4 *: remove function "NewChunk" (#6524) 2018-05-14 13:43:19 +08:00
12dbd32854 *: rename NewRange to Range. (#6368) 2018-04-25 13:13:04 +08:00
6ff44c7878 kv: merge batch get results to fix insert ignore in a transaction block (#6215) 2018-04-04 13:35:54 +08:00
ccf6da1a46 *: rename NextChunk to Next (#6214) 2018-04-03 20:00:30 +08:00
39a2f84231 executor: support cleanup dangling index data command (#6102) 2018-04-02 18:26:23 +08:00
98a2640286 *: support 'admin recover index' (#5980) 2018-03-15 18:04:35 +08:00
6a826fd0aa *: collect query feedback (#5909) 2018-03-12 15:37:09 +08:00
e38f406756 executor: extend ADMIN CHECK INDEX statement. (#5955) 2018-03-11 16:27:55 +08:00