Commit Graph

40 Commits

Author SHA1 Message Date
bca433fcab planner: remove pickFromBucket field in LRUPlanCache (#40668)
ref pingcap/tidb#36598
2023-01-28 16:41:53 +08:00
f7de8beede *: remove the support of the old ddl framework (#39684)
ref pingcap/tidb#39824
2022-12-30 18:30:18 +08:00
75efe687ed ddl: forbid disabling concurrent DDL if MDL is enabled (#39301)
close pingcap/tidb#39131
2022-11-22 18:21:58 +08:00
510003d1f6 planner: add switch for plan cache memory trace (#38824)
ref pingcap/tidb#37632
2022-11-03 15:26:00 +08:00
c4638b70fd *: support metadata lock (#37393)
ref pingcap/tidb#37275
2022-09-18 20:57:00 +08:00
b2723bf8ff planner: replace simple LRU with plan cache LRU (#37423)
ref pingcap/tidb#36598
2022-09-05 13:32:55 +08:00
244b353a11 planner: support session level for the variable tidb_enable_prepared_plan_cache (#36923)
ref pingcap/tidb#36598
2022-08-08 11:18:47 +08:00
xhe
9a16a8dd19 *: replace defer clean with t.Cleanup (#36722)
close pingcap/tidb#36721
2022-08-01 17:34:05 +08:00
15009a7c4e *: clean code (#36655) 2022-07-28 15:09:11 +08:00
25d777df8c expression: fix extract day_microsecond/second/minute/hour from datetime (#36367)
close pingcap/tidb#36358
2022-07-21 01:53:08 +08:00
ab513bf0ca ddl: support concurrent ddl (#32169)
* 1. init ddl tables

create tidb_ddl_job, tidb_ddl_reorg, tidb_ddl_history tables with raw meta write, these 3 tables is use to replace the ddl job queue and reorg and history hash table

* 2. setup concurrent ddl env and add ddl worker pool

adds the ddl worker pool definition, the ddl job manager will find a job and ship it to a worker in the worker pool.
Also, this commit provides a sessionctx wrapper, only use in ddl relate. it just wraps begin, commit and execute

* 3. add ddl manager to handle ddl job

* 4. reorg handler for concurrent ddl

just implements the partner of the reorg information.

* 5. manage ddl jobs for concurrent ddl

add the partner of add job, delete job and many others related to history job
because many of the functions need a session now, we just change the caller

* 6. add metrics for concurrent ddl

add metrics

* 7. support multiple tables

* 8. fix test

* 9. migrate ddl between table and queue

support switch between the old and new ddl framework, migrate the existing ddl job between queue and table

* 10. check tikv version and set reorg worker count according cpu count

* *: add featuretag on tests

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

* use a determined table id for 3 tables

* remove ctx value

* add GetSchemaVersionWithNonEmptyDiff function

* address tangenta and zimulala comment

* use only one etcd path

* make ActionRenameTable support multi-schema

* reset sql digest to make top sql work correct

* add comment

* fix test

* remove 0 for schema version lock

Co-authored-by: xiongjiwei <xiongjiwei1996@outlook.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Co-authored-by: wjHuang <huangwenjun1997@gmail.com>
2022-07-20 21:20:07 +08:00
51b8884fea expression: fix the issue that extracting day_microsecond/day_second/day_minute/day_hour from Time type emits wrong result (#36297)
close pingcap/tidb#34998
2022-07-19 19:07:07 +08:00
e3cb4bdb27 expr: fix unix_timestamp range check (#35239)
close pingcap/tidb#32197
2022-06-22 17:42:37 +08:00
cd731af05a expression, util: add KeyWithoutTrimRightSpace for collator (#35475)
close pingcap/tidb#35451
2022-06-20 14:56:37 +08:00
4ae78cdead expression: refine date_add/sub return type and precision (#35009)
close pingcap/tidb#9813, close pingcap/tidb#31799, ref pingcap/tidb#31867
2022-06-16 16:12:34 +08:00
7ffab33a47 variables: add concurrent DDL switch (#35028)
ref pingcap/tidb#32031
2022-06-06 14:56:29 +08:00
8133329043 fix(cast): check cast as datetime with precision of fractional seconds part (#34968)
close pingcap/tidb#34713
2022-06-01 00:14:27 +08:00
a3f283b9d6 planner: enable prepared plan-cache by default and update the default cache capacity (#34818)
close pingcap/tidb#34724
2022-05-19 18:02:39 +08:00
6d8669e987 *: Add support for GET_LOCK() / RELEASE_LOCK() / RELEASE_ALL_LOCKS() (#33947)
close pingcap/tidb#14994
2022-04-29 23:12:53 +08:00
c56c036d2a *: refactor placement bundle in infoschema (#33967)
close pingcap/tidb#33968
2022-04-15 11:04:35 +08:00
97902f1d5d expression: make test TestPreparePlanCacheOnCachedTable more stable (#33317)
close pingcap/tidb#33314
2022-03-23 19:28:33 +08:00
0f343d3a40 expression, types: use time.Add() to calculate subtime (#32903)
close pingcap/tidb#31868
2022-03-16 12:55:52 +08:00
22f4c33d40 *: better handle sysvar upgrades from older versions (#31583)
close pingcap/tidb#31538
2022-03-10 23:59:51 +08:00
2b94ca07ed *: cleanup usage of testutil.RowsWithSep (#32859)
close pingcap/tidb#32858
2022-03-07 11:49:48 +08:00
90f4c5d12b expression: support push down tikv supported functions (#32348)
ref pingcap/tidb#31846
2022-02-16 11:11:40 +08:00
2f0c23da24 executor: migrate test-infra to testify for stale_txn_test (#32285)
close pingcap/tidb#28618
2022-02-14 16:49:38 +08:00
1cf4fcfa73 *: support prepared plan cache for cached table (#32139)
close pingcap/tidb#32003
2022-02-14 12:29:37 +08:00
3738dec53e *: enable the new collation by default (#32016)
ref pingcap/tidb#32015
2022-02-08 12:53:35 +08:00
955b688e8b expression: support push down tikv supported functions (#31983)
ref pingcap/tidb#31846
2022-01-29 14:53:13 +08:00
f2dba0e14e *: migrate some collation tests to explain test (#31993)
ref pingcap/tidb#31625
2022-01-26 19:32:46 +08:00
4ae96872ff planner: do not use like to build range when new collation is enabled (#31278)
close pingcap/tidb#31174
2022-01-22 00:09:47 +08:00
xhe
1ffd6c0738 sysvar: bypass validation for noop variables (#31566)
close pingcap/tidb#31538
2022-01-11 22:43:42 +08:00
5af7685c20 planner: don't handle collation in in expression if it contains a row function. (#31274)
close pingcap/tidb#31273, close pingcap/tidb#31300
2022-01-06 18:42:37 +08:00
80527cbbc0 planner: do not cache the tableDual plan (#31290)
close pingcap/tidb#31280
2022-01-05 19:48:36 +08:00
397eb725ea expression: make some datetime functions' behavior consistent with MySQL (#31078)
close pingcap/tidb#30683
2022-01-05 16:22:36 +08:00
d9d89d69d1 expression: fix nil pointer dereference for case expression (#30479)
close pingcap/tidb#30245
2022-01-05 10:18:35 +08:00
416617eb9c planner: fix wrong collation when rewrite in condition (#30492)
close pingcap/tidb#30486
2021-12-21 20:47:46 +08:00
9a074f1dbe *: use the real StateRemote interface implementation for cached table (#30066) 2021-12-10 16:55:57 +08:00
ed384b2a09 expression: migrate test-infra to testify for integration_test.go (#30548) 2021-12-10 11:59:57 +08:00
6eb14e0e8d expression: make some unstable test serial (#30323) 2021-12-07 16:05:55 +08:00