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

*: merge master into feature branch reorganize-partition #39906

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
553 commits
Select commit Hold shift + click to select a range
74aa891
br: replace GetTS with GetTSWithRetry (#38948)
MoCuishle28 Nov 22, 2022
2255898
parser: add syntax for ttl option in ddl (#39277)
YangKeao Nov 22, 2022
2103466
br: PiTR restore batch apply kv-files (#38772)
joccau Nov 22, 2022
1e6d1a8
*: add foreign key check/cascade information in explain result (#39167)
crazycs520 Nov 22, 2022
d5e9ef0
dumpling: fix TestSpeedRecorder flaky test (#39314)
okJiang Nov 22, 2022
75efe68
ddl: forbid disabling concurrent DDL if MDL is enabled (#39301)
wjhuang2016 Nov 22, 2022
c9bb2f2
domain: disable closest-adaptive dynamically to make read traffic mor…
glorv Nov 22, 2022
84703ef
br: modify collate.newCollationEnabled according to the config of the…
MoCuishle28 Nov 22, 2022
8fc4535
*: fix `tidb_decode_key` with partition table (#39312)
Defined2014 Nov 22, 2022
c9531d4
ddl: make read and write async during adding index (#39249)
tangenta Nov 23, 2022
65585a5
docs: fix typo and dead link (#39317)
tangenta Nov 23, 2022
7c46100
planner: update cost formulas of Index*Join of model2 (#39296)
qw4990 Nov 23, 2022
6a6fc00
metrics: add tiflash and cdc into performance overview (#39231)
dbsid Nov 23, 2022
9784615
ddl: Add index fast path to be a default add index path (#39267)
Benjamin2037 Nov 23, 2022
f50113f
lightning: finer granularity for tidb backend finished bytes (#39318)
lance6716 Nov 23, 2022
fee8ed7
executor: split hashjoin part4 (#39155)
XuHuaiyu Nov 23, 2022
cf49466
executor: move `FillVirtualColumnValue` to the `table` package (#39342)
tangenta Nov 23, 2022
84ee284
parser: use alter table remove ttl spec (#39341)
YangKeao Nov 24, 2022
7930c2c
expression: fix that str_to_date returns different result on no zero …
mengxin9014 Nov 24, 2022
84fa999
txn: support multi-table join in nt-dml (#39139)
ekexium Nov 24, 2022
4a91a24
executor: add debug log for analyze (#39357)
Yisaer Nov 24, 2022
d100e93
*: upgrade dgraph-io/ristretto (#39352)
hawkingrei Nov 24, 2022
e205f93
*: support password validation options and variables (#38953)
CbcWestwolf Nov 24, 2022
7611a03
ddl: support read generated columns with copr for adding index (#39345)
tangenta Nov 24, 2022
b285ef8
ddl: don't reuse the chunk until underlying memory is not referenced …
tangenta Nov 25, 2022
ebc4e43
ddl: skip the error when fallback from ingest to txn method (#39360)
Benjamin2037 Nov 25, 2022
88ad3f4
infoschema, planner: lock the new table id in tryLockMDLAndUpdateSche…
wjhuang2016 Nov 25, 2022
05d616c
lightning: recover status from checkpoint after index engine closed (…
lance6716 Nov 25, 2022
5775995
variable: add `txn_source` into kv.context (#39159)
xiongjiwei Nov 25, 2022
ddfa6db
statistics: remove 1min no write check for unanalyzed table in auto a…
xuyifangreeneyes Nov 25, 2022
c34ee82
errno, statistics: show partition name whose stats are missing when m…
xuyifangreeneyes Nov 25, 2022
15b523c
*: add a memdb memory tracker (#39372)
ekexium Nov 25, 2022
dd0a479
planner, parser: add basic preparations for intersection type IndexMe…
time-and-fate Nov 25, 2022
844ad32
*: fix data race in the client-go's SetVars (#39392)
hawkingrei Nov 25, 2022
4019c2a
bindinfo: fix the timer leak bug. (#39403)
sourcelliu Nov 27, 2022
99dbc77
ttl: Add some tools to build SQLs for TTL (#39359)
lcwangchao Nov 27, 2022
89522b1
*: fix deprecated (#39401)
hawkingrei Nov 28, 2022
68178d6
DDL: add log when TiFlash replica available changed (#39243)
Nov 28, 2022
7f632be
ddl: add ttl related jobs / execution (#39298)
YangKeao Nov 28, 2022
5c9570d
import: fix memory leak (#39332)
dsdashun Nov 28, 2022
ae0bc84
txn: support non-transactional replace (#39378)
ekexium Nov 28, 2022
0e6364f
store: fix tikv_region_status error information of partitioned table …
jiyfhust Nov 28, 2022
f713bc9
types: handle io.EOF error when to parse datatime (#39405)
hawkingrei Nov 28, 2022
78d677e
session: remove date_add function from push down blacklist in new ins…
mengxin9014 Nov 28, 2022
73044b0
planner: optimize the performance of cost trace (#39385)
qw4990 Nov 28, 2022
f8a6bde
*: add a reference count for StmtCtx (#39368)
XuHuaiyu Nov 28, 2022
a56aff1
br: fix unit test - TestApplyKVFilesWithBatchMethod3 (#39415)
joccau Nov 28, 2022
8973bcc
remove unnecessary actions (#39422)
3pointer Nov 28, 2022
5b9d96b
lightning: support compress for lightning, add compress unit and inte…
lichunzhu Nov 28, 2022
039484a
bazel: optimizate the bazel test (#39414)
hawkingrei Nov 28, 2022
49933b3
*: DATA RACE at the memChangeHook (#39411)
hawkingrei Nov 28, 2022
594d20d
Explain : Support more info from tiflash in explain analyze (#39216)
hongyunyan Nov 28, 2022
ccebde5
util: set memory limit tuner to valid value after trigger tuning (#39…
wshwsh12 Nov 28, 2022
03034b6
ddl: properly handle existence checks for deleted records in temp ind…
Benjamin2037 Nov 28, 2022
50bcb52
bazel: add mirror for gosdk (#38275)
hawkingrei Nov 28, 2022
b3bbe96
util: add more log for expensive and global memory control (#39397)
wshwsh12 Nov 28, 2022
43b1c61
ddl, domain: handle the corner case that putting the MDL key to etcd …
wjhuang2016 Nov 28, 2022
12d1cf6
executor: fix issue of foreign key cascade don't work cause by untouc…
crazycs520 Nov 28, 2022
37bd052
planner: rewrite count star to count not null column (#39197)
elsa0520 Nov 28, 2022
3c3a9d0
session, ddl: rollback txn for prepare statement (#39433)
wjhuang2016 Nov 29, 2022
f1215a5
bazel: update shard_count (#39435)
hawkingrei Nov 29, 2022
5b16086
session: remove useless parser object in SessionHandle of bindinfo pa…
winkyao Nov 29, 2022
d61b8c4
log-backup: add flag for restore point (#39431)
joccau Nov 29, 2022
d0b72a2
executor: split hashjoin part5 (#39386)
XuHuaiyu Nov 29, 2022
52d137d
log-backup: use the span tree(instead of the naïve algorithm) to calc…
YuJuncen Nov 29, 2022
e618d86
bazel: enable --remote_download_minimal again (#39307)
hawkingrei Nov 29, 2022
f9a6e47
planner: support push part of order property down to the partition ta…
winoros Nov 29, 2022
1dd7a59
ttl: introduce `ttl.PhysicalTable` to provide some common methods for…
lcwangchao Nov 29, 2022
9689b47
ddl: improve log messages (#39376)
hawkingrei Nov 29, 2022
1b15732
telemetry: add telemetry for alter table compact partition (#39452)
Nov 29, 2022
8a5ccd8
planner: support the view hint(part-2) (#39280)
Reminiscent Nov 29, 2022
19dae1f
*: separate auto_increment ID allocator from _tidb_rowid allocator wh…
tiancaiamao Nov 29, 2022
23543a4
*: merge the runtime stats in time to avoid using too many memory (#3…
wshwsh12 Nov 29, 2022
d2ace99
br: leader selection with tikv store balance score during the ebs dat…
fengou1 Nov 29, 2022
2c0c130
session: workaround for upgrade from the old master version (#39451)
wjhuang2016 Nov 29, 2022
1cebd1d
*: improve `flashback to timestamp`, let it compatible with TiCDC (#3…
Defined2014 Nov 29, 2022
e135608
executor: support Intersection of IndexMerge (#38636)
guo-shaoge Nov 29, 2022
c88fd23
planner: add sqlDigest and planDigest field when show bindings (#39156)
fzzf678 Nov 29, 2022
4476173
planner: update cost model2 (#39438)
qw4990 Nov 29, 2022
cca78e3
planner: forbid point get with select lock choose tiflash as datasour…
Yisaer Nov 29, 2022
6241d60
planner, executor: support intersection type IndexMerge with hint in …
time-and-fate Nov 30, 2022
06072d6
Explain: change the explain analyze output info (#39444)
hongyunyan Nov 30, 2022
e98e959
*: add telemetry support for IndexMerge (#39469)
guo-shaoge Nov 30, 2022
1de2bf6
Backup: add checkpoint (#38648)
Leavrth Nov 30, 2022
328aef8
lightning: add precheck about downstream CDC/PiTR (#39338)
lance6716 Nov 30, 2022
40f0bd5
executor: add index_merge_intersection cases (#39323)
guo-shaoge Nov 30, 2022
a48fe79
executor: close resultset (#39474)
hawkingrei Nov 30, 2022
a00f0fe
autoid_service,meta/autoid: distinguish retriable error from non-retr…
tiancaiamao Nov 30, 2022
31d943f
Design: add the design doc for view hint (#39313)
Reminiscent Nov 30, 2022
8e4748a
*: make auto-analyze concurrency configurable (#37078)
chrysan Nov 30, 2022
f5487e3
br: add foreign key test for br (#39427)
crazycs520 Nov 30, 2022
f06fb5a
util, executor: refine the memory usage of delete multiple tables (#3…
XuHuaiyu Nov 30, 2022
63ce793
*: add foreign key check/cascade runtime stats information in explain…
crazycs520 Nov 30, 2022
d20d71f
ddl: don't delay for async commit if MDL is enabled (#39446)
wjhuang2016 Nov 30, 2022
adcacd8
planner: support drop binding by sql digest (#39399)
fzzf678 Nov 30, 2022
8b06ef2
planner: enable cost model2 by default (#39487)
qw4990 Nov 30, 2022
30a8414
ddl: gc mdl etcd key after cleaning the mdl table (#39454)
wjhuang2016 Nov 30, 2022
fa7cf31
*: fix goleak in the statisticstest (#39503)
hawkingrei Nov 30, 2022
dea207b
executor: fix index merge intersection may stuck (#39495)
guo-shaoge Dec 1, 2022
04b676a
distsql_test: fix TestPartitionTableIndexLookUpReader (#39522)
Defined2014 Dec 1, 2022
8e0e49c
*: support JSON format output in explain statement (#39253)
fzzf678 Dec 1, 2022
7add1c8
ttl: refractor ttl pkg into multiple sub packages (#39491)
YangKeao Dec 1, 2022
1f04e14
domain: support dump historical stats in background job (#39417)
Yisaer Dec 1, 2022
8bbf75d
br: Fix overlapped ranges (#39496)
YuJuncen Dec 1, 2022
d1fc5b6
expression: implement `regexp_instr` function pushdown (#39479)
xzhangxian1008 Dec 1, 2022
d3f7ec0
br: skip compatibility check for the mysql.user table when restoring …
MoCuishle28 Dec 1, 2022
09d1a81
bazel: mirror java_tools (#39509)
hawkingrei Dec 1, 2022
78011c5
lightning: add WithDupIndicator to expose status to caller (#39461)
lance6716 Dec 1, 2022
a6eba9b
txn: fix alias related bugs for non-transactional DML (#39459)
ekexium Dec 1, 2022
213187c
server: use advertise addr for autoid service to expose itself (#39497)
tiancaiamao Dec 1, 2022
c3565a1
planner: set cost model to ver1 for clusters upgrading from pre-6.1 v…
qw4990 Dec 1, 2022
6a4b909
parser: add global variable to control ttl syntax (#39483)
YangKeao Dec 1, 2022
e307642
ddl: reuse chunk for copr-read and check context done (#39473)
tangenta Dec 1, 2022
202f723
planner: support create binding from history (#39436)
fzzf678 Dec 1, 2022
9f98f47
restore: Adapt the protocol of caching storage (#39541)
YuJuncen Dec 1, 2022
c8fdfbc
server: fix port of autoid_service (#39552)
tiancaiamao Dec 1, 2022
d354d8d
executor: fix data race on the IndexMergeReaderExecutor (#39513)
hawkingrei Dec 1, 2022
4b1bb5b
log-backup: implement subscription of flush (#39445)
YuJuncen Dec 1, 2022
dcec972
sessionctx: set default val of EnableOuterJoinReorder to true (#39505)
winoros Dec 1, 2022
94ffc8e
error: print non-printable chars in hex style for duplicate entry err…
winkyao Dec 1, 2022
9d9eaca
store/copr: support batch coprocessor requests by store (#39525)
you06 Dec 1, 2022
9eea8f6
expression: implement `regexp_substr` function pushdown (#39536)
xzhangxian1008 Dec 1, 2022
89e9078
planner: fix panic when upgrade from 4.0.16 to master (#39538)
fzzf678 Dec 1, 2022
9a7341e
executor: add tests for property pushed down for partition table (#39…
winoros Dec 1, 2022
7b91e6a
planner: enrich diagnosis info for plan-cache (#39457)
qw4990 Dec 1, 2022
3bb8e79
executor: add globalAnalyzeTracker back (#39500)
XuHuaiyu Dec 1, 2022
12e5272
statistics: enlarge capacity of ddlEventCh to 1000 (#39532)
xuyifangreeneyes Dec 1, 2022
ff89ef2
planner: fill plan digest when create binding from existing plan (#39…
fzzf678 Dec 1, 2022
3f3e102
executor: make analyze killable by oom action (#39539)
chrysan Dec 1, 2022
7dedfab
executor: refactor hashjoin part6 (#39531)
XuHuaiyu Dec 1, 2022
38b0ab7
planner: prohibit StreamAgg with group keys for TiFlash (#39547)
fixdb Dec 1, 2022
dd32b9e
util: add unit tests for password validation (#39540)
CbcWestwolf Dec 1, 2022
272d328
meta/autoid: fix AUTO_ID_CACHE 1 setting affect row id allocator perf…
tiancaiamao Dec 1, 2022
2914d8d
backup: fix the object lock check with other s3 compatible storage (#…
3pointer Dec 1, 2022
2548e66
txn: respect txn-total-size-limit if it is manually set (#39550)
ekexium Dec 1, 2022
40d1ddb
*: support password reuse policy (#39162)
bob34007 Dec 2, 2022
10b3bc7
lightning: refine progress for compress files import (#39219)
lichunzhu Dec 2, 2022
4d11314
plan: refine build plan and skip privilege check for foreign key casc…
crazycs520 Dec 2, 2022
eed9ceb
import: fix dup-detect failure on index data (#39571)
dsdashun Dec 2, 2022
6b4739f
planner: change the stage of count star rewriter rule from logical to…
elsa0520 Dec 2, 2022
62b4e44
planner: fix create binding for prepare from history can't work (#39577)
fzzf678 Dec 2, 2022
7f2ae40
expression: Add json_extract, cast(json as string), json_unquote push…
yibin87 Dec 2, 2022
f799e72
store/copr: disable batch store copr when paging is enabled (#39580)
you06 Dec 2, 2022
cabc018
ddl: improve the log messages and refine code (#39456)
tangenta Dec 2, 2022
34c2a78
planner, ddl: fix hash partition with adding new column (#39574)
wjhuang2016 Dec 2, 2022
0470fa3
ddl: fix issue of add foreign key failed but doesn't rollback (#39583)
crazycs520 Dec 2, 2022
4293053
ddl: move foreign test to speed up ci (#39587)
crazycs520 Dec 2, 2022
824ef60
*: support password expiration policy (#39035)
CbcWestwolf Dec 2, 2022
62557e2
readme, docs: update architecture, logo, wording (#39544)
lilin90 Dec 2, 2022
c3b89e7
mathutil: support exponential average (#39484)
hawkingrei Dec 2, 2022
d045b41
ttl,ddl: disable ttl for fk and temp table (#39581)
YangKeao Dec 2, 2022
e89f341
log-backup: do not rewrite shortvalue iif the value is rollback recor…
joccau Dec 2, 2022
0b1096e
sysvar: fix inconsistency in setting password validation sysvars (#39…
CbcWestwolf Dec 3, 2022
7a1ea93
br: fix br foreign key test (#39607)
crazycs520 Dec 5, 2022
d5885e5
*: simple code for readProjection (#39600)
hawkingrei Dec 5, 2022
e1cc961
dumpling: Set default driverCfg to use TLS first (#39423)
Daemonxiao Dec 5, 2022
2d30149
ttl: Implement scan and delete task for TTL (#39481)
lcwangchao Dec 5, 2022
a7c4c71
ttl: add system table for TTL status (#39315)
YangKeao Dec 5, 2022
0219087
*: fix etcd fail to build on the m1 (#39608)
hawkingrei Dec 5, 2022
e320092
br: fix bug of checkpoint ticker leak (#39622)
sourcelliu Dec 5, 2022
b770bc6
ttl: add info schema cache and ttl table status table cache for ttl s…
YangKeao Dec 5, 2022
7af9eb6
parser: supports create/alter/drop resource group (#39546)
nolouch Dec 5, 2022
5127ad2
statistics: add historical stats testcase (#39612)
Yisaer Dec 5, 2022
35819ee
import: check table empty skips using index (#39604)
dsdashun Dec 5, 2022
71863b4
txn: fix the panic when memdb grows beyond quota (#39621)
ekexium Dec 5, 2022
35319e8
planner: forbid [batch] point get with update read choose tiflash as …
Yisaer Dec 5, 2022
3ee869e
ttl: fix data race in `ttlDeleteWorker` (#39635)
lcwangchao Dec 6, 2022
46ee6af
executor: fix data race in the slowQueryRuntimeStats (#39630)
hawkingrei Dec 6, 2022
1ddc592
planner: update the cost formula of IndexJoin+IndexLookup (#39617)
qw4990 Dec 6, 2022
2ca37cb
planner: throw error when create not supported binding from history (…
fzzf678 Dec 6, 2022
a54faad
*: fix revive false positive with generics (#39666)
hawkingrei Dec 6, 2022
8b76580
backup: config adjust for checkpoint (#39634)
Leavrth Dec 6, 2022
dc6d9a0
util, executor: fix the problem that GetDatumWithBuffer does set null…
XuHuaiyu Dec 6, 2022
be09b67
domain: save action type directly instead of left shift it (#39660)
Defined2014 Dec 7, 2022
032e6fd
br: fix getting region failure with other s3 compatible storage (#39653)
WangLe1321 Dec 7, 2022
442c044
sessionctx: add TiDBDDLEnableDistributeReorg flag (#39663)
Defined2014 Dec 7, 2022
b33ff62
*: enable tidb_enable_foreign_key variable default (#39677)
crazycs520 Dec 7, 2022
a0a16d7
domain: support plan replayer dump workers running in concurrency (#3…
Yisaer Dec 7, 2022
26bbb71
lightning: fix integration test (#39697)
dsdashun Dec 7, 2022
d7d059c
br/streamhelper: added timeout for ticking (#39625)
YuJuncen Dec 7, 2022
2ea253e
ddl: handle ErrNotOwner properly for modify column (#39645)
zimulala Dec 7, 2022
8e742bf
bootstrap: increase current bootstrap version and fix comment (#39700)
YangKeao Dec 7, 2022
a743640
*: enable foreign_key_checks variable by default (#39695)
crazycs520 Dec 7, 2022
05d4256
util: add EMA cpu monitor (#39526)
hawkingrei Dec 7, 2022
770e75b
session: fix data race in TestBootstrap (#39718)
wshwsh12 Dec 7, 2022
edabc32
br: fix integration test cases with `--with-sys-table` (#39655)
MoCuishle28 Dec 7, 2022
8e3cbac
*: bind user to some resource group (#39561)
BornChanger Dec 7, 2022
b6098ef
ddl: assign table record prefix to start/end key if it is empty (#39683)
tangenta Dec 7, 2022
1c77888
stmtsummary: fix data race in the stmtSummaryByDigestElement.authUser…
hawkingrei Dec 7, 2022
6924a44
*: fix panic when add index on prefixed pk tables (#39740)
tangenta Dec 7, 2022
98d84ab
br/streamhelper: fix subscribe error (#39689)
YuJuncen Dec 7, 2022
d9af2d1
Revert "planner: update the cost formula of IndexJoin+IndexLookup" (#…
qw4990 Dec 7, 2022
4ce3386
planner: fix data race in the TestLongBinaryPlan (#39747)
hawkingrei Dec 8, 2022
5348bb3
oomtest: add filter to avoid flaky test in the oomCapture (#39728)
hawkingrei Dec 8, 2022
7134b7b
test: fix unstable test TestStaleReadProcessorWithSelectTable (#37858)
YangKeao Dec 8, 2022
a8fff0f
txn: workaround memdb panic (#39741)
ekexium Dec 8, 2022
c65a93a
planner: check error when building INLJ executor (#39756)
qw4990 Dec 8, 2022
c21dc26
log-backup: set gc disable when restore log (#39729)
joccau Dec 8, 2022
168c2ab
ddl: Stabilise TestAlterModifyColumnOnPartitionedTableFail, due to #3…
mjonss Dec 8, 2022
4b98439
lightning: record network usage (#39673)
buchuitoudegou Dec 8, 2022
754e73a
variable: fix outdated time shift for variable with `TypeTime` (#39720)
YangKeao Dec 8, 2022
6784bfd
sessionctx: move shardRand from TransactionContext to SessionVars to …
tiancaiamao Dec 8, 2022
631f32d
executor: support plan replayer capture <sql> <*> (#39754)
Yisaer Dec 8, 2022
4c04abc
*: support disaggregated tiflash (#33535)
guo-shaoge Dec 8, 2022
2d2f4f5
ttl: add methods to split ttl scan tasks (#39627)
lcwangchao Dec 8, 2022
2a928d8
ddl: unregister add index job after DDL done (#39769)
tangenta Dec 8, 2022
0e1eef3
log-backup: PITR do not support batch if skip requirement check (#39770)
joccau Dec 9, 2022
c19adff
executor: fix issue of execute prepared DML panic with foreign key ca…
crazycs520 Dec 9, 2022
f612724
*: close recordset (#39783)
hawkingrei Dec 9, 2022
96eb4ba
sessionctx/stmtctx: do not use copy-on-read for GetWarnings function …
tiancaiamao Dec 9, 2022
9283650
lightning: update to new TLS API of SQL driver (#39623)
lance6716 Dec 9, 2022
f18be89
br: add retry for azblob read file (#39650)
Leavrth Dec 9, 2022
f681af5
copr: fix data race in the mppIterator (#39772)
hawkingrei Dec 9, 2022
d176b38
testkit: set GOMAXPROCS in test (#39766)
hawkingrei Dec 9, 2022
ef6fb2e
statistics: support download history stats from stats_history (#39701)
Yisaer Dec 9, 2022
59cda14
*: Support Failed-Login Tracking and Temporary Account Locking (#39322)
lastincisor Dec 9, 2022
1ff1342
ddl: mark the writes from delete-only and drop them on merge (#39796)
tangenta Dec 10, 2022
86fc600
fix: update ioutil func&pruning case (#39798)
songzhibin97 Dec 10, 2022
3884b28
dumpling: meter network usage (#39774)
buchuitoudegou Dec 10, 2022
ee5d8cc
staleread: fix flaky test TestStaleReadProcessorWithExecutePreparedSt…
hawkingrei Dec 12, 2022
c13dfe3
domain: fix data race in the MockInfoCacheAndLoadInfoSchema (#39802)
hawkingrei Dec 12, 2022
4731204
*: upgrade rules_go (#39797)
hawkingrei Dec 12, 2022
9488ca9
*: Add backfill job related tables and operations (#39616)
zimulala Dec 12, 2022
965ed00
ttl: implement ttl job schedule framework (#39472)
YangKeao Dec 12, 2022
c8b5c3b
*: stable tiflash test in ddl (#39825)
hawkingrei Dec 12, 2022
fa792b3
planner: fix index prefix matching (#39377)
dveeden Dec 12, 2022
3183582
parser: add cast to array and member of support (#39820)
xiongjiwei Dec 12, 2022
33e5baa
fix: update ioutil.readall (#39850)
songzhibin97 Dec 13, 2022
3f86a11
planner: add three fields to statement summary table (#39828)
fzzf678 Dec 13, 2022
b73eb4b
ddl: fix unexpect fail when create expression index (#39822)
Defined2014 Dec 13, 2022
c332979
ttl: ouput TTL comment format when show create table (#39853)
lcwangchao Dec 13, 2022
95cbc5f
dumpling: add enable paging for tidb server (#39791)
lichunzhu Dec 13, 2022
2dea8dd
planner: support explain format='cost_trace' on model ver2 (#39840)
qw4990 Dec 13, 2022
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
345ac94
Merge remote-tracking branch 'pingcap/feature/reorganize-partition' i…
mjonss Dec 13, 2022
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
16 changes: 12 additions & 4 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,14 @@ def go_deps():
sum = "h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=",
version = "v0.3.4",
)
go_repository(
name = "com_github_cloudfoundry_gosigar",
build_file_proto_mode = "disable",
importpath = "github.com/cloudfoundry/gosigar",
sum = "h1:T3MoGdugg1vdHn8Az7wDn7cZ4+QCjZph+eXf2CjSjo4=",
version = "v1.3.4",
)

go_repository(
name = "com_github_cloudykit_fastprinter",
build_file_proto_mode = "disable_global",
Expand Down Expand Up @@ -3519,8 +3527,8 @@ def go_deps():
name = "com_github_tikv_client_go_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/tikv/client-go/v2",
sum = "h1:Nr2EhvqkOE9xFyU7LV9c9EbsgN3OzVALdbfobK7Fmn4=",
version = "v2.0.3-0.20221205084317-ad59ca833a78",
sum = "h1:/glZOHs/K2pkCioDVae+aThUHFYRYQkEgY4NUTgfh+s=",
version = "v2.0.3",
)
go_repository(
name = "com_github_tikv_pd_client",
Expand Down Expand Up @@ -4438,8 +4446,8 @@ def go_deps():
name = "org_golang_x_sys",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/sys",
sum = "h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=",
version = "v0.2.0",
sum = "h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=",
version = "v0.3.0",
)
go_repository(
name = "org_golang_x_term",
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_rules_go",
sha256 = "ae013bf35bd23234d1dea46b079f1e05ba74ac0321423830119d3e787ec73483",
sha256 = "56d8c5a5c91e1af73eca71a6fab2ced959b67c86d12ba37feedb0a2dfea441a6",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.36.0/rules_go-v0.36.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.36.0/rules_go-v0.36.0.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
],
)

Expand Down
83 changes: 0 additions & 83 deletions bindinfo/bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1388,86 +1388,3 @@ func TestDropBindBySQLDigest(t *testing.T) {
tk.MustGetErrMsg(fmt.Sprintf("drop binding for sql digest '%s'", "1"), "can't find any binding for '1'")
tk.MustGetErrMsg(fmt.Sprintf("drop binding for sql digest '%s'", ""), "sql digest is empty")
}

func TestCreateBindingFromHistory(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
require.NoError(t, tk.Session().Auth(&auth.UserIdentity{Username: "root", Hostname: "%"}, nil, nil))

tk.MustExec("use test")
tk.MustExec("drop table if exists t")
tk.MustExec("create table t1(id int primary key, a int, b int, key(a))")
tk.MustExec("create table t2(id int primary key, a int, b int, key(a))")

var testCases = []struct {
sqls []string
hint string
}{
{
sqls: []string{
"select %s * from t1, t2 where t1.id = t2.id",
"select %s * from test.t1, t2 where t1.id = t2.id",
"select %s * from test.t1, test.t2 where t1.id = t2.id",
"select %s * from t1, test.t2 where t1.id = t2.id",
},
hint: "/*+ merge_join(t1, t2) */",
},
{
sqls: []string{
"select %s * from t1 where a = 1",
"select %s * from test.t1 where a = 1",
},
hint: "/*+ ignore_index(t, a) */",
},
}

for _, testCase := range testCases {
for _, bind := range testCase.sqls {
stmtsummary.StmtSummaryByDigestMap.Clear()
bindSQL := fmt.Sprintf(bind, testCase.hint)
tk.MustExec(bindSQL)
planDigest := tk.MustQuery(fmt.Sprintf("select plan_digest from information_schema.statements_summary where query_sample_text = '%s'", bindSQL)).Rows()
tk.MustExec(fmt.Sprintf("create session binding from history using plan digest '%s'", planDigest[0][0]))
showRes := tk.MustQuery("show bindings").Rows()
require.Equal(t, len(showRes), 1)
require.Equal(t, planDigest[0][0], showRes[0][10])
for _, sql := range testCase.sqls {
tk.MustExec(fmt.Sprintf(sql, ""))
tk.MustQuery("select @@last_plan_from_binding").Check(testkit.Rows("1"))
}
}
showRes := tk.MustQuery("show bindings").Rows()
require.Equal(t, len(showRes), 1)
tk.MustExec(fmt.Sprintf("drop binding for sql digest '%s'", showRes[0][9]))
}

// exception cases
tk.MustGetErrMsg(fmt.Sprintf("create binding from history using plan digest '%s'", "1"), "can't find any plans for '1'")
tk.MustGetErrMsg(fmt.Sprintf("create binding from history using plan digest '%s'", ""), "plan digest is empty")
tk.MustExec("create binding for select * from t1, t2 where t1.id = t2.id using select /*+ merge_join(t1, t2) */ * from t1, t2 where t1.id = t2.id")
showRes := tk.MustQuery("show bindings").Rows()
require.Equal(t, showRes[0][10], "") // plan digest should be nil by create for
}

func TestCreateBindingForPrepareFromHistory(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
require.NoError(t, tk.Session().Auth(&auth.UserIdentity{Username: "root", Hostname: "%"}, nil, nil))

tk.MustExec("use test")
tk.MustExec("drop table if exists t")
tk.MustExec("create table t(id int primary key, a int, key(a))")

tk.MustExec("prepare stmt from 'select /*+ ignore_index(t,a) */ * from t where a = ?'")
tk.MustExec("set @a = 1")
tk.MustExec("execute stmt using @a")
planDigest := tk.MustQuery(fmt.Sprintf("select plan_digest from information_schema.statements_summary where query_sample_text = '%s'", "select /*+ ignore_index(t,a) */ * from t where a = ? [arguments: 1]")).Rows()
showRes := tk.MustQuery("show bindings").Rows()
require.Equal(t, len(showRes), 0)
tk.MustExec(fmt.Sprintf("create binding from history using plan digest '%s'", planDigest[0][0]))
showRes = tk.MustQuery("show bindings").Rows()
require.Equal(t, len(showRes), 1)
require.Equal(t, planDigest[0][0], showRes[0][10])
tk.MustExec("execute stmt using @a")
tk.MustQuery("select @@last_plan_from_binding").Check(testkit.Rows("1"))
}
2 changes: 1 addition & 1 deletion br/COMPATIBILITY_TEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Background

We had some incompatibility issues in the past, which made BR cannot restore backed up data in some situations.
So we need a test workflow to check the compatiblity.
So we need a test workflow to check the compatibility.

## Goal

Expand Down
2 changes: 1 addition & 1 deletion br/cmd/tidb-lightning-ctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func run() error {
if err != nil {
return err
}
if err = cfg.TiDB.Security.RegisterMySQL(); err != nil {
if err = cfg.TiDB.Security.BuildTLSConfig(); err != nil {
return err
}

Expand Down
3 changes: 3 additions & 0 deletions br/pkg/lightning/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ go_library(
"//br/pkg/version/build",
"//expression",
"//planner/core",
"//util",
"//util/promutil",
"@com_github_go_sql_driver_mysql//:mysql",
"@com_github_google_uuid//:uuid",
"@com_github_pingcap_errors//:errors",
"@com_github_pingcap_failpoint//:failpoint",
"@com_github_pingcap_kvproto//pkg/import_sstpb",
Expand Down
14 changes: 13 additions & 1 deletion br/pkg/lightning/backend/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,13 @@ func openDuplicateDB(storeDir string) (*pebble.DB, error) {
return pebble.Open(dbPath, opts)
}

var (
// RunInTest indicates whether the current process is running in test.
RunInTest bool
// LastAlloc is the last ID allocator.
LastAlloc manual.Allocator
)

// NewLocalBackend creates new connections to tikv.
func NewLocalBackend(
ctx context.Context,
Expand Down Expand Up @@ -461,6 +468,11 @@ func NewLocalBackend(
} else {
writeLimiter = noopStoreWriteLimiter{}
}
alloc := manual.Allocator{}
if RunInTest {
alloc.RefCnt = new(atomic.Int64)
LastAlloc = alloc
}
local := &local{
engines: sync.Map{},
pdCtl: pdCtl,
Expand All @@ -486,7 +498,7 @@ func NewLocalBackend(
keyAdapter: keyAdapter,
errorMgr: errorMgr,
importClientFactory: importClientFactory,
bufferPool: membuf.NewPool(membuf.WithAllocator(manual.Allocator{})),
bufferPool: membuf.NewPool(membuf.WithAllocator(alloc)),
writeLimiter: writeLimiter,
logger: log.FromContext(ctx),
encBuilder: NewEncodingBuilder(ctx),
Expand Down
26 changes: 17 additions & 9 deletions br/pkg/lightning/common/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package common

import (
"context"
"crypto/tls"
"database/sql"
"encoding/base64"
"encoding/json"
Expand Down Expand Up @@ -47,14 +48,16 @@ const (

// MySQLConnectParam records the parameters needed to connect to a MySQL database.
type MySQLConnectParam struct {
Host string
Port int
User string
Password string
SQLMode string
MaxAllowedPacket uint64
TLS string
Vars map[string]string
Host string
Port int
User string
Password string
SQLMode string
MaxAllowedPacket uint64
TLSConfig *tls.Config
AllowFallbackToPlaintext bool
Net string
Vars map[string]string
}

func (param *MySQLConnectParam) ToDriverConfig() *mysql.Config {
Expand All @@ -64,11 +67,16 @@ func (param *MySQLConnectParam) ToDriverConfig() *mysql.Config {
cfg.User = param.User
cfg.Passwd = param.Password
cfg.Net = "tcp"
if param.Net != "" {
cfg.Net = param.Net
}
cfg.Addr = net.JoinHostPort(param.Host, strconv.Itoa(param.Port))
cfg.Params["charset"] = "utf8mb4"
cfg.Params["sql_mode"] = fmt.Sprintf("'%s'", param.SQLMode)
cfg.MaxAllowedPacket = int(param.MaxAllowedPacket)
cfg.TLSConfig = param.TLS

cfg.TLS = param.TLSConfig
cfg.AllowFallbackToPlaintext = param.AllowFallbackToPlaintext

for k, v := range param.Vars {
cfg.Params[k] = fmt.Sprintf("'%s'", v)
Expand Down
1 change: 0 additions & 1 deletion br/pkg/lightning/config/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ go_library(
"@com_github_carlmjohnson_flagext//:flagext",
"@com_github_docker_go_units//:go-units",
"@com_github_go_sql_driver_mysql//:mysql",
"@com_github_google_uuid//:uuid",
"@com_github_pingcap_errors//:errors",
"@org_uber_go_atomic//:atomic",
"@org_uber_go_zap//:zap",
Expand Down
Loading