Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: Reorganize Partition DDL states logic #40473

Merged
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
786 commits
Select commit Hold shift + click to select a range
621115b
ttl, variables: add system variables for ttl job schedule (#39727)
YangKeao Dec 13, 2022
b7e21a0
*: fix slow query nil pointer panic when get session for TTL (#39865)
lcwangchao Dec 13, 2022
cb435fe
ttl: Add metrics for TTL (#39849)
lcwangchao Dec 13, 2022
760dbe1
statistics: support gc outdated historical stats (#39788)
Yisaer Dec 13, 2022
aeceb22
planner: rename `general plan cache` to `non-prepared plan cache` (#3…
qw4990 Dec 13, 2022
1ab88f2
planner: rename 'tidb_enable_general_plan_cache' and 'tidb_general_pl…
qw4990 Dec 13, 2022
509fe6d
planner: binding from cluster statements summary (#39737)
fzzf678 Dec 13, 2022
c4047cc
ttl: modify default value of `tidb_ttl_delete_batch_size` to 100 (#39…
lcwangchao Dec 13, 2022
90a7398
ddl: close lightning writers after the import is complete (#39879)
tangenta Dec 13, 2022
d0d6955
store/copr: handle region error from client (#39838)
you06 Dec 13, 2022
827d8ff
ttl: fix scan workers shrink (#39860)
YangKeao Dec 13, 2022
222faa4
docs: fix typos (#39870)
mamil Dec 13, 2022
4b3a442
domain: support dump sql meta in plan replayer (#39863)
Yisaer Dec 13, 2022
1e7c6dd
SlowLog: Update `Wait_TS` field in slow log for every sql (#39843)
TonsnakeLin Dec 13, 2022
98cef5a
session: fix a bug for InitDDLJobTables (#39861)
zimulala Dec 13, 2022
d2eca72
ttl: reschedule scan tasks after update task state (#39891)
YangKeao Dec 13, 2022
4a19cae
ttl: TTL support split scan ranges for some primary key with more tha…
lcwangchao Dec 14, 2022
ba5e85b
*: add dependabot (#39229)
hawkingrei Dec 14, 2022
b41be06
expression: support `json_overlaps` function (#39867)
xiongjiwei Dec 14, 2022
1e7c552
executor, planner: `InitLogger` before `CreateMockStore` in tests to …
time-and-fate Dec 14, 2022
388e008
statistics: add source column for stats_meta_hisotry table (#39835)
Yisaer Dec 14, 2022
66a2e96
ttl: fix ttl txn will not return error when rolling back (#39918)
lcwangchao Dec 14, 2022
565128e
expression: close recordset (#39899)
hawkingrei Dec 14, 2022
dd42b72
br: make more sane variables of ticking timeout (#39887)
YuJuncen Dec 14, 2022
bb50e33
expression: support `member of` function (#39880)
xiongjiwei Dec 14, 2022
e5c0b6b
br: fix err overwrite (#39935)
Leavrth Dec 14, 2022
aeec193
ttl: add log in the whole lifecycle of a job (#39931)
YangKeao Dec 14, 2022
de865c4
ttl: use optimistic transaction with 0 retry limit for ttl (#39924)
YangKeao Dec 14, 2022
4ad530e
ttl: periodically update state for a job in heartbeat (#39939)
YangKeao Dec 14, 2022
62a8001
parser: support syntax set binding status by sql digest (#39515)
fzzf678 Dec 14, 2022
c26a6b5
*: lock row keys during merging back from temp index (#39936)
tangenta Dec 14, 2022
51f0658
ttl: initialize notifyStateCh in ttl job manager (#39956)
YangKeao Dec 15, 2022
0f95a5a
domain, statistics: periodically update stats healthy distribution (#…
xuyifangreeneyes Dec 15, 2022
acb8d46
ttl: enable 1pc for ttl delete (#39958)
lcwangchao Dec 15, 2022
8a539c1
docs/design: format the name of 'Adding-Index-Acceleration' RFC. (#39…
bb7133 Dec 15, 2022
79b4e63
*: fix auto analyze worker crash when killed by global memory limit (…
chrysan Dec 15, 2022
3760815
doc: add a proposal for foreign key (#35982)
crazycs520 Dec 15, 2022
3aba336
domain: Support plan replayer continus capture (#39926)
Yisaer Dec 15, 2022
9d2c9ee
expression, json: fix cast json as string with shorter length (#39970)
YangKeao Dec 15, 2022
97a9e63
sessionctx, executor: fix failure of reading MaxPreparedStmtCount (#3…
xuyifangreeneyes Dec 15, 2022
53572f8
resourcemanger: create cpu monitor (#39962)
hawkingrei Dec 16, 2022
0fe61bd
*: prevent cursor read from being cancelled by GC (#39950)
zyguan Dec 16, 2022
ebbfb61
dumpling: supports foreign key limitations (#39914)
lichunzhu Dec 16, 2022
8629514
build(deps): bump golang.org/x/net from 0.2.0 to 0.4.0 (#39996)
dependabot[bot] Dec 16, 2022
c763eb9
planner: fix pessimistic-auto-commit not working for point plans (#39…
zyguan Dec 16, 2022
d2393e3
fix: ebs volume restore failure since incorrect unfinished volumes (#…
fengou1 Dec 16, 2022
3970cfc
planner, json: restore cast flag after substitute column in cast (#39…
YangKeao Dec 16, 2022
223a912
staleread, session: internal write request should be accepted with ex…
YangKeao Dec 17, 2022
f150d37
*: revert 38302, forbid modify column on partition table (#39991)
wjhuang2016 Dec 17, 2022
47f5460
executor: close recordset again (#40010)
hawkingrei Dec 19, 2022
48585a7
ddl: retry prepare RPC when meets region error (#39834)
Defined2014 Dec 19, 2022
08f6ea4
metrics: add EMA cpu usage (#39995)
hawkingrei Dec 19, 2022
3edde02
executor: fix unstable TestMaxPreparedStmtCount (#40024)
xuyifangreeneyes Dec 19, 2022
0c18082
*: support sample for compressed files for adjustment (#39680)
lichunzhu Dec 19, 2022
5a08acd
docs: fix 'enable_global_index' to 'enable-global-index' (#40009)
mychoxin Dec 20, 2022
ae58fa1
expression: introduce `cast(... as ... array)` in expression index (#…
xiongjiwei Dec 20, 2022
9f4dd80
planner: fix the issue that NonPrep Cache cannot work with Explain we…
qw4990 Dec 20, 2022
030c506
ddl: fix waiting for wrong schema version if TiDB server restart (#39…
wjhuang2016 Dec 20, 2022
4a72171
*: Fix issue 39999, used wrong column id list for checking partitions…
mjonss Dec 20, 2022
6ab3803
oomtest: add whitelist for oom test to fix flaky test (#40055)
hawkingrei Dec 20, 2022
017901d
*: extend skyline pruning diagnostic info and add extra warnings (#39…
time-and-fate Dec 20, 2022
0f3031e
ddl: add privilege check when alter table add foreign key (#40051)
crazycs520 Dec 20, 2022
5f1a739
planner: add more test cases for non-prep plan cache (#40060)
qw4990 Dec 20, 2022
806fcbf
sessionctx: disable gc aware memory track (#40019)
chrysan Dec 20, 2022
fdf335e
*: make auto-analyze killable by global memory limit (#39978)
chrysan Dec 20, 2022
ae2d551
cpu: fix ticker to avoid close early (#40036)
hawkingrei Dec 21, 2022
a2fa187
build(deps): bump golang.org/x/time from 0.2.0 to 0.3.0 (#39912)
dependabot[bot] Dec 21, 2022
51cce45
ddl: use latest ts to read record for adding index (#40081)
tangenta Dec 21, 2022
2150c6b
executor: close recordset again (#40073)
hawkingrei Dec 21, 2022
785f515
planner: add more test cases for MPP hints (#39933)
Reminiscent Dec 21, 2022
08f23ef
planner: support set binding status by sql digest (#39517)
fzzf678 Dec 21, 2022
b4f500e
ddl: check the limitation when creating multi-valued index (#39818)
xiongjiwei Dec 21, 2022
13e2120
sysvar: allow modifying 'tidb_allow_remove_auto_inc' when SEM is ON (…
CbcWestwolf Dec 21, 2022
ad0c202
*: fix issue of multi-schema change with foreign key (#40042)
crazycs520 Dec 21, 2022
9e8a21c
planner: check the `ignore-plan-cache` hint in insert-stmt (#40080)
qw4990 Dec 21, 2022
fc3f04b
parser: support keep_order and no_keep_order hint (#39965)
Reminiscent Dec 21, 2022
47ace08
*: filter particularly errors when `truncateAsWarning` is true (#40078)
xiongjiwei Dec 21, 2022
4e43b14
metrics: add metrics for ema cpu metrics and GOGC (#40049)
hawkingrei Dec 22, 2022
0f4bd73
server: avoid reusing cached stmt ctx on cursor read (#40023)
zyguan Dec 22, 2022
aeccf77
*: optimize mpp probe (#39932)
hackersean Dec 22, 2022
4adce4c
statistics: fix the sync load sql did'nt running internally (#40087)
Yisaer Dec 22, 2022
5fdd3bd
server: support download plan replayer continues capture file (#40085)
Yisaer Dec 22, 2022
5c04d78
*: support foreign key check/cascade when execute replace into statem…
crazycs520 Dec 22, 2022
1305687
ddl: fix issue of add foreign key too slow in big table (#40112)
crazycs520 Dec 22, 2022
53edd89
ddl: fix issue of partition table with foreign key and add more test …
crazycs520 Dec 23, 2022
18c71f4
parser: fix cast function restore (#40129)
xiongjiwei Dec 23, 2022
d2be278
ddl: set context correctly in the setDDLLabelForDiagnosis (#40090)
you06 Dec 23, 2022
14879a7
planner: move code of generating IndexMergePath to a separated file (…
qw4990 Dec 23, 2022
014159d
statistics: fix incorrect datetime value when loading stats (#40084)
xuyifangreeneyes Dec 23, 2022
c61ef1d
ttl: escape parameters for finish job sql (#40118)
YangKeao Dec 23, 2022
c30a9ff
ddl: prohibit change name of partitioning column (#40147)
mjonss Dec 24, 2022
1ace970
lightning: disable foreign key checks (#40032)
sleepymole Dec 26, 2022
388364d
br: recursive split batch create table when restore failure on batch …
fengou1 Dec 26, 2022
8a4b31a
store/copr: don't reset concurrency of analyze req to 2 (#40168)
xuyifangreeneyes Dec 26, 2022
2f6401a
build(deps): bump golang.org/x/oauth2 from 0.2.0 to 0.3.0 (#40140)
dependabot[bot] Dec 26, 2022
fc241b2
domain: revise plan replayer process log (#40126)
Yisaer Dec 26, 2022
f9d4a54
expression: impl cast as array function (#40076)
xiongjiwei Dec 26, 2022
fc714e2
session: fix tidb_enable_gc_aware_memory_track after upgrade (#40173)
chrysan Dec 26, 2022
79ab2b9
restore: Fix prealloc (#40176)
YuJuncen Dec 26, 2022
ab01065
metrics: remove Keep Alive OPM metric (#40142)
CbcWestwolf Dec 27, 2022
3c8f11d
util: fix data race in the cpu test (#40154)
hawkingrei Dec 27, 2022
20bb046
executor: move some test into writetest (#40097)
hawkingrei Dec 27, 2022
a94cde3
planner: fix an unstable explain test case (#40199)
qw4990 Dec 27, 2022
83d275c
ddl: Refine the error message to compatible with MySQL when drop a pa…
jiyfhust Dec 27, 2022
afbef28
executor: TiFlash supports stale read (#40048)
Dec 27, 2022
32f9604
ddl: ignore internal http client goroutine in leak tests (#40190)
tangenta Dec 27, 2022
bddfc62
ddl: add more foreign key test case (#40052)
crazycs520 Dec 28, 2022
11f5c17
*: add support for -initialize-sql-file on first bootstrap (#35625)
morgo Dec 28, 2022
b268c65
*: fix PointGet will return an stale value when `tidb_enable_plan_rep…
lcwangchao Dec 28, 2022
f9af75f
planner: support converting `json_member_of` to IndexMerge to access …
qw4990 Dec 28, 2022
b196756
planner: record reasons when skipping Plan Cache (#40210)
qw4990 Dec 28, 2022
869b21d
session: Do not run telemetry loops when it's disabled in config (#40…
sunxiaoguang Dec 28, 2022
667bc4c
docs/design: REORGANIZE PARTITION design (#38246)
mjonss Dec 28, 2022
c8124a0
ddl: Disable RENAME COLUMN for partitioning columns | tidb-test=pr/20…
mjonss Dec 29, 2022
92a936e
dumpling: add foreign key e2e test (#40133)
crazycs520 Dec 29, 2022
cf34941
ttl: make the TTL compatible with dumpling, lightning and BR (#40216)
lcwangchao Dec 29, 2022
1a7b395
ttl, domain: setup a customized session pool with stats collector (#4…
YangKeao Dec 29, 2022
6dff69f
ddl: Support flashback cluster with ddl history (#40209)
Defined2014 Dec 29, 2022
875c002
lightning: add foreign key test (#40103)
crazycs520 Dec 29, 2022
b94042c
planner: refine planner code for disaggregated tiflash mode (#39813)
guo-shaoge Dec 29, 2022
ea29db5
docs: update tidb roadmap based on v6.5 (#40170)
ran-huang Dec 29, 2022
ffaf2ac
planner: remove the unnecessary skip-plan-cache flag in StmtCtx (#40235)
qw4990 Dec 30, 2022
25dd54f
ttl: fix change status sql argument (#40234)
YangKeao Dec 30, 2022
72f52f3
planner: update the plan cache strategy when expressions with paramet…
qw4990 Dec 30, 2022
0134d0b
go.mod: upgrade badger to 20221229114011 (#40236)
YangKeao Dec 30, 2022
d3b952a
executor: write multi-valued index (#40172)
xiongjiwei Dec 30, 2022
8e80e7c
expression: implement `unhex` function pushdown to tiflash (#39898)
b41sh Dec 30, 2022
b97f60d
planner: remove the unnecessary skip-plan-cache flag in StmtCtx (#40246)
qw4990 Dec 30, 2022
1b8a233
restore: set config value to default when failed to get config from t…
YuJuncen Dec 30, 2022
6131e3f
ddl: check default value again in updateColumnDefaultValue (#40230)
wjhuang2016 Dec 30, 2022
91adaaf
docs: update roadmap (#40244)
ran-huang Dec 30, 2022
f7de8be
*: remove the support of the old ddl framework (#39684)
wjhuang2016 Dec 30, 2022
47080d9
lightning: check peers write stall when switch-mode is disabled (#40228)
lance6716 Dec 30, 2022
702a559
ddl, parser: make generated column and expression index same as MySQL…
Defined2014 Dec 30, 2022
25a2479
session: make plan replayer capture support prepared stmt (#40167)
Yisaer Jan 3, 2023
67a952a
expression: implement `regexp_replace` function pushdown (#40267)
xzhangxian1008 Jan 3, 2023
1bf230a
planner: supply more test for binding from history (#40242)
fzzf678 Jan 3, 2023
be8caa6
ttl: disable ttl job when recover/flashback table/database/cluster (#…
lcwangchao Jan 3, 2023
494672c
admin: impl admin check index for mv index (#40270)
xiongjiwei Jan 3, 2023
5327d07
planner: refactor plan-cache UseCache flag (#40256)
qw4990 Jan 3, 2023
9aaa93e
test: fix data race in cast as array (#40277)
xiongjiwei Jan 3, 2023
4f1adb9
planner: support converting `json_overlaps/contains` to IndexMerge to…
qw4990 Jan 3, 2023
1f344ba
autoid_service: add unit test for the package (#40193)
tiancaiamao Jan 3, 2023
3ccff46
executor: special handling is required when an "auto id out of range"…
Dousir9 Jan 3, 2023
3e65e9b
util: gorotinue pool (#39872)
hawkingrei Jan 4, 2023
f483b39
metrics: add metrics for plan replayer and historical stats (#40271)
Yisaer Jan 4, 2023
3e6499b
sysvar: fix circular dependency in rebuildSysVarCache leading to dead…
CbcWestwolf Jan 4, 2023
e95881f
ddl: fix flaky test TestGlobalVariablesOnFlashback (#40291)
Defined2014 Jan 4, 2023
62a7133
server, tidb-server: kill auto analyze when gracefully shutting down …
xuyifangreeneyes Jan 4, 2023
7fafb6d
planner: better coordination between the ignore_plan_cache() binding …
qw4990 Jan 4, 2023
ccee532
store/copr: fix build batchCop in disaggregated tiflash mode (#40008)
guo-shaoge Jan 4, 2023
73c8cc7
ddl: persist index info after changing backfill state (#40229)
tangenta Jan 4, 2023
e7e7935
doc: update flashback doc (#40031)
Defined2014 Jan 4, 2023
cb5affb
ddl, parser: Implement the write-reorg state split task related funct…
zimulala Jan 4, 2023
95f0dc5
planner: support pushing down predicates to memory tables in prepared…
djshow832 Jan 4, 2023
6ae151a
planner: open the partial order prop push down for LIST PARTITION (#4…
winoros Jan 4, 2023
00604eb
br: fix bootstrap domain (#40307)
wjhuang2016 Jan 4, 2023
bf2cc45
br: add errch buf for checkpoint (#40166)
Leavrth Jan 4, 2023
be112dc
planner: skip plan-cache for prepared queries with `INT in (Decimals.…
qw4990 Jan 5, 2023
d027270
statistics: support historical stats dump partition table (#40310)
Yisaer Jan 5, 2023
37f045c
*: update badger (#40331)
xiongjiwei Jan 5, 2023
508b601
expression: enlarge timeout for test (#40332)
hawkingrei Jan 5, 2023
4a5a447
resourcemanger: add cpu scheduler (#39886)
hawkingrei Jan 5, 2023
5eea731
util: use go-deadlock to find deadlock (#40288)
hawkingrei Jan 5, 2023
affe126
*: support `curdate()` as column's default value | tidb-test=pr/2057…
CbcWestwolf Jan 5, 2023
7e64d04
ttl: don't schedule ttl job when EnableTTLJob is off (#40336)
YangKeao Jan 5, 2023
669ba5c
*: add warnings to slow log and slow query table (#39884)
time-and-fate Jan 5, 2023
331f69f
planner,infoschema,executor: Add tiflash fine grained shuffle support…
yibin87 Jan 6, 2023
e1a2b58
ddl: fill in original default for extra writable columns in batch ins…
YangKeao Jan 6, 2023
88842fa
ddltest: update goleak and enable race (#40357)
hawkingrei Jan 6, 2023
852fdc6
planner: let the planner can select IndexMerge on MVIndex without hin…
qw4990 Jan 6, 2023
3291b6d
makefile: enable deadlock in the with-real-tikv (#40359)
hawkingrei Jan 6, 2023
99100d4
planner: support more types to use IndexMerge to access MVIndex (#40343)
qw4990 Jan 6, 2023
6477d2b
log-backup: should set default value `gc.ratio-threshold` after pitr …
joccau Jan 6, 2023
b8490bc
domain: let plan replayer dump support recording stats mem status (#4…
Yisaer Jan 6, 2023
af968f2
docs: add TiDB Forum link and adjust link order (#39868)
luzizhuo Jan 6, 2023
43ebc64
ddl: support online create multi-valued index (#40304)
xiongjiwei Jan 6, 2023
b226dfc
ttl: add `ttl_job_interval` attribute and remove `tidb_ttl_job_interv…
YangKeao Jan 6, 2023
005c8d8
*: remove the support of the `amending transaction` (#39714)
wjhuang2016 Jan 6, 2023
f600fc6
executor: reset the related session vars for both INSERT and REPLACE …
winoros Jan 6, 2023
f9f7268
*: fix static pruning partition table in disaggregated tiflash mode (…
guo-shaoge Jan 6, 2023
b906bf9
planner: fix typo (#40367)
Dousir9 Jan 6, 2023
a9d8bfe
session: fix data race in the LazyTxn.LockKeys (#40350)
hawkingrei Jan 6, 2023
f7c87c8
build(deps): bump golang.org/x/crypto from 0.1.0 to 0.5.0 (#40379)
dependabot[bot] Jan 7, 2023
2d755a8
executor: fix data race at the ShowExec (#39817)
hawkingrei Jan 9, 2023
4a8006c
planner: fix panic during starting tidb-server if creating global bin…
Yisaer Jan 9, 2023
b477b1c
*: Supports create/alter/drop resource group (#40188)
nolouch Jan 9, 2023
408a466
session: fix deadlock when init domain failed (#40409)
Defined2014 Jan 9, 2023
83ec4b0
executor: support insert ignore/duplicate replace into with unique mu…
xiongjiwei Jan 9, 2023
199bb38
br: support reset_tiflash after ebs restoration (#40124)
3pointer Jan 9, 2023
7dbf1a5
ttl: add ttl goroutine exit log (#40416)
YangKeao Jan 9, 2023
0f838d9
planner, executor: split the range for unsigned pk of partition table…
winoros Jan 9, 2023
362defb
planner: add nil check when handling empty charset in `setUnionFlen` …
time-and-fate Jan 9, 2023
b912237
planner: support keep_order and no_keep_order hint (#40089)
Reminiscent Jan 9, 2023
e2a14ce
planner: unify the behavior of prepare/execute limit to mysql (#40360)
fzzf678 Jan 10, 2023
f5362f9
gpool: register gpool into resource manager (#40410)
hawkingrei Jan 10, 2023
9826913
ttl: Add `CommandClient` to trigger TTL job manually (#40346)
lcwangchao Jan 10, 2023
3f223b3
ttl: make ttl's group in granfana collapse by default (#40444)
lcwangchao Jan 10, 2023
be31b6c
br: reset cloud_admin and root after ebs restoration (#39986)
3pointer Jan 10, 2023
45d71af
ddl: support displaying sub-job reorg type in admin show ddl (#40387)
tangenta Jan 10, 2023
f771c67
planner: support use IndexMerge to access composite MVIndex (#40426)
qw4990 Jan 10, 2023
c4d8ed1
planner: add test cases for keep_order and no_keep_order hints (#40321)
Reminiscent Jan 10, 2023
3cb091b
statistics: change the upper bound of the out-of-range estimation to …
time-and-fate Jan 10, 2023
bb314af
docs: update CI build badages (#40324)
wuhuizuo Jan 10, 2023
46e67d2
planner: update the non-prep cacheable checker (#40446)
qw4990 Jan 10, 2023
02332b2
expression, planner: exclude concat_ws from aggresive folding constan…
YangKeao Jan 10, 2023
10f0093
keyspace: introduce keyspace conf and etcd path (#40269)
ystaticy Jan 10, 2023
ef7c8bd
Main Reorganize Partition DDL logic (moved from part 3)
mjonss Jan 10, 2023
eb033f8
Skipping two tests, to be fixed in separate PR
mjonss Jan 10, 2023
8a14d11
Update after `make bazel_prepare`
mjonss Jan 10, 2023
1c8007d
ddl: skip deleting the unmatched index key on merge (#40465)
tangenta Jan 10, 2023
cf8f683
Merge pingcap/master and pingcap/feature/reorganize-partition
mjonss Jan 10, 2023
4ae9e6d
Updated CODEOWNERS for the feature branch
mjonss Jan 10, 2023
34d9352
Merge remote-tracking branch 'pingcap/feature/reorganize-partition' i…
mjonss Jan 10, 2023
eb3df8b
Main Reorganize Partition DDL logic (moved from part 3)
mjonss Jan 10, 2023
ac6f869
Skipping two tests, to be fixed in separate PR
mjonss Jan 10, 2023
d3444e6
Update after `make bazel_prepare`
mjonss Jan 10, 2023
805553a
Merge remote-tracking branch 'origin/reorg-part-ddl-states' into reor…
mjonss Jan 10, 2023
46d4bf0
ci: add document about some task that will be triggered manually (#40…
hawkingrei Jan 11, 2023
db53a42
errno, store: fix ErrPDServerTimeout arguments (#40468)
dveeden Jan 11, 2023
eff7462
ttl: fix the TTL job reports error when primary key contains a column…
lcwangchao Jan 11, 2023
d2d33df
planner: support using DNF to construct IndexMerge to access MVIndex …
qw4990 Jan 11, 2023
668881f
executor: add partition table testcase for historical stats (#40453)
Yisaer Jan 11, 2023
caffd8d
ttl: forbid creating/altering a table with TTL options when pk contai…
lcwangchao Jan 11, 2023
e864d83
planner: make MVIndex be compatible with the `use/force index` hint (…
qw4990 Jan 11, 2023
e3f8d98
lightning: fix codecPDClient (#40496)
AmoebaProtozoa Jan 11, 2023
2cf328b
ddl: let concurrent truncate on the same table depend on the previous…
wjhuang2016 Jan 11, 2023
2f13578
statistics: fix estimation error when ranges are too many and modify …
time-and-fate Jan 11, 2023
6e220cf
Renamed the receiver of *partitionedTable to be consistently 't'
mjonss Jan 11, 2023
cefb261
executor: fix issue of KEY_COLUMN_USAGE table return wrong result abo…
crazycs520 Jan 11, 2023
7beec04
sysvar: add switch for plan replayer capture using historical stats (…
Yisaer Jan 11, 2023
defd80a
*: upgrade go1.19.5 (#40483)
hawkingrei Jan 11, 2023
f88714d
br: need init MDL variable when GetDomain (#40512)
joccau Jan 11, 2023
eb35c77
ddl: avoid commit conflicts when updating/delete from mysql.tidb_ddl_…
mjonss Jan 11, 2023
2b32037
Merge remote-tracking branch 'pingcap/master' into reorg-part-merge-j…
mjonss Jan 11, 2023
4b6f0ca
Post merge fix
mjonss Jan 11, 2023
d041912
Merge branch 'reorg-part-merge-jan10' into reorg-part-ddl-states
mjonss Jan 11, 2023
8bc3503
Post merge fix
mjonss Jan 11, 2023
8a97633
Removed TestTiflashReorgPartition test (since support will come later)
mjonss Jan 11, 2023
e2b4ca5
bazel_prepare update
mjonss Jan 11, 2023
2578e7b
Merge remote-tracking branch 'pingcap/feature/reorganize-partition' i…
mjonss Jan 12, 2023
6ae6ecd
Removed skipped tests (to be added back in next PR)
mjonss Jan 12, 2023
038a4e5
Explicitly add label on panic tests
mjonss Jan 12, 2023
5e94a2d
Removed non used test function
mjonss Jan 12, 2023
9f0a0c3
make bazel_prepare
mjonss Jan 12, 2023
1acb778
Removed unneccessary check, according to review comments
mjonss Jan 16, 2023
5956b19
Setting job.State = model.JobStateCancelled on error in StateNone
mjonss Jan 17, 2023
cdd5b5c
Moved split and scatter regions into StateNone after all checks
mjonss Jan 17, 2023
3386976
Fixed index write in Write/DeleteReorg state
mjonss Jan 17, 2023
e620a42
Fixed issue with DDL states for indexes during ALTER PARTITION
mjonss Jan 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ddl/backfilling.go
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,7 @@ func (b *backfillScheduler) adjustWorkerSize() error {
return err
}
runner = newBackfillWorker(jc.ddlJobCtx, i, partWorker)
worker = partWorker
default:
return errors.New("unknown backfill type")
}
Expand Down
77 changes: 77 additions & 0 deletions ddl/db_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4311,3 +4311,80 @@ func TestRegexpFunctionsGeneratedColumn(t *testing.T) {

tk.MustExec("drop table if exists reg_like")
}

func TestReorgPartitionRangeFailure(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
tk.MustExec(`create schema reorgfail`)
tk.MustExec("use reorgfail")

tk.MustExec("CREATE TABLE t (id int, d varchar(255)) partition by range (id) (partition p0 values less than (1000000), partition p1 values less than (2000000), partition p2 values less than (3000000))")
tk.MustContainErrMsg(`ALTER TABLE t REORGANIZE PARTITION p0,p2 INTO (PARTITION p0 VALUES LESS THAN (1000000))`, "[ddl:8200]Unsupported REORGANIZE PARTITION of RANGE; not adjacent partitions")
tk.MustContainErrMsg(`ALTER TABLE t REORGANIZE PARTITION p0,p2 INTO (PARTITION p0 VALUES LESS THAN (4000000))`, "[ddl:8200]Unsupported REORGANIZE PARTITION of RANGE; not adjacent partitions")
}

func TestReorgPartitionDocs(t *testing.T) {
// To test what is added as partition management in the docs
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
tk.MustExec(`create schema reorgdocs`)
tk.MustExec("use reorgdocs")
tk.MustExec(`CREATE TABLE members (
id int,
fname varchar(255),
lname varchar(255),
dob date,
data json
)
PARTITION BY RANGE (YEAR(dob)) (
PARTITION pBefore1950 VALUES LESS THAN (1950),
PARTITION p1950 VALUES LESS THAN (1960),
PARTITION p1960 VALUES LESS THAN (1970),
PARTITION p1970 VALUES LESS THAN (1980),
PARTITION p1980 VALUES LESS THAN (1990),
PARTITION p1990 VALUES LESS THAN (2000))`)
tk.MustExec(`CREATE TABLE member_level (
id int,
level int,
achievements json
)
PARTITION BY LIST (level) (
PARTITION l1 VALUES IN (1),
PARTITION l2 VALUES IN (2),
PARTITION l3 VALUES IN (3),
PARTITION l4 VALUES IN (4),
PARTITION l5 VALUES IN (5));`)
tk.MustExec(`ALTER TABLE members DROP PARTITION p1990`)
tk.MustExec(`ALTER TABLE member_level DROP PARTITION l5`)
tk.MustExec(`ALTER TABLE members TRUNCATE PARTITION p1980`)
tk.MustExec(`ALTER TABLE member_level TRUNCATE PARTITION l4`)
tk.MustExec("ALTER TABLE members ADD PARTITION (PARTITION `p1990to2010` VALUES LESS THAN (2010))")
tk.MustExec(`ALTER TABLE member_level ADD PARTITION (PARTITION l5_6 VALUES IN (5,6))`)
tk.MustContainErrMsg(`ALTER TABLE members ADD PARTITION (PARTITION p1990 VALUES LESS THAN (2000))`, "[ddl:1493]VALUES LESS THAN value must be strictly increasing for each partition")
tk.MustExec(`ALTER TABLE members REORGANIZE PARTITION p1990to2010 INTO
(PARTITION p1990 VALUES LESS THAN (2000),
PARTITION p2000 VALUES LESS THAN (2010),
PARTITION p2010 VALUES LESS THAN (2020),
PARTITION p2020 VALUES LESS THAN (2030),
PARTITION pMax VALUES LESS THAN (MAXVALUE))`)
tk.MustExec(`ALTER TABLE member_level REORGANIZE PARTITION l5_6 INTO
(PARTITION l5 VALUES IN (5),
PARTITION l6 VALUES IN (6))`)
tk.MustExec(`ALTER TABLE members REORGANIZE PARTITION pBefore1950,p1950 INTO (PARTITION pBefore1960 VALUES LESS THAN (1960))`)
tk.MustExec(`ALTER TABLE member_level REORGANIZE PARTITION l1,l2 INTO (PARTITION l1_2 VALUES IN (1,2))`)
tk.MustExec(`ALTER TABLE members REORGANIZE PARTITION pBefore1960,p1960,p1970,p1980,p1990,p2000,p2010,p2020,pMax INTO
(PARTITION p1800 VALUES LESS THAN (1900),
PARTITION p1900 VALUES LESS THAN (2000),
PARTITION p2000 VALUES LESS THAN (2100))`)
tk.MustExec(`ALTER TABLE member_level REORGANIZE PARTITION l1_2,l3,l4,l5,l6 INTO
(PARTITION lOdd VALUES IN (1,3,5),
PARTITION lEven VALUES IN (2,4,6))`)
tk.MustContainErrMsg(`ALTER TABLE members REORGANIZE PARTITION p1800,p2000 INTO (PARTITION p2000 VALUES LESS THAN (2100))`, "[ddl:8200]Unsupported REORGANIZE PARTITION of RANGE; not adjacent partitions")
tk.MustExec(`INSERT INTO members VALUES (313, "John", "Doe", "2022-11-22", NULL)`)
tk.MustExec(`ALTER TABLE members REORGANIZE PARTITION p2000 INTO (PARTITION p2000 VALUES LESS THAN (2050))`)
// TODO: uncomment this:
//tk.MustContainErrMsg(`ALTER TABLE members REORGANIZE PARTITION p2000 INTO (PARTITION p2000 VALUES LESS THAN (2020))`, "[table:1526]Table has no partition for value 2022")
tk.MustExec(`INSERT INTO member_level (id, level) values (313, 6)`)
// TODO: uncomment this:
//tk.MustContainErrMsg(`ALTER TABLE member_level REORGANIZE PARTITION lEven INTO (PARTITION lEven VALUES IN (2,4))`, "[table:1526]Table has no partition for value 6")
}
Loading