Commit Graph

96 Commits

Author SHA1 Message Date
bada2801ac *: fix cop task runtime information is wrong in the concurrent executor (#19849)
Signed-off-by: crazycs520 <crazycs520@gmail.com>
2020-09-11 14:14:37 +08:00
968d0d76ae executor: cleanup useless code in batch checker (#19511)
Signed-off-by: Shuaipeng Yu <jackysp@gmail.com>
2020-09-01 12:41:52 +08:00
650be7c438 execute: add rpc runtime stats information for insert/update/replace statement (#19334) 2020-08-24 16:10:33 +08:00
1dc67745dd ddl: disallow change auto_random default value by 'ALTER COLUMN' (#19365) 2020-08-24 11:03:14 +08:00
32963d3387 *: make load data atomic by default (#18807)
Signed-off-by: Tina Fritz <tina77fritz@gmail.com>
2020-08-06 21:05:49 +08:00
931ff98df5 simple fixes for the staticcheck linter (#18923)
Note that this found 2 bugs where errors were being silently ignored.

These are really simple fixes that didn't require much thought.
There are still more staticcheck warnings that should be fixed.

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-08-06 13:38:17 +08:00
d0639b0056 *: use the newly designed memdb (#18657)
* *: use the newly designed memdb

* address comments

* remove duplicated comments

Co-authored-by: Evan Zhou <coocood@gmail.com>
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-08-03 20:51:05 +08:00
761a961ba0 kv: refactor MemBuffer and reduce the memory usage (#18372) 2020-07-15 15:26:25 +08:00
4eb9d83eae *: allow different shard_row_id prefixes in one transaction (#18181)
* *: allow different shard_row_id prefixes in one transaction

* Apply suggestions from code review

Co-authored-by: tangenta <tangenta@126.com>

* Update sessionctx/variable/session.go

Co-authored-by: tangenta <tangenta@126.com>

* add comments

* add unit test

* add var validation

* update builtinGlobalVariable

Co-authored-by: tangenta <tangenta@126.com>
2020-06-29 14:38:06 +08:00
127ad504b2 table: optimize add record used in lightning (#18102) 2020-06-24 15:18:01 +08:00
2a2c93bc68 ddl, sessionctx: make auto_random aware of auto_increment_increment (#17575) 2020-06-05 14:27:25 +08:00
d66d5028da *: support plain insert on cluster index table (#17674) 2020-06-05 13:23:43 +08:00
a3d5082094 sessionctx, executor: add session var to control explicit insertion on auto_random column (#17102) 2020-05-26 20:32:10 +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
ce923ac85d executor: only reserve the sign bit when auto_random column is signed (#15566) 2020-05-11 18:19:36 +08:00
6814f8c94b *: refactor Handle in table package (#16807) 2020-04-27 10:04:50 +08:00
7b25ce0d94 *: support auto_random table option (#16750) 2020-04-24 23:14:51 +08:00
d901863643 executor: insert negative primary key into auto_random table won't trigger rebase (#15397) 2020-04-15 20:56:37 +08:00
c81e903804 *: use the revertable sandbox to buffer mutations (#15931) 2020-04-03 14:54:27 +08:00
3ced6bc9ac dml: support default expression cache when insert (#15216) 2020-03-19 10:51:22 +08:00
1ff32ace27 executor: use MySQL compatible truncate error code (#15422) 2020-03-18 12:28:43 +08:00
4adff06b99 executor: reduce task queue size to reduce memory consume for load statement (#15369) 2020-03-14 20:23:53 +08:00
88dd552a6d *: fix autoid allocation to avoid quickly exhaustion (#15261) 2020-03-13 10:50:03 +08:00
b504d37924 *: refine the table.Table interface (#15227)
remove unnecessary methods.
"The bigger the interface, the weaker the abstraction -- Rob Pike"
2020-03-10 13:40:56 +08:00
55b3e1110c *: reduce the allocation caused by Datum.Copy (#15219) 2020-03-09 17:38:46 +08:00
dcb8b3d5dd executor: fix last_insert_id in auto_random mode (#15145) 2020-03-05 15:59:18 +08:00
a528e60e3b *: add auto_random id cache for statement retrying and table recover (#14711) 2020-02-19 18:53:03 +08:00
007c0e6656 *: support default expression value for sequence (#14589) 2020-02-13 18:50:33 +08:00
870d4b19c8 *: support auto_increment_increment & auto_increment_offset. (#14301) 2020-01-08 10:18:39 +08:00
ebc4fa9dee executor: resort fields for reducing the memory allocated (#14208) 2019-12-31 17:19:59 +08:00
c1bc9ffe5b *: add memory tracker for InsertExec and ReplaceExec (#14179) 2019-12-30 11:43:01 +08:00
86ae838d5a planner/core: disallow using hidden column in insert statement (#14150) 2019-12-26 16:08:55 +08:00
fce9870208 ddl,executor: add auto_random column option (#13127) 2019-12-23 14:51:51 +08:00
d587c63062 *: some tiny improvements for the large transaction (#13815)
1. Set the default txn size limit to 1G
2. Reduce memory footprint during insert for the large txn
3. Recycle the session buffer memory to avoid leak
4. Set rate limit to avoid 2PC prewrite overloads the TiKV
5. Start ttlManager for the large txn
2019-12-03 00:40:40 +08:00
a1dc0477a5 types: add error code for package types (#13300) 2019-11-26 19:45:14 +08:00
380216ed20 planner: Fixup error when assign DEFAULT in `INSERT/UPDATE/R… (#13211) 2019-11-19 18:23:02 +08:00
26174f11b5 *: disable batch DMLs by default (#13081) 2019-11-07 19:59:15 +08:00
36f0f37b40 expression, planner: remove some fields from `expression.Colum… (#12573) 2019-10-29 15:48:26 +08:00
01cddf63d9 dml : Multiple rows insert in a statement should have consecutive autoID if needed. (#11876)
* consecutive id

* add AllocN interface func for util/kvencoder/allocator.go

* fix allocN test

* fix allocN tests

* fix allocN test 1

* fix allocN test 2

* fix allocN test 3

* fix allocN test 4

* fix cache

* add auto consecutive increment id in insert executor

* add auto consecutive increment id comment in insert executor

* try fix test case

* fix session_test.TestAutoIncrementID autoid overflow

* fix session_test.TestAutoIncrementID unsighed autoid overflow

* fix autoid usigned computing overflow

* fix conflict with suli's PR

* fix index out of range

* merge similar function

* delete fillRowLazy

* fix commment

* fix bug of rebase

* fix auto.go maxUint64 will be allocated

* fix maxInt64 autoid allocated

* fix batch rowIdx update

* add maxUint64 and maxInt64 limit in allocN

* reconstruct the autoid lazy alloc

* fix format

* remove commnet

* use new kind of logutil.logger(ctx) instead of logutil.BgLogger()

* combine alloc() and allocN together

* remove cache of hasValue

* remove cache of hasValue

* remove cache of hasValue

* remove cache of hasValue

* add test : autoID can find in retryInfo

* add test : autoID can find in retryInfo

* extract retry logic

* extract retry logic

* Update executor/insert_common.go

Co-Authored-By: bb7133 <bb7133@gmail.com>

* Update executor/insert_common.go

Co-Authored-By: bb7133 <bb7133@gmail.com>

* fix comment

* fix comment

* fix comment

* fix comment

* fix comment

* return min and max instead of slice in alloc autoid

* return min and max instead of slice in alloc autoid

* return min and max instead of slice in alloc autoid

* add comment for alloc N
2019-10-10 10:34:44 +08:00
41ac571d7b *: remove the LightningMode from TiDB (#12466) 2019-09-29 15:12:01 +08:00
20dc99995a executor: clean up the batch checker code (#12338) 2019-09-24 19:02:45 +08:00
213b783dc6 executor: do not use batchChecker in 'insert ignore into ...' (#12122) 2019-09-10 19:42:00 +08:00
1ef81a8620 *: replace word error in warning, info, debug logs (#12050) 2019-09-09 18:51:12 +08:00
dbdb2f4331 dml : fix last insert id when autoid specified by user in first row. (#11973) 2019-09-02 21:44:35 +08:00
bb84d1bdba planner: allow insert default into generated columns (#11901) 2019-08-30 17:45:40 +08:00
4cd5d15d97 *: improve plan cache param eval and insert const (#10746) 2019-08-27 11:11:01 +08:00
d210889a6c *: trace the execution of the insert operation (#11667) 2019-08-09 14:22:03 +08:00
036e7e207d *: support new 'log' format for trace (#11681) 2019-08-09 12:43:33 +08:00
28c0b1d226 executor: tiny refactor the insertRows function (#11643) 2019-08-07 21:28:44 +08:00