Commit Graph

1867 Commits

Author SHA1 Message Date
2bdcc3e5ca build(deps): bump golang.org/x/text from 0.7.0 to 0.8.0 in /parser (#41964) 2023-03-07 14:13:12 +08:00
7cd2029773 session: support set current session's resource group name (#41722)
ref pingcap/tidb#38825
2023-03-06 23:29:11 +08:00
17bbc2961b *: support resource_group sql hint (#41678)
* *: support resource_group sql hint

Signed-off-by: BornChanger <dawn_catcher@126.com>

* *: refine case

Signed-off-by: BornChanger <dawn_catcher@126.com>

* *: make case stable

Signed-off-by: BornChanger <dawn_catcher@126.com>

* *: code format

Signed-off-by: BornChanger <dawn_catcher@126.com>

* *: relocate the cases

Signed-off-by: BornChanger <dawn_catcher@126.com>

* *: fix bazel attribute

Signed-off-by: BornChanger <dawn_catcher@126.com>

* *: fix bazel

Signed-off-by: BornChanger <dawn_catcher@126.com>

* *: code fmt

Signed-off-by: BornChanger <dawn_catcher@126.com>

* *: code format

Signed-off-by: BornChanger <dawn_catcher@126.com>

* *: address comments

Signed-off-by: BornChanger <dawn_catcher@126.com>

* *: address comments for 2nd round

Signed-off-by: BornChanger <dawn_catcher@126.com>

* *: polish check logic

Signed-off-by: BornChanger <dawn_catcher@126.com>

---------

Signed-off-by: BornChanger <dawn_catcher@126.com>
2023-03-06 18:34:13 +08:00
00ccee238a parser: Add special formatter for extract(unit FROM date) (#41875)
close pingcap/tidb#41800
2023-03-04 11:13:10 +08:00
04fefc97e6 load data: add with options (#41890)
ref pingcap/tidb#40499
2023-03-03 21:21:23 +08:00
4887a2a929 build(deps): bump github.com/stretchr/testify from 1.7.0 to 1.8.2 in /parser (#41742) 2023-03-02 17:33:10 +08:00
cccada395a build(deps): bump github.com/go-sql-driver/mysql from 1.6.0 to 1.7.0 in /parser (#41744) 2023-02-27 20:05:08 +08:00
87702f8dbc ddl: remove unused field and clean comments (#41757) 2023-02-27 17:23:08 +08:00
a47f8041b5 parser/model: move reorg related types to a new file (#41747) 2023-02-27 15:41:07 +08:00
69f963b516 build(deps): bump golang.org/x/text from 0.3.7 to 0.7.0 in /parser (#41743) 2023-02-27 12:11:08 +08:00
8b14c36f14 build(deps): bump go.uber.org/zap from 1.18.1 to 1.24.0 in /parser (#41741) 2023-02-27 11:55:08 +08:00
484aa036f9 domain: support extract plan task handle (#41600)
* Revert "parser: support plan change capture collect stmt (#41478)"

This reverts commit 301a024ebca317e54124eb71b0afbfb399149e79.

* support extract worker

support extract worker

support extract worker

fix lint

fix lint

add test

add test

* add test

add test

* add test

* add test

* address the comment
2023-02-22 11:59:49 +08:00
9e120b68ce executor: implement NULL DEFINED BY for LOAD DATA (#41541)
ref pingcap/tidb#40499
2023-02-20 20:43:05 +08:00
c987515367 *: upgrade go 1.20.1 (#40965)
ref pingcap/tidb#40969
2023-02-20 17:49:05 +08:00
301a024ebc parser: support plan change capture collect stmt (#41478)
ref pingcap/tidb#41130
2023-02-20 10:31:05 +08:00
8497f7d32b parser: add NULL DEFINED BY and FORMAT to LOAD DATA (#41332)
ref pingcap/tidb#40499
2023-02-15 18:02:02 +08:00
0e3f5a8f5f *: bazel upgrade shard_count (#41417) 2023-02-15 12:10:01 +08:00
ee8ad52afa planner: fix tiflash cannot find generated column (#41261)
close pingcap/tidb#40663
2023-02-13 17:28:03 +08:00
79ae1e3c1f *: update bazel config (#41296) 2023-02-13 14:38:01 +08:00
696d7d06e9 *: REORGANIZE PARTITION (#38535) (#41096)
close pingcap/tidb#38535
2023-02-11 20:28:00 +08:00
48bc046fe1 executor: support plan replayer capture remove task (#41258)
close pingcap/tidb#41262
2023-02-11 12:04:02 +08:00
8531018f04 ddl: improve backfill more general (#41093)
close pingcap/tidb#41002
2023-02-10 23:52:00 +08:00
278a9fec2a ddl: Improve ErrTooLongKey message (#41270)
Prefix indexes are specified in characters while this error message
returns a limit in bytes. By adding the byte length in the message this
is makes it easier to understand.

This would deviate a little bit from the message in MySQL.

Before:
```
sql> CREATE TABLE t1(id int primary key, c1 text, key(c1(1000)));
ERROR: 1071 (42000): Specified key was too long; max key length is 3072 bytes
```

After:
```
sql> CREATE TABLE t1(id int primary key, c1 text, key(c1(1000)));
ERROR: 1071 (42000): Specified key was too long (4000 bytes); max key length is 3072 bytes
```
2023-02-10 11:57:11 +01:00
a22d690fda ddl, model: support for dist-reorg on partitioned tables (#41145)
close pingcap/tidb#41144
2023-02-09 23:54:08 +08:00
495e225dc7 ddl: fix data race on job.SetWarnings (#41231)
close pingcap/tidb#40751
2023-02-09 21:26:41 +08:00
1140b7c3b1 *: remove ru token in resource group schema and set brust limit (#41174)
ref pingcap/tidb#38825
2023-02-09 06:55:59 +08:00
85c48edbb6 placement: supports survival preferences (#40613)
close pingcap/tidb#38605
2023-02-08 17:51:59 +08:00
3f0964ff9d ddl: disable raw mode resource group (#41050)
close pingcap/tidb#41049
2023-02-08 14:09:59 +08:00
391c551258 parser: move LOAD DATA REMOTE into LOAD DATA (#41091)
ref pingcap/tidb#40499
2023-02-07 20:25:58 +08:00
ddaf0d7814 ddl, parser: implement the normal flow of distributed processing in DDL reorg phase for adding index (#40542)
close pingcap/tidb#37125
2023-02-06 13:37:57 +08:00
975d177286 *: add resource group name into information_schema.processlist (#40739)
close pingcap/tidb#40724
2023-02-03 22:23:56 +08:00
a4b18ce359 resource_group: supports burstable for resource group (#40925)
close pingcap/tidb#40380
2023-02-02 17:35:57 +08:00
f0575a847b *: unify wru,rru to ru (#40884)
close pingcap/tidb#40883
2023-02-02 11:47:56 +08:00
774913c768 planner: rename keep_order hint to order_index hint for mysql compatibility (#40945) 2023-02-01 22:03:56 +08:00
920f0199c1 parser: Fix for field name output in multi statements (#40736)
close pingcap/tidb#39662
2023-01-31 19:05:54 +08:00
556c267758 server, privileges: make tidb_auth_session_token compatible with password expiration and resource group (#40735)
ref pingcap/tidb#40614
2023-01-20 13:51:49 +08:00
dc30a5b7b3 *: LOAD DATA support load one file from s3 and other OSS (#40489)
ref pingcap/tidb#40499
2023-01-18 15:27:51 +08:00
971deb6202 *: add a new I_S table and support show create for resource groups (#40665)
close pingcap/tidb#39781
2023-01-17 23:37:49 +08:00
cbe228fe50 hint: fix the problem that set var hint is invalid when create binding (#40569)
close pingcap/tidb#40570
2023-01-13 18:29:47 +08:00
a917dc574e *: add more tests and fix some bugs for multi-valued index (#40518)
* fix

Signed-off-by: xiongjiwei <xiongjiwei1996@outlook.com>

* add more test

Signed-off-by: xiongjiwei <xiongjiwei1996@outlook.com>

Signed-off-by: xiongjiwei <xiongjiwei1996@outlook.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
2023-01-12 17:49:53 +08:00
26dab31068 ttl: support float number and store ttl_job_interval in info schema (#40509)
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Co-authored-by: Weizhen Wang <wangweizhen@pingcap.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
2023-01-12 16:42:34 +08:00
df019ae5ba parser: use identifier as user's resource group name (#40479)
* parser: use identifier as user's resource group name and also fix a drop resource group bug

Signed-off-by: BornChanger <dawn_catcher@126.com>

* executor: fix case

Signed-off-by: BornChanger <dawn_catcher@126.com>

* *: format parser.y

Signed-off-by: BornChanger <dawn_catcher@126.com>

* *: fix store function of resource group

Signed-off-by: BornChanger <dawn_catcher@126.com>

Signed-off-by: BornChanger <dawn_catcher@126.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
2023-01-12 15:50:34 +08:00
eb35c773b5 ddl: avoid commit conflicts when updating/delete from mysql.tidb_ddl_reorg. (#38738)
* Added test case

* ddl fix #38669.

The issue was that mysql.tidb_ddl_reorg table was updated by an
inner transaction after the outer transaction started,
which then made a commit conflict in the outer transaction,
when it deleted the same row.

* Fixed typo in comment

* Added test case for #24427

* Disabled tests for CI testing

* Revert "Disabled tests for CI testing"

This reverts commit 17c28f30ba8802c578fed5653107aa6995e17607.

* Revert "Revert "Disabled tests for CI testing""

This reverts commit 65c84d94f7ab4440c739703312f5329619c6ccdc.

* removed test skips

* Clean up the tidb_ddl_reorg entry after DDL is completed

* Use a cleanup job afterwards instead.

* Fixed test

* Moved cleanup before asyncNotify

* More detailed test failure log

* Refined test error message

* Injecting timoeut to get stack traces from CI

* Updated Debug Dump on timeout

* Delete mulitple entries in tidb_ddl_reorg if needed

* Linting

* Linting

* Added CI debug logs

* Linting + CI debugs

* fixed CI debug

* Try to cleanup also if job.State == synced

* check for non-error of runErr instead of error...

* Use a new session, instead of reusing worker.sess

* Also handle case when job == nil

* Removed CI debug logs

* Misssed change session from w.sess to newly created sess

* Improved TestConcurrentDDLSwitch and added CI debug logs

* Always cleaning up all orphan mysql.tidb_ddl_reorg entries

* linting

* Also cleanup if job is nil

* Updated TestModifyColumnReorgInfo + CI debug logs

* more CI debug

* refactored the cleanupDDLReorgHandle code

* Added missing cleanup in handleDDLJobQueue

* Removed debug panic

* Code cleanup

* Test updates

* Debug cleanup

* Cleaned up test after removal of old non-concurrent DDL code merge

* Linting

* always wrap changes to tidb_ddl_reorg in an own transaction

+ fixed some typos

* Minimum fix

* Always update reorg meta, not only on error

* Issue is here :)

* Fixed newReorgHandler

* Wrapped more tidb_ddl_reorg changes into separate transactions

* linting

* Removed updateDDLReorgStartHandle

* cleanups

* Made runInTxn a method on *session, instead of normal function

* Update test

* Final touches

* Removed duplicate test

* CleanupDDLReorgHandles should only be called from HandleJobDone.

* Variable rename

* Renamed 'delete' variabel name

* Updated test

* small revert

* Removed timeout debugging code

* Simplified the cleanup to only start a new txn and not a new session

* Reverted the change of GetDDLInfo

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
2023-01-11 21:18:33 +08:00
45d71af649 ddl: support displaying sub-job reorg type in admin show ddl (#40387)
close pingcap/tidb#40386
2023-01-10 12:50:22 +08:00
b912237ac7 planner: support keep_order and no_keep_order hint (#40089)
ref pingcap/tidb#39964
2023-01-09 21:42:22 +08:00
b477b1c946 *: Supports create/alter/drop resource group (#40188)
ref pingcap/tidb#38825
2023-01-09 13:44:22 +08:00
b226dfcb05 ttl: add ttl_job_interval attribute and remove tidb_ttl_job_interval variable (#40033)
close pingcap/tidb#40028
2023-01-06 17:56:21 +08:00
affe126097 *: support curdate() as column's default value | tidb-test=pr/2057 (#40326)
close pingcap/tidb#38356
2023-01-05 16:14:20 +08:00
cb5affbc3c ddl, parser: Implement the write-reorg state split task related functions, and the related interfaces of backfill worker (#39982)
close pingcap/tidb#37123
2023-01-04 15:20:19 +08:00
5327d07afc planner: refactor plan-cache UseCache flag (#40256)
ref pingcap/tidb#36598
2023-01-03 17:30:20 +08:00