Commit Graph

64 Commits

Author SHA1 Message Date
8a661044ce multi-query prefetch support pessimistic transaction (#18439)
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-07-10 18:47:56 +08:00
6fa2badf38 util: move codec logic into tablecodec package (#18173)
* move codec logic into tablecodec package

* add key generation using physical table id

* remove using prefix

* change comment

* fix conclict

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-06-24 17:43:10 +08:00
7daa4a7f88 *: fix bugs that creating index on clustered index table or table with the virtual generated column (#18114) 2020-06-19 19:58:37 +08:00
fa551115e6 *: fix update bug in cluster index (#18045) 2020-06-16 17:06:26 +08:00
05b2e2bdcc *: refactor Execute() and clean up code (#17678)
- implement Execute using ExecuteStmt
- Execute is only for internal usage and accept only one statement
- clean up the old execute function
2020-06-09 13:58:39 +08:00
88dfb22dc5 executor: support batch-get cluster index & add test case (#17858) 2020-06-09 13:40:47 +08:00
73c4673f30 *: support update/delete/insert ignore/duplicate update in single cluster index table (#17721) 2020-06-08 20:55:31 +08:00
d66d5028da *: support plain insert on cluster index table (#17674) 2020-06-05 13:23:43 +08:00
39fe08ab58 store/mockstore: make unistore the default mockstore (#17558) 2020-06-01 18:45:15 +08:00
3176b00c02 executor: fix the issue that UNIQUE constraint on boolean column results in an incorrect result in a comparison (#17245) 2020-05-20 13:55:18 +08:00
1417ba2288 *: fix a bug that don't handle truncate properly for virtual generated column (#17217) 2020-05-14 20:57:55 +08:00
526a711c67 session, tikv: allocate task IDs for distsql requests (#16520) 2020-05-13 11:47:05 +08:00
5d74cf582d executor: fix unique index point get read with delete first (#16965) 2020-05-04 22:11:56 +08:00
51dabaabef *: refactor Handle in executor package (#16871) 2020-04-28 21:27:19 +08:00
6814f8c94b *: refactor Handle in table package (#16807) 2020-04-27 10:04:50 +08:00
35a801bc9b txn: fix read val from lock cache from RC (#16771) 2020-04-24 10:24:49 +08:00
af376db3dc *: refactor Handle in tablecodec and rowcodec (#16705)
Co-authored-by: pingcap-github-bot <sre-bot@pingcap.com>
2020-04-23 18:55:59 +08:00
cad52c1f6e *: do not lock the non-exists keys in RC isolation (#15803) 2020-03-31 11:11:12 +08:00
5282d089c7 executor: support generated column on point get and batch point get (#15544) 2020-03-23 14:21:35 +08:00
53e5197b02 executor: reuse transaction snapshot if applicable (#15400) 2020-03-16 18:25:54 +08:00
1b7cc5daa3 executor: rename startTS to snapshotTS in executor builder (#15396) 2020-03-16 14:10:24 +08:00
f96884af93 *: fix BatchPointGet return empty value for already locked key. (#15365) 2020-03-14 18:43:31 +08:00
248be5bba5 planner: push down Lock to PointGet and BatchPointGet (#15257) 2020-03-11 13:58:32 +08:00
82ca1f3f44 *: support pessimistic lock return values (#15063) 2020-03-03 15:11:17 +08:00
41142266b2 *: use SetString() for string instead of SetBytes() (#14989) 2020-03-02 15:48:10 +08:00
7fa56616f8 executor: refactor the tso future in RC isolation (#14966) 2020-03-02 15:38:10 +08:00
eb12799152 *: Collation should be set accordingly when setting string datum (#14757) 2020-02-20 23:01:53 +08:00
b6aca51d52 plan, partition: support point get plan on hash partition table (#14318) 2020-01-10 10:23:29 +08:00
0bab73adf5 *: use new row-format in tidb (#12634) 2020-01-02 22:34:39 +08:00
1335ffb6b7 *: support read consistency isolation level in the pessimistic transactions (#14087) 2019-12-24 21:24:39 +08:00
438d39ebcd *: revert #10124 and remove sql mode PadCharToFullLength (#14007) 2019-12-17 15:25:06 +08:00
a94cff903c *: refactor LockKeys API (#14020) 2019-12-11 15:05:59 +08:00
94481e883d session: if txn invalid do not active it and return an error (#13935) 2019-12-09 13:41:09 +08:00
f12403ef08 executor: support select for update no wait (#12775) 2019-11-04 17:01:40 +08:00
e8294ad636 executor: try to cache executor for prepared point select (#12855) 2019-10-30 10:23:18 +08:00
e173c7f5c1 executor: add several sql hint related to session variables (#11809) 2019-09-17 13:39:16 +08:00
2addc25984 planner: use BatchPointGet to improve SELECT ...WHERE IN performance (#11750) 2019-08-20 19:10:35 +08:00
523b93651d Add follower read support to TiDB (#11347) 2019-08-16 13:26:17 +08:00
140718d230 executor: fix auto retry when transaction has select for update (#11714) 2019-08-12 16:32:15 +08:00
d210889a6c *: trace the execution of the insert operation (#11667) 2019-08-09 14:22:03 +08:00
0ba4d0b41b executor: fix bug of point get when meet null values (#11219) 2019-07-12 14:11:14 +08:00
08d821931d executor: fix point get snapshot TS for pessimistic transaction. (#11012) 2019-07-01 19:26:25 +08:00
0d984d8ffc executor: locks key in point get executor for pessimistic transaction (#10972) 2019-06-28 14:06:43 +08:00
d244723a5e executor: remove unused structure RecordBatch (#10891) 2019-06-26 15:26:16 +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
b6cf05a4b2 planner, executor: return TableDual when tryFastPlan is promised to be false (#10676) 2019-06-04 14:31:10 +08:00
998a6ebee4 executor: fix point get -1 return max.uInt64 value (#10113) 2019-05-22 19:49:15 +08:00
ba7134d4e9 executor: correct range calculation for CHAR column (#10124) 2019-05-14 16:15:31 +08:00
373748adf7 *: support pessimistic transaction (experimental feature) (#10297) 2019-05-11 09:48:45 +08:00
667124bd91 executor: refine point get failpoint injection logic (#10319) 2019-04-30 17:59:23 +08:00