Commit Graph

115 Commits

Author SHA1 Message Date
cbb6f4e64c *: add global system variable tmp_table_size (#24827) 2021-06-09 18:48:30 +08:00
24c9df147d *: refactor table.Table interface, clean up unnecessay methods (#22430) 2021-03-02 19:48:54 +08:00
68aaa2fa7e *: fix auto-id allocate tracing (#22371) 2021-01-13 12:19:58 +08:00
2905b0defb *: modify autoid allocator's Alloc() method, add context and tracing (#21617) 2020-12-10 17:24:21 +08:00
c218c58218 *: support select from tablesample (#20883) 2020-12-03 16:46:18 +08:00
2f067c0542 *: redact arguments for Error (#20436) 2020-10-21 14:44:08 +08:00
5738191a23 *: clean some stuff related to dirtyTable (#20554)
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
2020-10-21 12:19:26 +08:00
3f6f36f742 *: refactor table.IterRecord and extract some methods (#18214)
* *: refactor table.IterRecord and extract some methods

* fix ci test

* fix ci test

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-06-29 09:24:34 +08:00
c2c02cde4b *: support record kv/pd time for a SQL statement (#17591) 2020-06-18 21:17:48 +08:00
7847cfdcca planner, ddl: fix a bug delete data on delete-only state column (#17048) 2020-06-18 14:17:01 +08:00
c60ea27e6c *: fix partition selection for the update statement (#17285) 2020-05-20 13:05:44 +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
64f339f1cc table: clean up useless code (#15657) 2020-03-26 09:53:38 +08:00
88dd552a6d *: fix autoid allocation to avoid quickly exhaustion (#15261) 2020-03-13 10:50:03 +08:00
9f0736ee8b errno: move the error code from the parser/mysql to tidb/errno (#15277) 2020-03-11 15:40:21 +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
b3469e7964 *: fix a bug that the pessimistic lock doesn't work on a partition (#14921)
physicalID should be used if 'select for update' works on a
partitioned table.
2020-03-03 15:06:45 +08:00
0bbf1d954c *: implement the sequence allocator logic. (#14829) 2020-02-26 15:45:38 +08:00
344c48d3b4 *: change field name 'password' to 'authentication_string' in mysql.user (#14598) 2020-02-19 11:58:42 +08:00
1d9ed45b37 *: support virtual generate column substitute optimization (#14367) 2020-02-10 16:01:05 +08:00
465af00b46 *: use new registrable terror (#14606) 2020-02-06 16:40:26 +08:00
870d4b19c8 *: support auto_increment_increment & auto_increment_offset. (#14301) 2020-01-08 10:18:39 +08:00
fce9870208 ddl,executor: add auto_random column option (#13127) 2019-12-23 14:51:51 +08:00
42adca989e tables: basic support for hidden column (#13908) 2019-12-17 21:48:46 +08:00
7ccbdc12b3 tables: remove struct Table (#13877)
* done

* fix typo

* fix typo
2019-12-04 15:19:38 +08:00
5b6422df58 *: support read remote TiDB memory table of cluster (#13065) 2019-12-04 13:05:36 +08:00
dcbb5a162a table: format table error code and error message (#13233) 2019-12-03 19:59:39 +08:00
6b7e19ab41 extract a LogicalMemTable from DataSource to decouple memory/stored tables (#13741)
Signed-off-by: Lonng <heng@lonng.org>
2019-11-27 10:19:17 +08:00
71e19a7308 Allocate continuous row id for single INSERT statement (#13648) 2019-11-22 16:22:08 +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
fb683bef2c executor: refactor union scan and dirty table (#11702) 2019-09-12 10:00:45 +08:00
66f5754c68 *: add trace support for the AllocAutoIncrementValue function (#11158) 2019-07-10 15:07:42 +08:00
ff82b62b97 *: refactor the optional arguments for table.AddRecord and index.Create (#11018) 2019-07-02 15:51:29 +08:00
612936bbd4 *: Support LOCK/UNLOCK TABLES feature (#10343) 2019-06-18 15:38:04 +08:00
7d27fa63d3 ddl, table: allow using SHARD_ROW_ID_BITS with auto_incremental columns (#10759) 2019-06-12 20:43:29 +08:00
f73c4e2d58 table: fix error code different from mysql "error 1604 : locate partition failed" (#9294) 2019-02-14 16:53:16 +08:00
3c98f69266 *: support select partition for partition table (#8990) 2019-01-14 20:55:52 +08:00
1232db5590 planner/core: add DefaultExpr support for expressionRewriter (#8540) 2019-01-02 23:36:36 +08:00
b3698f6670 executor: fix panic and update error data when table has column in write only state (#8792) 2019-01-02 15:49:39 +08:00
e06c87d3c1 add an option for AddRecord and Create (#8884) 2019-01-02 11:30:53 +08:00
89dda9d9a8 *: move parser to a separate repository (#8036) 2018-10-25 11:12:10 +08:00
bbec68304e executor,table: support replace operation for table partition (#7309) 2018-08-16 13:28:50 +08:00
82a6c1085c *: introduce the concept of physical ID, code refactory (#7374) 2018-08-16 10:33:24 +08:00
1f8710762d execute/insert: refine data truncate error msg (#7401) 2018-08-16 00:02:45 +08:00
f6dbad0f5c *: move the dirty table modification to table package (#7289) 2018-08-07 15:38:01 +08:00
6dc3f94393 table: Add a new interface in table.Table (#7167)
In some cases, We need to get the PartitionID instead of the TableID. So
we should call GetID() instead of Meta().ID.
2018-07-27 11:22:52 +08:00
26a0338ed5 table: table and partition refactor (#6963)
* let partition and table share the common code
* introduce a new PartitionedTable
2018-07-10 00:32:36 +08:00
ab332eba2a executor: BadNullError should be ignored by insert ignore statement (#6465) 2018-06-29 13:15:31 +08:00
9ec13e8898 table/tables: modify AddRecord to handle table partition (#6684)
If table partition is used, AddRecord will add records to the
partition, according to the partition definitions.
2018-06-11 11:06:36 +08:00