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

expression: Non-existing local timestamps during DST spring forward got converted to 0 instead of getting the transition timestamp #28739

Closed
kennytm opened this issue Oct 12, 2021 · 11 comments · Fixed by #30405
Assignees
Labels

Comments

@kennytm
Copy link
Contributor

kennytm commented Oct 12, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

set time_zone = 'Europe/Vilnius';
select unix_timestamp('2020-03-29 03:45:00');

2. What did you expect to see? (Required)

On MySQL 8.0, after the server time zone got populated:

mysql> select unix_timestamp('2020-03-29 03:45:00');
+---------------------------------------+
| unix_timestamp('2020-03-29 03:45:00') |
+---------------------------------------+
|                            1585443600 |
+---------------------------------------+
1 row in set (0.00 sec)

(Note: 1,585,443,600 = 2020-03-29 01:00:00 UTC, the instant when the spring forward happens)

3. What did you see instead (Required)

mysql> select unix_timestamp('2020-03-29 03:45:00');
+---------------------------------------+
| unix_timestamp('2020-03-29 03:45:00') |
+---------------------------------------+
|                                     0 |
+---------------------------------------+
1 row in set (0.15 sec)

4. What is your TiDB version? (Required)

Release Version: v5.2.1
Edition: Community
Git Commit Hash: cd8fb24c5f7ebd9d479ed228bb41848bd5e97445
Git Branch: heads/refs/tags/v5.2.1
UTC Build Time: 2021-09-08 02:32:56
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
@morgo
Copy link
Contributor

morgo commented Nov 24, 2021

This issue is critical to any user who has their server configured in a timezone which uses DST (it's not that uncommon in North America and Europe).

Consider the case that they use a timestamp to track the order_date of orders, and then have another script that tries to find orders in the last day. Because some of the orders were inserted with a zero date, they would be incorrectly missed.

@mjonss
Copy link
Contributor

mjonss commented Nov 24, 2021

/assign

@mjonss
Copy link
Contributor

mjonss commented Nov 24, 2021

Notice that the specified time is non-existing (i.e. during Daylight Saving Time Leap forward):

$ zdump -v -c 2019,2021 Europe/Vilnius
Europe/Vilnius  -9223372036854775808 = NULL
Europe/Vilnius  -9223372036854689408 = NULL
Europe/Vilnius  Sun Mar 31 00:59:59 2019 UT = Sun Mar 31 02:59:59 2019 EET isdst=0 gmtoff=7200
Europe/Vilnius  Sun Mar 31 01:00:00 2019 UT = Sun Mar 31 04:00:00 2019 EEST isdst=1 gmtoff=10800
Europe/Vilnius  Sun Oct 27 00:59:59 2019 UT = Sun Oct 27 03:59:59 2019 EEST isdst=1 gmtoff=10800
Europe/Vilnius  Sun Oct 27 01:00:00 2019 UT = Sun Oct 27 03:00:00 2019 EET isdst=0 gmtoff=7200
Europe/Vilnius  Sun Mar 29 00:59:59 2020 UT = Sun Mar 29 02:59:59 2020 EET isdst=0 gmtoff=7200
Europe/Vilnius  Sun Mar 29 01:00:00 2020 UT = Sun Mar 29 04:00:00 2020 EEST isdst=1 gmtoff=10800
Europe/Vilnius  Sun Oct 25 00:59:59 2020 UT = Sun Oct 25 03:59:59 2020 EEST isdst=1 gmtoff=10800
Europe/Vilnius  Sun Oct 25 01:00:00 2020 UT = Sun Oct 25 03:00:00 2020 EET isdst=0 gmtoff=7200
Europe/Vilnius  9223372036854689407 = NULL
Europe/Vilnius  9223372036854775807 = NULL

@kennytm
Copy link
Contributor Author

kennytm commented Nov 25, 2021

while DST is common, I doubt if it is really critical to support parsing non-existing local timestamps 🤔

@dveeden
Copy link
Contributor

dveeden commented Nov 25, 2021

while DST is common, I doubt if it is really critical to support parsing non-existing local timestamps thinking

I think failing (returning NULL) would be acceptable, giving a wrong result is more problematic.

@kennytm
Copy link
Contributor Author

kennytm commented Nov 26, 2021

MySQL 8 does return 0 for unsupported input though.

mysql> select unix_timestamp('2039-01-01 00:00:00');
+---------------------------------------+
| unix_timestamp('2039-01-01 00:00:00') |
+---------------------------------------+
|                                     0 |
+---------------------------------------+
1 row in set (0.00 sec)

@dveeden
Copy link
Contributor

dveeden commented Nov 26, 2021

@kennytm I'm ok with returning 0 in places where MySQL 8.0 also does this. However I would rather see us support timestamps past 2038.

@kennytm
Copy link
Contributor Author

kennytm commented Nov 26, 2021

well supporting timestamp outside of 1970–2038 would be a different issue (#30133) 🙃

@tiancaiamao
Copy link
Contributor

I don't this issue need a severity/critical tag, the input data is problematic to trigger it.

@github-actions
Copy link

github-actions bot commented Dec 9, 2021

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

@mjonss
Copy link
Contributor

mjonss commented Dec 9, 2021

I created a proposal for golang time package:
golang/go#50062

kennytm pushed a commit that referenced this issue Dec 10, 2021
* ddl: handle the error from `addBatchDDLJobs()` correctly (#30401)

* br: fix the integration tests (#30423)

* util, cmd: remove unused filesort (#30438)

* *: update client-go for small backoff time (#30436)

* server: Fix unstable tests with FakeAuthSwitch (#30287)

* dumpling: fix dump failed when sequence exists (#30164)

* *: replace compareDatum by compare (#30421)

* lightning: fix gcs max key limit (#30393)

* expression, parser: add built-in func is_uuid (#30318)

* expression: migrate test-infra to testify for constant_fold_test.go (#30424)

* executor: fix pipelined window invalid memory address (#30418)

* makefile: add gotestsum for verify ci (#29848)

* server: close sql rows to fix unstable test (#30306)

* Makefile: add coverage record for BR and Dumpling (#30457)

* executor: track the mem usage of IndexMergeReader (#30210)

* infosync: close body when ReadAll encounters error (#30462)

* planner: show accessed partition when explain mpp query over partition table (#30367)

* *: Fix use of user identity in SHOW GRANTS + error messages (#30294)

* ddl: add not null flag for auto_increment column  (#30477)

* expression: make some unstable test serial (#30323)

* expression: migrate test-infra to testify for constant_propagation_test.go (#30430)

* executor: stable test TestSetDDLReorgBatchSize and TestSetDDLReorgWorkerCnt (#30480)

* statistics, util/ranger: add cardinality estimation trace for `GetRowCountBy...` (#30321)

* *: skip mysql client goroutine leak detection in integration ddl (#30467)

* executor,util: write slow query to slow log no matter what log level (#30461)

* executor: enable index_merge used in transaction. (#29875)

* logutil: add testcase for SlowQueryLogger.MaxDays/MaxSize/MaxBackups (#30316)

* expression: fix data race in builtin_other_vec_generated_test.go (#30503)

* expression: fix data race in the collationInfo (#30490)

* planner/core, session: fix error message of wrong variable scope (#30510)

* lightning: support Re/ReregisterMySQL by different tls name (#30463)

* executor: TestBatchGetandPointGetwithHashPartition test typo (#29669) (#29671)

* mockstore: improve log to avoid panic for nil pointer (#30513)

* *: replace compareDatum by compare, PR 10 (#30456)

* planner: Disable dynamic partition prune mode for all non-autocommit (#27532) (#30505)

* expression: change the log level of an confusing log from warn to debug (#30484)

* br: Check crypter.key valid before backup (#29991)

* *: replace compareDatum by compare, PR 11 (#30465)

* dumpling: fix default column collation with upstream when dump table (#30531)

* server: fix prepared cursor select (#30285)

* executor: HashJoinExec checks the buildError even if the probeSide is empty (#30471)

* parser, expression: follow mysql, increase interval precedence (#30528)

* makefile: set timeout 25m for make race (#30555)

* planner: fix the unstable test TestAnalyzeGlobalStatsWithOpts/2 (#30576)

* expression,types: Adjusts UNIX_TIMESTAMP() for non-existing DST values (#28739) (#30405)

* br: add res.Body.close to avoid leak (#30545)

* lightning: add back integration test lightning_error_summary (#30547)

* sessionctx/variable: small refactor (split large file) (#30511)

* ddl: let `admin cancel ddl jobs` run in a new transaction (#30549)

* *: Retry when placement PutBundles failed (#30590)

Co-authored-by: tangenta <[email protected]>
Co-authored-by: 3pointer <[email protected]>
Co-authored-by: wjHuang <[email protected]>
Co-authored-by: Lei Zhao <[email protected]>
Co-authored-by: Daniël van Eeden <[email protected]>
Co-authored-by: sylzd <[email protected]>
Co-authored-by: Jianjun Liao <[email protected]>
Co-authored-by: unconsolable <[email protected]>
Co-authored-by: tison <[email protected]>
Co-authored-by: Shenghui Wu <[email protected]>
Co-authored-by: Weizhen Wang <[email protected]>
Co-authored-by: guo-shaoge <[email protected]>
Co-authored-by: Ryan Leung <[email protected]>
Co-authored-by: xufei <[email protected]>
Co-authored-by: Morgan Tocker <[email protected]>
Co-authored-by: Zhou Kunqin <[email protected]>
Co-authored-by: 王超 <[email protected]>
Co-authored-by: TonsnakeLin <[email protected]>
Co-authored-by: Ehco <[email protected]>
Co-authored-by: Mattias Jonsson <[email protected]>
Co-authored-by: HuaiyuXu <[email protected]>
Co-authored-by: WizardXiao <[email protected]>
Co-authored-by: xhe <[email protected]>
Co-authored-by: Hangjie Mo <[email protected]>
Co-authored-by: Yuanjia Zhang <[email protected]>
Co-authored-by: glorv <[email protected]>
Co-authored-by: djshow832 <[email protected]>
Co-authored-by: Ti Chi Robot <[email protected]>
fengou1 added a commit that referenced this issue Dec 20, 2021
* executor: fix error msg of granting non-table level privilege (#29321)

* server: fix bug https://asktug.com/t/topic/213082/11 (#29577)

* *: replace compareDatum by compare (#30048)

* executor, store: replace compareDatum by compare (#30044)

* executor: migrate test-infra to testify for executor/write_test.go (#29953)

* planner: add sub plan info of shuffleReceiver when query explain analyze (#27992)

* expression: fix wrong flen for CastAsString funtion (#29563)

* br: migrate test-infra to testify for redact (#29747)

* ddl: stable create expression index test (#29990)

* *: replace compareDatum by compare (#30060)

* planner: fix the issue that binding cannot work when sql_select_limit is enabled  (#29789)

* br : migrate test-infra to testify for lightning/backend/tidb/tidb_test.go (#30042)

* *: fix unstable test in placement gc cases (#30045)

* lightning: let ignore columns be compatible with tidb backend (#27850)

* statistics: replace compareDatum by compare (#30052)

* br/pkg/mock: migrate test-infra to testify (#30034)

* ddl: forbit alter table cache in system db (#29998)

* topsql: distinguish the row and index operation type (#29044)

* ddl, util/codec: fix add index OOM and prevent panic in logging (#29925)

* br/pkg/utils: migrate tests to testify (#30032)

* expression, sessionctx: support rand_seed1 and rand_seed2 sysvar (#29936)

* *: track the memory usage of IndexJoin more accurate (#29068)

* br : migrate test-infra to testify for lightning/backend/importer (#30073)

* planner: fix panic when the join key is scalarFunction (#30002)

* ddl: fix none info of `alter table placement` (#29929)

* expression: cast charset according to the function's resulting charset (#29905)

* *: replace compareDatum by compare and fix compare (#30090)

* store/driver: Use BatchGet method supported in client-go. (#29860)

* privilege: disable role privilege when it is revoked from an user (#30028)

* partition: Show partition reformat (#29945)

* planner: fix the unstable test `TestPartitionWithVariedDatasources` (#30139)

* server: Add a `MockConn` to enable testing connections (#30119)

* *: skip unstable test (#29433)

* skip test

Signed-off-by: yisaer <[email protected]>

* skip unstable test

Signed-off-by: yisaer <[email protected]>

* table/tables: add `StateRemote` interface for the cached table (#29152)

* planner: rebuild range when the range is empty (#30003)

* planner: support dump file for trace plan statement (#30059)

* planner: make clear for MaybeOverOptimized4PlanCache (#29782)

* update: fix the updatable table name resolution in build update list (#30061)

* expression : prevent function DATE_ADD/SUB_STRING_XXX pushed down to TiFlash (#30154)

* *: remove unused profile memory tracker from global tracker (#30143)

* expression, util/codec: fix wrongly eliminated conditions caused by `HashCode()` collision (#30120)

* cmd, expression: fix convert binary string to gbk (#30004)

* sessionctx/variable: make lc_time_names read only (#30084)

* expression: fix misuse of datumsToConstants in GBK test (#30072)

* plugin: add more tests to cover audit logs (#30165)

* planner: consider prefix index column length in skyline pruning (#27527)

* server: support download optimize trace file (#30150)

* expression: add ut config (#30156)

* ddl/ddl_test.go: refactor testTableInfo to return error (#30069)

* *: skip a case in TestClusterTables/ForClusterServerInfo on mac M1 (#29933)

* planner: do not add extra limit when handle the execute stmt (#30152)

* ddl: migrate test-infra to testify for db_cache_test.go (#30117)

* tables: fix data race in mockStatRemoteData (#30180)

* server: Port missing in processlist (#30183)

* server: add build not race flag (#30184)

* unistore: get/batchGet/scan support read-through-lock (#29898)

* topsql: fix nil pointer panic in stmtctx (#30181)

* types: fix wrong str_to_date() microseconds with leading zeros are not converted correctly (#30122)

* dumpling: Add support for `Create Placement` (#29724)

* *: add cardinality estimation trace for `Selectivity` (#29883)

* *: replace compareDatum by compare and ignore warnings is collate is empty (#30105)

* planner: implement aggregation eliminate optimize trace (#30114)

* server: Combined fix for authentication issues (#29738)

* executer: fix data race (#30186)

* dumpling : add a function for the variable call of dm (#30033)

* planner: revise optimize trace logic (#30163)

* statistics: fix unstable test case TestTraceCE (#30235)

* lightning: avoid retry write rows and record duplicate rows in tidb backend (#30179)

* executor: send a task with error to the resultCh when panic happen (#30214)

* docs: update placement policy limits (#30202)

* expression: Support GBK for builtin function AesEncrypt. (#29946)

* executor: remove useless log (#30248)

* docs: Update 2021-09-29-secure-bootstrap.md (#30243)

* executor: fix unstable test of topsql (#30257)

* copr: add paging API for streaming-like process (#29612)

* *: forbid set TiFlash Replica for a table with unsupport charset (#30162)

* privilege, session, server: consistently map user login to identity (#30204)

* expression: fix flen for timestamp_add (#30213)

* types: check values equals to NaN or Inf when convert to float (#30148)

* parser: respect TiDB comment when DROP INDEX IF EXISTS (#30173)

* ddl: disallow change columns from zero int to time (#25728)

* * : statement summary should know the slow write is blocked on read lock lease (#30166)

* planner: regard NULL as point when accessing composite index (#30244)

* planner: Add trace for proj elimination rule (#30275)

* privilege,session: Match loopback connections to 'localhost' accounts (#29995) (#30189)

* ddltest: refactor logutil.InitLogger in ddltest to avoid data race (#30299)

* load data: fix bug if load data with long content (#29222)

* topsql: reduce data race of sql digest (#30296)

* ddl: Do not consider the clustered index when checking the length of the secondary index (#29660)

* *: update client-go to use resolveForRead (#30314)

* ddl/ddl_algorithm_test.go: migrate test-infra to testify (#30268)

* store: Add metrics for pd api call time (#30062)

* *: replace compareDatum by compare and fix wrong optimize order by (#30273)

* metrics/grafana: fix display for 'Start TSO Wait Duration' panel (#30311)

* ddl: migrate test-infra to testify for ddl/options_test.go (#30269)

* planner: fix inconsistent schema between UnionAll and child operator (#30231)

* test: fix incorrect regexp pattern during migrating test (#30080)

* br: add more precise check for lock file (#30218)

* executor: replace should not change other rows when auto ID is out of range (#30301)

* tidb-server: return 1 while failing to set cpu affinity (#30197)

* executor: migrate test-infra to testify for executor/index_lookup_join_test.go (#30260)

* expression: fix wrong result of greatest/least(mixed unsigned/signed int) (#30121)

* types: casting JSON literal `null` to number types should fail (#30278)

* executor: fix data race in oomtest (#30339)

* parser: fix missing charset and collation of handle column (#30320)

* expression: don't append null when param for char() is null (#30236)

* *: add warn log for stale read (#30340)

* parser:  support multi bracket for subquery (#29656)

* session, sessionctx/variable: fix validation recursion bug (#30293)

* planner: Add trace for agg pushdown rule (#30262)

* planner/core: fix a data race when building plan for cached table (#30355)

* executor: avoid sum from avg overflow (#30010)

* config: make EnableSlowLog atomic (#30346)

* *: fix goroutine leak in ddl intergration test (#30369)

* executor: make projection executor unparallel for insert/update/delete (#30290)

* executor, util: reset offsets and nullBitMap for MutRow when setting new values (#30265)

* expression: fix tidb can't alter table from other-type with null value to timestamp with NOT NULL attribute (#29664)

* dumpling: fix default collation with upstream when dump database and table (#30292)

* ddl: fix the enum default value by triming trailing space (#30356)

* expression: migrate test-infra to testify for flag_simplify_test.go (#30407)

* server: refine code logic in handleDownloadFile (#30422)

* refine logic

Signed-off-by: yisaer <[email protected]>

* fix

Signed-off-by: yisaer <[email protected]>

* ddl: migrate test-infra to testify for ddl/table_test.go (#30267)

* ddl: handle the error from `addBatchDDLJobs()` correctly (#30401)

* br: fix the integration tests (#30423)

* util, cmd: remove unused filesort (#30438)

* *: update client-go for small backoff time (#30436)

* server: Fix unstable tests with FakeAuthSwitch (#30287)

* dumpling: fix dump failed when sequence exists (#30164)

* *: replace compareDatum by compare (#30421)

* lightning: fix gcs max key limit (#30393)

* expression, parser: add built-in func is_uuid (#30318)

* expression: migrate test-infra to testify for constant_fold_test.go (#30424)

* executor: fix pipelined window invalid memory address (#30418)

* makefile: add gotestsum for verify ci (#29848)

* server: close sql rows to fix unstable test (#30306)

* Makefile: add coverage record for BR and Dumpling (#30457)

* executor: track the mem usage of IndexMergeReader (#30210)

* infosync: close body when ReadAll encounters error (#30462)

* planner: show accessed partition when explain mpp query over partition table (#30367)

* *: Fix use of user identity in SHOW GRANTS + error messages (#30294)

* ddl: add not null flag for auto_increment column  (#30477)

* expression: make some unstable test serial (#30323)

* expression: migrate test-infra to testify for constant_propagation_test.go (#30430)

* executor: stable test TestSetDDLReorgBatchSize and TestSetDDLReorgWorkerCnt (#30480)

* statistics, util/ranger: add cardinality estimation trace for `GetRowCountBy...` (#30321)

* *: skip mysql client goroutine leak detection in integration ddl (#30467)

* executor,util: write slow query to slow log no matter what log level (#30461)

* executor: enable index_merge used in transaction. (#29875)

* logutil: add testcase for SlowQueryLogger.MaxDays/MaxSize/MaxBackups (#30316)

* expression: fix data race in builtin_other_vec_generated_test.go (#30503)

* expression: fix data race in the collationInfo (#30490)

* planner/core, session: fix error message of wrong variable scope (#30510)

* lightning: support Re/ReregisterMySQL by different tls name (#30463)

* executor: TestBatchGetandPointGetwithHashPartition test typo (#29669) (#29671)

* mockstore: improve log to avoid panic for nil pointer (#30513)

* *: replace compareDatum by compare, PR 10 (#30456)

* planner: Disable dynamic partition prune mode for all non-autocommit (#27532) (#30505)

* expression: change the log level of an confusing log from warn to debug (#30484)

* br: Check crypter.key valid before backup (#29991)

* *: replace compareDatum by compare, PR 11 (#30465)

* dumpling: fix default column collation with upstream when dump table (#30531)

* server: fix prepared cursor select (#30285)

* executor: HashJoinExec checks the buildError even if the probeSide is empty (#30471)

* parser, expression: follow mysql, increase interval precedence (#30528)

* makefile: set timeout 25m for make race (#30555)

* planner: fix the unstable test TestAnalyzeGlobalStatsWithOpts/2 (#30576)

* expression,types: Adjusts UNIX_TIMESTAMP() for non-existing DST values (#28739) (#30405)

* br: add res.Body.close to avoid leak (#30545)

* lightning: add back integration test lightning_error_summary (#30547)

* sessionctx/variable: small refactor (split large file) (#30511)

* ddl: let `admin cancel ddl jobs` run in a new transaction (#30549)

* *: Retry when placement PutBundles failed (#30590)

* dumpling: delete unit test in github actions (#30562)

* *: support trace plan target='estimation' statement (#30491)

* expression: migrate test-infra to testify for integration_test.go (#30548)

* planner: support trace for min/max eliminate (#30441)

* support min/max trace

Signed-off-by: yisaer <[email protected]>

* address the comment

Signed-off-by: yisaer <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>

* br: remove cdclog in br (#30573)

* *: show cmd to check if all needed histograms are loaded (#29672)

* expression: clone repertoire when clone the scalar function (#30602)

* *: use the real StateRemote interface implementation for cached table (#30066)

* *: query failed after add index / timestamp out-of-range (#28424) (#29323)

* planner: implement collecting predicate columns from logical plan (#29878)

* *: show PK name when decoding the clustered index row key (#30623)

* ddl/callback_test.go: migrate test-infra to testify (#30317)

* *: Rename some names of placement ddl operation (#30622)

* executor: fix data race in the index_lookup_hash_join (#30619)

* ddl: remove unnecessary locking when adding an index (#29772)

* server: try to make `TidbTestSuite` more stable (#30643)

* *: Add some PD tests for placement and fix some bug found (#30621)

* *: migrate sync.WaitGroup to util.WaitGroupWrapper (#30644)

* planner: add trace for join eliminate rule (#30343)

* executor: migrate test-infra to testify for executor/shuffle_test.go (#30514)

* planner: make (*AccessPath).OnlyPointRange more succinct (#30520)

* planner: add trace for join reorder (#30394)

* executor: migrate test-infra to testify for executor/union_scan_test.go (#30525)

* expression: make cast return error if cast binary literal to another character set (#30537)

* *: update tikv client (#30670)

* *: update sysutil in go.mod to fix panic when search log (#30523)

* topsql: shouldn't evict the SQL meta, since the evicted SQL can be appear on Other components (TiKV) TopN records (#27050)

* testify: migrate test-infra to testify for analyze_test.go (#30640)

* util: replace compareDatum by compare,  point part (#30575)

* test: make all the tests run in serial (#30692)

* statistics: add mutex for Handle.globalMap and Handle.feedback (#30550)

* executor: fix regular expression in json so that it could match identifer start with '$' (#29750)

* util/testkit/testkit.go: fix typo (#30638)

* planner: Introduce a new global variable to control the historical statistics feature (#30646)

* topsql: introduce datasink interface (#30662)

* planner: unify the argument of stats functions to use SessionCtx instead of StatementContext (#30668)

* metrics: fix the Max SafeTS Gap metrics (#30689)

* lightning: Add source dir existence check for s3 (#30674)

* golangci-lint: support durationcheck (#30027)

* executor: fix data race on IndexHashJoin.cancelFunc (#30701)

* sessionctx/variable: change tidb_store_limit to global only (#30522)

* statistics: remove reassignment of Handle.pool in NewHandle (#30675)

* br: fix some unstable unit test cases. (#30716)

* bindinfo: fix the comment typo (#30616)

* server: support decoding prepared string args to character_set_client (#30723)

* expression: fix enum type join binary get wrong result (#30445)

* cmd/explaintest: fix wrong result comparison for explain test (#30717)

* parallel create tables in br

* metrics: fix copr-cache metrics (#30712)

* test: merge executor's serial tests to other tests (#30711)

* statistics: avoid deadlock when create/drop extended stats and analyze at the same time (#30566)

* ddl: add batch create table api

Signed-off-by: xhe <[email protected]>

* ddl: add unit tests

Signed-off-by: xhe <[email protected]>

* ddl: fix fmt

Signed-off-by: xhe <[email protected]>

* ddl: typo

Co-authored-by: Arenatlx <[email protected]>

* ddl: fix tests

Signed-off-by: xhe <[email protected]>

* ddl: rename to BatchCreateTableWithInfo

Signed-off-by: xhe <[email protected]>

* ddl: trace the error

Signed-off-by: xhe <[email protected]>

* ddl: comments

Signed-off-by: xhe <[email protected]>

* ddl: cancle the job right

Signed-off-by: xhe <[email protected]>

* ddl: cancel the job right 2

Signed-off-by: xhe <[email protected]>

* ddl: report error if entry too large

Signed-off-by: xhe <[email protected]>

* ddl: report error when table is duplicated

Signed-off-by: xhe <[email protected]>

* ddl: go fmt

Signed-off-by: xhe <[email protected]>

* infoschema: improve batch memory perf

Signed-off-by: xhe <[email protected]>

* ddl: retain ID

Signed-off-by: xhe <[email protected]>

* sessionctx: fix the value of analyze_version when upgrading 4.x to 5.… (#30743)

* ddl: reduce log frequency

Signed-off-by: xhe <[email protected]>

* ddl: fix tests

Signed-off-by: xhe <[email protected]>

* server: disable socket listener for `basicHTTPHandlerTestSuite` (#30680)

* planner: support the plan cache aware of bindings (#30169)

* planner: fix early set of plan's statisticsTable (#30754)

* *: implement renew write lock lease for cached table (#30206)

* *: Modify placement rule index to reserve some indexes for future work (#30737)

* executor: add an unit test case for unreasonable invoking Close (#30696)

* planner: fix wrong subquery's coercibility  (#30750)

Co-authored-by: unconsolable <[email protected]>
Co-authored-by: zhangguangchao <[email protected]>
Co-authored-by: wjHuang <[email protected]>
Co-authored-by: Weizhen Wang <[email protected]>
Co-authored-by: mmyj <[email protected]>
Co-authored-by: Shenghui Wu <[email protected]>
Co-authored-by: tison <[email protected]>
Co-authored-by: Yuanjia Zhang <[email protected]>
Co-authored-by: xiaolunzhou <[email protected]>
Co-authored-by: 王超 <[email protected]>
Co-authored-by: glorv <[email protected]>
Co-authored-by: sylzd <[email protected]>
Co-authored-by: Yexiang Zhang <[email protected]>
Co-authored-by: tangenta <[email protected]>
Co-authored-by: Yujie Xia <[email protected]>
Co-authored-by: Hangjie Mo <[email protected]>
Co-authored-by: HuaiyuXu <[email protected]>
Co-authored-by: Song Gao <[email protected]>
Co-authored-by: xiongjiwei <[email protected]>
Co-authored-by: WangDeng <[email protected]>
Co-authored-by: Mattias Jonsson <[email protected]>
Co-authored-by: djshow832 <[email protected]>
Co-authored-by: tiancaiamao <[email protected]>
Co-authored-by: Chengpeng Yan <[email protected]>
Co-authored-by: Arenatlx <[email protected]>
Co-authored-by: Meng Xin <[email protected]>
Co-authored-by: Zhou Kunqin <[email protected]>
Co-authored-by: Youra Cho <[email protected]>
Co-authored-by: Yifan Xu <[email protected]>
Co-authored-by: José Clovis Ramírez de la Rosa <[email protected]>
Co-authored-by: Xiang Zhang <[email protected]>
Co-authored-by: Lei Zhao <[email protected]>
Co-authored-by: Daniël van Eeden <[email protected]>
Co-authored-by: docsir <[email protected]>
Co-authored-by: Morgan Tocker <[email protected]>
Co-authored-by: jakevin <[email protected]>
Co-authored-by: 姬小野 <[email protected]>
Co-authored-by: you06 <[email protected]>
Co-authored-by: lance6716 <[email protected]>
Co-authored-by: TonsnakeLin <[email protected]>
Co-authored-by: imentu <[email protected]>
Co-authored-by: Alkaid <[email protected]>
Co-authored-by: lvtu <[email protected]>
Co-authored-by: 3pointer <[email protected]>
Co-authored-by: Zhuhe Fang <[email protected]>
Co-authored-by: WizardXiao <[email protected]>
Co-authored-by: Jianjun Liao <[email protected]>
Co-authored-by: guo-shaoge <[email protected]>
Co-authored-by: Ryan Leung <[email protected]>
Co-authored-by: xufei <[email protected]>
Co-authored-by: Ehco <[email protected]>
Co-authored-by: Zak Zhao <[email protected]>
Co-authored-by: xhe <[email protected]>
Co-authored-by: Chunzhu Li <[email protected]>
Co-authored-by: Ti Chi Robot <[email protected]>
Co-authored-by: Xiaoju Wu <[email protected]>
Co-authored-by: JmPotato <[email protected]>
Co-authored-by: Zach <[email protected]>
Co-authored-by: bb7133 <[email protected]>
Co-authored-by: crazycs <[email protected]>
Co-authored-by: znhh6018 <[email protected]>
Co-authored-by: eddie lin <[email protected]>
Co-authored-by: dongjunduo <[email protected]>
Co-authored-by: Zhenchi <[email protected]>
Co-authored-by: wangggong <[email protected]>
Co-authored-by: zhangjinpeng1987 <[email protected]>
Co-authored-by: Jack Yu <[email protected]>
Co-authored-by: Arenatlx <[email protected]>
Co-authored-by: Yiding Cui <[email protected]>
fengou1 added a commit that referenced this issue Dec 26, 2021
* executor: migrate test-infra to testify for executor/show_stats_test.go (#30000)

* ddl/table_split_test.go: migrate test-infra to testify (#29960)

* *: fix unstable test caused by TestRandomPanicAggConsume (#30035)

* ddl/ddl_test.go: refactor testSchemaInfo to return error #29964 (#30008)

* executor: remove useless parameter (#30043)

* executor: fix error msg of granting non-table level privilege (#29321)

* server: fix bug https://asktug.com/t/topic/213082/11 (#29577)

* *: replace compareDatum by compare (#30048)

* executor, store: replace compareDatum by compare (#30044)

* executor: migrate test-infra to testify for executor/write_test.go (#29953)

* planner: add sub plan info of shuffleReceiver when query explain analyze (#27992)

* expression: fix wrong flen for CastAsString funtion (#29563)

* br: migrate test-infra to testify for redact (#29747)

* ddl: stable create expression index test (#29990)

* *: replace compareDatum by compare (#30060)

* planner: fix the issue that binding cannot work when sql_select_limit is enabled  (#29789)

* br : migrate test-infra to testify for lightning/backend/tidb/tidb_test.go (#30042)

* *: fix unstable test in placement gc cases (#30045)

* lightning: let ignore columns be compatible with tidb backend (#27850)

* statistics: replace compareDatum by compare (#30052)

* br/pkg/mock: migrate test-infra to testify (#30034)

* ddl: forbit alter table cache in system db (#29998)

* topsql: distinguish the row and index operation type (#29044)

* ddl, util/codec: fix add index OOM and prevent panic in logging (#29925)

* br/pkg/utils: migrate tests to testify (#30032)

* expression, sessionctx: support rand_seed1 and rand_seed2 sysvar (#29936)

* *: track the memory usage of IndexJoin more accurate (#29068)

* br : migrate test-infra to testify for lightning/backend/importer (#30073)

* planner: fix panic when the join key is scalarFunction (#30002)

* ddl: fix none info of `alter table placement` (#29929)

* expression: cast charset according to the function's resulting charset (#29905)

* *: replace compareDatum by compare and fix compare (#30090)

* store/driver: Use BatchGet method supported in client-go. (#29860)

* privilege: disable role privilege when it is revoked from an user (#30028)

* partition: Show partition reformat (#29945)

* planner: fix the unstable test `TestPartitionWithVariedDatasources` (#30139)

* server: Add a `MockConn` to enable testing connections (#30119)

* *: skip unstable test (#29433)

* skip test

Signed-off-by: yisaer <[email protected]>

* skip unstable test

Signed-off-by: yisaer <[email protected]>

* table/tables: add `StateRemote` interface for the cached table (#29152)

* planner: rebuild range when the range is empty (#30003)

* planner: support dump file for trace plan statement (#30059)

* planner: make clear for MaybeOverOptimized4PlanCache (#29782)

* update: fix the updatable table name resolution in build update list (#30061)

* expression : prevent function DATE_ADD/SUB_STRING_XXX pushed down to TiFlash (#30154)

* *: remove unused profile memory tracker from global tracker (#30143)

* expression, util/codec: fix wrongly eliminated conditions caused by `HashCode()` collision (#30120)

* cmd, expression: fix convert binary string to gbk (#30004)

* sessionctx/variable: make lc_time_names read only (#30084)

* expression: fix misuse of datumsToConstants in GBK test (#30072)

* plugin: add more tests to cover audit logs (#30165)

* planner: consider prefix index column length in skyline pruning (#27527)

* server: support download optimize trace file (#30150)

* expression: add ut config (#30156)

* ddl/ddl_test.go: refactor testTableInfo to return error (#30069)

* *: skip a case in TestClusterTables/ForClusterServerInfo on mac M1 (#29933)

* planner: do not add extra limit when handle the execute stmt (#30152)

* ddl: migrate test-infra to testify for db_cache_test.go (#30117)

* tables: fix data race in mockStatRemoteData (#30180)

* server: Port missing in processlist (#30183)

* server: add build not race flag (#30184)

* unistore: get/batchGet/scan support read-through-lock (#29898)

* topsql: fix nil pointer panic in stmtctx (#30181)

* types: fix wrong str_to_date() microseconds with leading zeros are not converted correctly (#30122)

* dumpling: Add support for `Create Placement` (#29724)

* *: add cardinality estimation trace for `Selectivity` (#29883)

* *: replace compareDatum by compare and ignore warnings is collate is empty (#30105)

* planner: implement aggregation eliminate optimize trace (#30114)

* server: Combined fix for authentication issues (#29738)

* executer: fix data race (#30186)

* dumpling : add a function for the variable call of dm (#30033)

* planner: revise optimize trace logic (#30163)

* statistics: fix unstable test case TestTraceCE (#30235)

* lightning: avoid retry write rows and record duplicate rows in tidb backend (#30179)

* executor: send a task with error to the resultCh when panic happen (#30214)

* docs: update placement policy limits (#30202)

* expression: Support GBK for builtin function AesEncrypt. (#29946)

* executor: remove useless log (#30248)

* docs: Update 2021-09-29-secure-bootstrap.md (#30243)

* executor: fix unstable test of topsql (#30257)

* copr: add paging API for streaming-like process (#29612)

* *: forbid set TiFlash Replica for a table with unsupport charset (#30162)

* privilege, session, server: consistently map user login to identity (#30204)

* expression: fix flen for timestamp_add (#30213)

* types: check values equals to NaN or Inf when convert to float (#30148)

* parser: respect TiDB comment when DROP INDEX IF EXISTS (#30173)

* ddl: disallow change columns from zero int to time (#25728)

* * : statement summary should know the slow write is blocked on read lock lease (#30166)

* planner: regard NULL as point when accessing composite index (#30244)

* planner: Add trace for proj elimination rule (#30275)

* privilege,session: Match loopback connections to 'localhost' accounts (#29995) (#30189)

* ddltest: refactor logutil.InitLogger in ddltest to avoid data race (#30299)

* load data: fix bug if load data with long content (#29222)

* topsql: reduce data race of sql digest (#30296)

* ddl: Do not consider the clustered index when checking the length of the secondary index (#29660)

* *: update client-go to use resolveForRead (#30314)

* ddl/ddl_algorithm_test.go: migrate test-infra to testify (#30268)

* store: Add metrics for pd api call time (#30062)

* *: replace compareDatum by compare and fix wrong optimize order by (#30273)

* metrics/grafana: fix display for 'Start TSO Wait Duration' panel (#30311)

* ddl: migrate test-infra to testify for ddl/options_test.go (#30269)

* planner: fix inconsistent schema between UnionAll and child operator (#30231)

* test: fix incorrect regexp pattern during migrating test (#30080)

* br: add more precise check for lock file (#30218)

* executor: replace should not change other rows when auto ID is out of range (#30301)

* tidb-server: return 1 while failing to set cpu affinity (#30197)

* executor: migrate test-infra to testify for executor/index_lookup_join_test.go (#30260)

* expression: fix wrong result of greatest/least(mixed unsigned/signed int) (#30121)

* types: casting JSON literal `null` to number types should fail (#30278)

* executor: fix data race in oomtest (#30339)

* parser: fix missing charset and collation of handle column (#30320)

* expression: don't append null when param for char() is null (#30236)

* *: add warn log for stale read (#30340)

* parser:  support multi bracket for subquery (#29656)

* session, sessionctx/variable: fix validation recursion bug (#30293)

* planner: Add trace for agg pushdown rule (#30262)

* planner/core: fix a data race when building plan for cached table (#30355)

* executor: avoid sum from avg overflow (#30010)

* config: make EnableSlowLog atomic (#30346)

* *: fix goroutine leak in ddl intergration test (#30369)

* executor: make projection executor unparallel for insert/update/delete (#30290)

* executor, util: reset offsets and nullBitMap for MutRow when setting new values (#30265)

* expression: fix tidb can't alter table from other-type with null value to timestamp with NOT NULL attribute (#29664)

* dumpling: fix default collation with upstream when dump database and table (#30292)

* ddl: fix the enum default value by triming trailing space (#30356)

* expression: migrate test-infra to testify for flag_simplify_test.go (#30407)

* server: refine code logic in handleDownloadFile (#30422)

* refine logic

Signed-off-by: yisaer <[email protected]>

* fix

Signed-off-by: yisaer <[email protected]>

* ddl: migrate test-infra to testify for ddl/table_test.go (#30267)

* ddl: handle the error from `addBatchDDLJobs()` correctly (#30401)

* br: fix the integration tests (#30423)

* util, cmd: remove unused filesort (#30438)

* *: update client-go for small backoff time (#30436)

* server: Fix unstable tests with FakeAuthSwitch (#30287)

* dumpling: fix dump failed when sequence exists (#30164)

* *: replace compareDatum by compare (#30421)

* lightning: fix gcs max key limit (#30393)

* expression, parser: add built-in func is_uuid (#30318)

* expression: migrate test-infra to testify for constant_fold_test.go (#30424)

* executor: fix pipelined window invalid memory address (#30418)

* makefile: add gotestsum for verify ci (#29848)

* server: close sql rows to fix unstable test (#30306)

* Makefile: add coverage record for BR and Dumpling (#30457)

* executor: track the mem usage of IndexMergeReader (#30210)

* infosync: close body when ReadAll encounters error (#30462)

* planner: show accessed partition when explain mpp query over partition table (#30367)

* *: Fix use of user identity in SHOW GRANTS + error messages (#30294)

* ddl: add not null flag for auto_increment column  (#30477)

* expression: make some unstable test serial (#30323)

* expression: migrate test-infra to testify for constant_propagation_test.go (#30430)

* executor: stable test TestSetDDLReorgBatchSize and TestSetDDLReorgWorkerCnt (#30480)

* statistics, util/ranger: add cardinality estimation trace for `GetRowCountBy...` (#30321)

* *: skip mysql client goroutine leak detection in integration ddl (#30467)

* executor,util: write slow query to slow log no matter what log level (#30461)

* executor: enable index_merge used in transaction. (#29875)

* logutil: add testcase for SlowQueryLogger.MaxDays/MaxSize/MaxBackups (#30316)

* expression: fix data race in builtin_other_vec_generated_test.go (#30503)

* expression: fix data race in the collationInfo (#30490)

* planner/core, session: fix error message of wrong variable scope (#30510)

* lightning: support Re/ReregisterMySQL by different tls name (#30463)

* executor: TestBatchGetandPointGetwithHashPartition test typo (#29669) (#29671)

* mockstore: improve log to avoid panic for nil pointer (#30513)

* *: replace compareDatum by compare, PR 10 (#30456)

* planner: Disable dynamic partition prune mode for all non-autocommit (#27532) (#30505)

* expression: change the log level of an confusing log from warn to debug (#30484)

* br: Check crypter.key valid before backup (#29991)

* *: replace compareDatum by compare, PR 11 (#30465)

* dumpling: fix default column collation with upstream when dump table (#30531)

* server: fix prepared cursor select (#30285)

* executor: HashJoinExec checks the buildError even if the probeSide is empty (#30471)

* parser, expression: follow mysql, increase interval precedence (#30528)

* makefile: set timeout 25m for make race (#30555)

* planner: fix the unstable test TestAnalyzeGlobalStatsWithOpts/2 (#30576)

* expression,types: Adjusts UNIX_TIMESTAMP() for non-existing DST values (#28739) (#30405)

* br: add res.Body.close to avoid leak (#30545)

* lightning: add back integration test lightning_error_summary (#30547)

* sessionctx/variable: small refactor (split large file) (#30511)

* ddl: let `admin cancel ddl jobs` run in a new transaction (#30549)

* *: Retry when placement PutBundles failed (#30590)

* dumpling: delete unit test in github actions (#30562)

* *: support trace plan target='estimation' statement (#30491)

* expression: migrate test-infra to testify for integration_test.go (#30548)

* planner: support trace for min/max eliminate (#30441)

* support min/max trace

Signed-off-by: yisaer <[email protected]>

* address the comment

Signed-off-by: yisaer <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>

* br: remove cdclog in br (#30573)

* *: show cmd to check if all needed histograms are loaded (#29672)

* expression: clone repertoire when clone the scalar function (#30602)

* *: use the real StateRemote interface implementation for cached table (#30066)

* *: query failed after add index / timestamp out-of-range (#28424) (#29323)

* planner: implement collecting predicate columns from logical plan (#29878)

* *: show PK name when decoding the clustered index row key (#30623)

* ddl/callback_test.go: migrate test-infra to testify (#30317)

* *: Rename some names of placement ddl operation (#30622)

* executor: fix data race in the index_lookup_hash_join (#30619)

* ddl: remove unnecessary locking when adding an index (#29772)

* server: try to make `TidbTestSuite` more stable (#30643)

* *: Add some PD tests for placement and fix some bug found (#30621)

* *: migrate sync.WaitGroup to util.WaitGroupWrapper (#30644)

* planner: add trace for join eliminate rule (#30343)

* executor: migrate test-infra to testify for executor/shuffle_test.go (#30514)

* planner: make (*AccessPath).OnlyPointRange more succinct (#30520)

* planner: add trace for join reorder (#30394)

* executor: migrate test-infra to testify for executor/union_scan_test.go (#30525)

* expression: make cast return error if cast binary literal to another character set (#30537)

* *: update tikv client (#30670)

* *: update sysutil in go.mod to fix panic when search log (#30523)

* topsql: shouldn't evict the SQL meta, since the evicted SQL can be appear on Other components (TiKV) TopN records (#27050)

* testify: migrate test-infra to testify for analyze_test.go (#30640)

* util: replace compareDatum by compare,  point part (#30575)

* test: make all the tests run in serial (#30692)

* statistics: add mutex for Handle.globalMap and Handle.feedback (#30550)

* executor: fix regular expression in json so that it could match identifer start with '$' (#29750)

* util/testkit/testkit.go: fix typo (#30638)

* planner: Introduce a new global variable to control the historical statistics feature (#30646)

* topsql: introduce datasink interface (#30662)

* planner: unify the argument of stats functions to use SessionCtx instead of StatementContext (#30668)

* metrics: fix the Max SafeTS Gap metrics (#30689)

* lightning: Add source dir existence check for s3 (#30674)

* golangci-lint: support durationcheck (#30027)

* executor: fix data race on IndexHashJoin.cancelFunc (#30701)

* sessionctx/variable: change tidb_store_limit to global only (#30522)

* statistics: remove reassignment of Handle.pool in NewHandle (#30675)

* br: fix some unstable unit test cases. (#30716)

* bindinfo: fix the comment typo (#30616)

* server: support decoding prepared string args to character_set_client (#30723)

* expression: fix enum type join binary get wrong result (#30445)

* cmd/explaintest: fix wrong result comparison for explain test (#30717)

* parallel create tables in br

* metrics: fix copr-cache metrics (#30712)

* test: merge executor's serial tests to other tests (#30711)

* ddl: add batch create table api

Signed-off-by: xhe <[email protected]>

* ddl: add unit tests

Signed-off-by: xhe <[email protected]>

* ddl: fix fmt

Signed-off-by: xhe <[email protected]>

* ddl: typo

Co-authored-by: Arenatlx <[email protected]>

* ddl: fix tests

Signed-off-by: xhe <[email protected]>

* ddl: rename to BatchCreateTableWithInfo

Signed-off-by: xhe <[email protected]>

* ddl: trace the error

Signed-off-by: xhe <[email protected]>

* ddl: comments

Signed-off-by: xhe <[email protected]>

* ddl: cancle the job right

Signed-off-by: xhe <[email protected]>

* ddl: cancel the job right 2

Signed-off-by: xhe <[email protected]>

* ddl: report error if entry too large

Signed-off-by: xhe <[email protected]>

* ddl: report error when table is duplicated

Signed-off-by: xhe <[email protected]>

* ddl: go fmt

Signed-off-by: xhe <[email protected]>

* infoschema: improve batch memory perf

Signed-off-by: xhe <[email protected]>

* ddl: retain ID

Signed-off-by: xhe <[email protected]>

* ddl: reduce log frequency

Signed-off-by: xhe <[email protected]>

* ddl: fix tests

Signed-off-by: xhe <[email protected]>

* fix merge issue

* fix issue that loss table restore

* refactoring code

* refactoring code

Co-authored-by: Weizhen Wang <[email protected]>
Co-authored-by: wangggong <[email protected]>
Co-authored-by: 王超 <[email protected]>
Co-authored-by: José Clovis Ramírez de la Rosa <[email protected]>
Co-authored-by: unconsolable <[email protected]>
Co-authored-by: zhangguangchao <[email protected]>
Co-authored-by: wjHuang <[email protected]>
Co-authored-by: mmyj <[email protected]>
Co-authored-by: Shenghui Wu <[email protected]>
Co-authored-by: tison <[email protected]>
Co-authored-by: Yuanjia Zhang <[email protected]>
Co-authored-by: xiaolunzhou <[email protected]>
Co-authored-by: glorv <[email protected]>
Co-authored-by: sylzd <[email protected]>
Co-authored-by: Yexiang Zhang <[email protected]>
Co-authored-by: tangenta <[email protected]>
Co-authored-by: Yujie Xia <[email protected]>
Co-authored-by: Hangjie Mo <[email protected]>
Co-authored-by: HuaiyuXu <[email protected]>
Co-authored-by: Song Gao <[email protected]>
Co-authored-by: xiongjiwei <[email protected]>
Co-authored-by: WangDeng <[email protected]>
Co-authored-by: Mattias Jonsson <[email protected]>
Co-authored-by: djshow832 <[email protected]>
Co-authored-by: tiancaiamao <[email protected]>
Co-authored-by: Chengpeng Yan <[email protected]>
Co-authored-by: Arenatlx <[email protected]>
Co-authored-by: Meng Xin <[email protected]>
Co-authored-by: Zhou Kunqin <[email protected]>
Co-authored-by: Youra Cho <[email protected]>
Co-authored-by: Yifan Xu <[email protected]>
Co-authored-by: Xiang Zhang <[email protected]>
Co-authored-by: Lei Zhao <[email protected]>
Co-authored-by: Daniël van Eeden <[email protected]>
Co-authored-by: docsir <[email protected]>
Co-authored-by: Morgan Tocker <[email protected]>
Co-authored-by: jakevin <[email protected]>
Co-authored-by: 姬小野 <[email protected]>
Co-authored-by: you06 <[email protected]>
Co-authored-by: lance6716 <[email protected]>
Co-authored-by: TonsnakeLin <[email protected]>
Co-authored-by: imentu <[email protected]>
Co-authored-by: Alkaid <[email protected]>
Co-authored-by: lvtu <[email protected]>
Co-authored-by: 3pointer <[email protected]>
Co-authored-by: Zhuhe Fang <[email protected]>
Co-authored-by: WizardXiao <[email protected]>
Co-authored-by: Jianjun Liao <[email protected]>
Co-authored-by: guo-shaoge <[email protected]>
Co-authored-by: Ryan Leung <[email protected]>
Co-authored-by: xufei <[email protected]>
Co-authored-by: Ehco <[email protected]>
Co-authored-by: Zak Zhao <[email protected]>
Co-authored-by: xhe <[email protected]>
Co-authored-by: Chunzhu Li <[email protected]>
Co-authored-by: Ti Chi Robot <[email protected]>
Co-authored-by: Xiaoju Wu <[email protected]>
Co-authored-by: JmPotato <[email protected]>
Co-authored-by: Zach <[email protected]>
Co-authored-by: bb7133 <[email protected]>
Co-authored-by: crazycs <[email protected]>
Co-authored-by: znhh6018 <[email protected]>
Co-authored-by: eddie lin <[email protected]>
Co-authored-by: dongjunduo <[email protected]>
Co-authored-by: Zhenchi <[email protected]>
Co-authored-by: zhangjinpeng1987 <[email protected]>
Co-authored-by: Jack Yu <[email protected]>
Co-authored-by: Arenatlx <[email protected]>
fengou1 added a commit that referenced this issue Dec 27, 2021
* dumpling: fix default collation with upstream when dump database and table (#30292)

* ddl: fix the enum default value by triming trailing space (#30356)

* expression: migrate test-infra to testify for flag_simplify_test.go (#30407)

* server: refine code logic in handleDownloadFile (#30422)

* refine logic

Signed-off-by: yisaer <[email protected]>

* fix

Signed-off-by: yisaer <[email protected]>

* ddl: migrate test-infra to testify for ddl/table_test.go (#30267)

* ddl: handle the error from `addBatchDDLJobs()` correctly (#30401)

* br: fix the integration tests (#30423)

* util, cmd: remove unused filesort (#30438)

* *: update client-go for small backoff time (#30436)

* server: Fix unstable tests with FakeAuthSwitch (#30287)

* dumpling: fix dump failed when sequence exists (#30164)

* *: replace compareDatum by compare (#30421)

* lightning: fix gcs max key limit (#30393)

* expression, parser: add built-in func is_uuid (#30318)

* expression: migrate test-infra to testify for constant_fold_test.go (#30424)

* executor: fix pipelined window invalid memory address (#30418)

* makefile: add gotestsum for verify ci (#29848)

* server: close sql rows to fix unstable test (#30306)

* Makefile: add coverage record for BR and Dumpling (#30457)

* executor: track the mem usage of IndexMergeReader (#30210)

* infosync: close body when ReadAll encounters error (#30462)

* planner: show accessed partition when explain mpp query over partition table (#30367)

* *: Fix use of user identity in SHOW GRANTS + error messages (#30294)

* ddl: add not null flag for auto_increment column  (#30477)

* expression: make some unstable test serial (#30323)

* expression: migrate test-infra to testify for constant_propagation_test.go (#30430)

* executor: stable test TestSetDDLReorgBatchSize and TestSetDDLReorgWorkerCnt (#30480)

* statistics, util/ranger: add cardinality estimation trace for `GetRowCountBy...` (#30321)

* *: skip mysql client goroutine leak detection in integration ddl (#30467)

* executor,util: write slow query to slow log no matter what log level (#30461)

* executor: enable index_merge used in transaction. (#29875)

* logutil: add testcase for SlowQueryLogger.MaxDays/MaxSize/MaxBackups (#30316)

* expression: fix data race in builtin_other_vec_generated_test.go (#30503)

* expression: fix data race in the collationInfo (#30490)

* planner/core, session: fix error message of wrong variable scope (#30510)

* lightning: support Re/ReregisterMySQL by different tls name (#30463)

* executor: TestBatchGetandPointGetwithHashPartition test typo (#29669) (#29671)

* mockstore: improve log to avoid panic for nil pointer (#30513)

* *: replace compareDatum by compare, PR 10 (#30456)

* planner: Disable dynamic partition prune mode for all non-autocommit (#27532) (#30505)

* expression: change the log level of an confusing log from warn to debug (#30484)

* br: Check crypter.key valid before backup (#29991)

* *: replace compareDatum by compare, PR 11 (#30465)

* dumpling: fix default column collation with upstream when dump table (#30531)

* server: fix prepared cursor select (#30285)

* executor: HashJoinExec checks the buildError even if the probeSide is empty (#30471)

* parser, expression: follow mysql, increase interval precedence (#30528)

* makefile: set timeout 25m for make race (#30555)

* planner: fix the unstable test TestAnalyzeGlobalStatsWithOpts/2 (#30576)

* expression,types: Adjusts UNIX_TIMESTAMP() for non-existing DST values (#28739) (#30405)

* br: add res.Body.close to avoid leak (#30545)

* lightning: add back integration test lightning_error_summary (#30547)

* sessionctx/variable: small refactor (split large file) (#30511)

* ddl: let `admin cancel ddl jobs` run in a new transaction (#30549)

* *: Retry when placement PutBundles failed (#30590)

* dumpling: delete unit test in github actions (#30562)

* *: support trace plan target='estimation' statement (#30491)

* expression: migrate test-infra to testify for integration_test.go (#30548)

* planner: support trace for min/max eliminate (#30441)

* support min/max trace

Signed-off-by: yisaer <[email protected]>

* address the comment

Signed-off-by: yisaer <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>

* br: remove cdclog in br (#30573)

* *: show cmd to check if all needed histograms are loaded (#29672)

* expression: clone repertoire when clone the scalar function (#30602)

* *: use the real StateRemote interface implementation for cached table (#30066)

* *: query failed after add index / timestamp out-of-range (#28424) (#29323)

* planner: implement collecting predicate columns from logical plan (#29878)

* *: show PK name when decoding the clustered index row key (#30623)

* ddl/callback_test.go: migrate test-infra to testify (#30317)

* *: Rename some names of placement ddl operation (#30622)

* executor: fix data race in the index_lookup_hash_join (#30619)

* ddl: remove unnecessary locking when adding an index (#29772)

* server: try to make `TidbTestSuite` more stable (#30643)

* *: Add some PD tests for placement and fix some bug found (#30621)

* *: migrate sync.WaitGroup to util.WaitGroupWrapper (#30644)

* planner: add trace for join eliminate rule (#30343)

* executor: migrate test-infra to testify for executor/shuffle_test.go (#30514)

* planner: make (*AccessPath).OnlyPointRange more succinct (#30520)

* planner: add trace for join reorder (#30394)

* executor: migrate test-infra to testify for executor/union_scan_test.go (#30525)

* expression: make cast return error if cast binary literal to another character set (#30537)

* *: update tikv client (#30670)

* *: update sysutil in go.mod to fix panic when search log (#30523)

* topsql: shouldn't evict the SQL meta, since the evicted SQL can be appear on Other components (TiKV) TopN records (#27050)

* testify: migrate test-infra to testify for analyze_test.go (#30640)

* util: replace compareDatum by compare,  point part (#30575)

* test: make all the tests run in serial (#30692)

* statistics: add mutex for Handle.globalMap and Handle.feedback (#30550)

* executor: fix regular expression in json so that it could match identifer start with '$' (#29750)

* util/testkit/testkit.go: fix typo (#30638)

* planner: Introduce a new global variable to control the historical statistics feature (#30646)

* topsql: introduce datasink interface (#30662)

* planner: unify the argument of stats functions to use SessionCtx instead of StatementContext (#30668)

* metrics: fix the Max SafeTS Gap metrics (#30689)

* lightning: Add source dir existence check for s3 (#30674)

* golangci-lint: support durationcheck (#30027)

* executor: fix data race on IndexHashJoin.cancelFunc (#30701)

* sessionctx/variable: change tidb_store_limit to global only (#30522)

* statistics: remove reassignment of Handle.pool in NewHandle (#30675)

* br: fix some unstable unit test cases. (#30716)

* bindinfo: fix the comment typo (#30616)

* server: support decoding prepared string args to character_set_client (#30723)

* expression: fix enum type join binary get wrong result (#30445)

* cmd/explaintest: fix wrong result comparison for explain test (#30717)

* parallel create tables in br

* metrics: fix copr-cache metrics (#30712)

* test: merge executor's serial tests to other tests (#30711)

* statistics: avoid deadlock when create/drop extended stats and analyze at the same time (#30566)

* ddl: add batch create table api

Signed-off-by: xhe <[email protected]>

* ddl: add unit tests

Signed-off-by: xhe <[email protected]>

* ddl: fix fmt

Signed-off-by: xhe <[email protected]>

* ddl: typo

Co-authored-by: Arenatlx <[email protected]>

* ddl: fix tests

Signed-off-by: xhe <[email protected]>

* ddl: rename to BatchCreateTableWithInfo

Signed-off-by: xhe <[email protected]>

* ddl: trace the error

Signed-off-by: xhe <[email protected]>

* ddl: comments

Signed-off-by: xhe <[email protected]>

* ddl: cancle the job right

Signed-off-by: xhe <[email protected]>

* ddl: cancel the job right 2

Signed-off-by: xhe <[email protected]>

* ddl: report error if entry too large

Signed-off-by: xhe <[email protected]>

* ddl: report error when table is duplicated

Signed-off-by: xhe <[email protected]>

* ddl: go fmt

Signed-off-by: xhe <[email protected]>

* infoschema: improve batch memory perf

Signed-off-by: xhe <[email protected]>

* ddl: retain ID

Signed-off-by: xhe <[email protected]>

* sessionctx: fix the value of analyze_version when upgrading 4.x to 5.… (#30743)

* ddl: reduce log frequency

Signed-off-by: xhe <[email protected]>

* ddl: fix tests

Signed-off-by: xhe <[email protected]>

* server: disable socket listener for `basicHTTPHandlerTestSuite` (#30680)

* planner: support the plan cache aware of bindings (#30169)

* planner: fix early set of plan's statisticsTable (#30754)

* *: implement renew write lock lease for cached table (#30206)

* *: Modify placement rule index to reserve some indexes for future work (#30737)

* executor: add an unit test case for unreasonable invoking Close (#30696)

* planner: fix wrong subquery's coercibility  (#30750)

* executor: add more testcases for index merge (#30497)

* server: add grpc server config for a suitable behavior (#30774)

* config, charset: make charset config not affected by collation config (#30572)

* lightning: emit tidb log by change FilterCore to only allow matched packages (#30700)

* topsql: a centralized place to generate tipb report data (#30781)

* planner: add trace for partition pruning (#30546)

* planner: refine collation handling for between (#30793)

* test: merge serial tests in bindinfo, expression, parser and statistics (#30749)

* br: update log description for split check (#30763)

* *: replace compareDatum by compare, range part (#30710)

* *: placement policy ref will be converted to direct options when recover or flashback table (#30705)

* ddl: handle the incorrect number of placement followers (#30715)

* ddl: revert "ddl: remove unnecessary locking when adding an index" (#30667)

* br/pkg/task: migrate test-infra to testify (#30605)

* *: fix the flen type datetime for union/case-when/control-funcs (#30588)

* types, util: clean up compareDatum (#30815)

* ddl: add helper function to set and query TiFlash's sync status (#30473)

* dumpling: fix more dumpling log level query template (#30176)

* parser: support `admin flush plan_cache` (#30747)

* topsql: support multiple datasinks (#30808)

* br: update permission, so tikv can write to folder when backup to local (#30396)

* session: fix bootstrap to only persist global variables (#30593)

close #28667

* docs/design: update collation compatibility issues in charsets doc (#30806)

* executor: improve SET sysvar=DEFAULT handling (#29680)

close #29670

* br: add error handling for group context cancel when restore file is corrupted (#30190)

close #30135

* executor: buildWindow cannot call typeInfer twice (#30773)

close #30402

* *: refactor encoding and uniform usages (#30288)

* lightning: optimize region split check logic (#30428)

close #30018

* br: ignore mock directory when gcov in br (#30586)

* *: forbid set tiflash replica count for a placement table (#30844)

close #30741

* execute: don't transform charset in internal sql (#30843)

close #30789

* planner: update PlanBuilder.windowSpecs when building subquery (#30878)

close #30804

* br: fix S3 backup endpoint suffix (#30530)

close #30104

* lightning: make pre-check output message clearer (#30439)

close #30395

* expression: wrap to_binary and from_binary for cast function's argument (#30706)

* executor: fix bug when using IndexMerge in transaction (#30719)

close #30685

* ddl: migrate test-infra to testify for ddl/foreign_key_test.go (#30853)

close #29103

* expression: fix wrong retType for reverse function (#30829)

close #30809

* planner: support trace topn push down (#30800)

ref #29661

* github: add issue requirement to pull request template (#30817)

close #30814

* fix merge issue

* topsql: introduce stmtstats and sql execution count (#30277)

* topsql: add pubsub datasink (#30860)

* executor: fix the incorrect untouch used in optimistic transactions (#30447)

close #30410

* expression, cmd: let crc32() support gbk (#30900)

close #30898

* server: Add uptime status var and statistics (#29790)

close #8842

* br: error log optimization (#29640)

close #27015

* planner: fix wrong collation when rewrite in condition (#30492)

close #30486

* planner: add extractor for tikv_region_peers (#30656)

* fix issue that loss table restore

* lightning: add back table empty check and add a switch config (#30887)

close #27919

* br: improve backoff unit test (#30892)

* *: add TxnManager to manage txn in session (#30574)

* *: add TxnManager to manage txn in session

* modify

* add tests

* move failpoint content to a single file

* Makefile: add `t.Parallel` check to ensure tests are run in serial (#30869)

* refactoring code

* refactoring code

* placement: remove isolationlevel (#30859)

close #30858

* planner: revise the optimize trace output (#30882)

* table: set the datum collation correctly in CastValue() (#30931)

close #30930

* *: Use TxnManager.GetTxnInfoSchema() to get the txn infoschema (#30934)

close #30933

* parser: add IsValid() to Encoding to speed up string validation for UTF-8 (#30937)

close #30936

* planner: rename pstmtPlanCacheXX to PlanCacheXX (#30909)

* table/tables: make CI TestCacheTableBasicReadAndWrite more stable (#30924)

close #30922

* restore: use new ScatterRegions API (#30899)

close #30425

* *: when placement conflicts with tiflash, cancel the job (#30945)

* Makefile,tools: make CI great again! (#30828)

close #30822

* br/pkg/membuf: remove global buffer pool (#29934)

* ddl: add format error for incorrect dict syntax in the placement rule (#30919)

close #30454

* planner: fix index merge plan when expr cannot be pushed to tikv (#30341)

close #30200

* executor: display 'show create table' and INFOSCHEMA for cached table correctly (#30951)

close #30950

* br: extend the timeout for scan region since 3 seconds is not enough (#30889)

close #30720

* planner: remove bindSQL from planCacheKey to planCacheValue (#30916)

* execution: refine precision of cast as decimal in agg func (#30805)

* *: fix data race in the tikv_client (#30964)

close #30658

* ddl: migrate test-infra to testify for ddl/db_partition_test.go (#30952)

close #28635

* planner: fix `AccessPath.TableFilters` got modified unexpectedly (#30966)

close #30965

* test: merge serial tests in ddl, infoschema, session, store, table, telemetry and types (#30874)

* executor: fix the returned field count of the prepare statement (#30981)

close #30971

* binlog: allow multiple ddl targets (#30904)

* planner: trace predicate push down  (#30902)

ref #29661

* placement: give default 2 followers for non-sugar syntax (#31000)

* flatten the json output (#30905)

Signed-off-by: yisaer <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>

* test: control log level with environment variables (#30871)

* planner: add usage of paging copr in optimizer (#30536)

close #30578

* test: merge serial tests in cmd, planner, server, util (#31003)

* planner: change predicateColumnCollector to columnStatsUsageCollector and collect histogram-needed columns (#30671)

* executor: migrate test-infra to testify for distsql_test.go (#31023)

close #28574

* remote uncessary package errors

* reused the retry code from lightning

* refactoring retryable

* ddl: add batch create table api

Signed-off-by: xhe <[email protected]>

* ddl: add unit tests

Signed-off-by: xhe <[email protected]>

* ddl: fix fmt

Signed-off-by: xhe <[email protected]>

* br ddl code

* parallel create tables in br

* ddl: add batch create table api

Signed-off-by: xhe <[email protected]>

* ddl: add unit tests

Signed-off-by: xhe <[email protected]>

* ddl: fix fmt

Signed-off-by: xhe <[email protected]>

* ddl: typo

Co-authored-by: Arenatlx <[email protected]>

* ddl: fix tests

Signed-off-by: xhe <[email protected]>

* ddl: rename to BatchCreateTableWithInfo

Signed-off-by: xhe <[email protected]>

* ddl: trace the error

Signed-off-by: xhe <[email protected]>

* ddl: comments

Signed-off-by: xhe <[email protected]>

* ddl: cancle the job right

Signed-off-by: xhe <[email protected]>

* ddl: cancel the job right 2

Signed-off-by: xhe <[email protected]>

* ddl: report error if entry too large

Signed-off-by: xhe <[email protected]>

* ddl: report error when table is duplicated

Signed-off-by: xhe <[email protected]>

* ddl: go fmt

Signed-off-by: xhe <[email protected]>

* infoschema: improve batch memory perf

Signed-off-by: xhe <[email protected]>

* ddl: retain ID

Signed-off-by: xhe <[email protected]>

* ddl: reduce log frequency

Signed-off-by: xhe <[email protected]>

* ddl: fix tests

Signed-off-by: xhe <[email protected]>

* ddl: remove retainID from the interface

Signed-off-by: xhe <[email protected]>

* ddl: fix tests

Signed-off-by: xhe <[email protected]>

* executor: fix rebasing problem

Signed-off-by: xhe <[email protected]>

Co-authored-by: WizardXiao <[email protected]>
Co-authored-by: sylzd <[email protected]>
Co-authored-by: tison <[email protected]>
Co-authored-by: Song Gao <[email protected]>
Co-authored-by: Weizhen Wang <[email protected]>
Co-authored-by: tangenta <[email protected]>
Co-authored-by: 3pointer <[email protected]>
Co-authored-by: wjHuang <[email protected]>
Co-authored-by: Lei Zhao <[email protected]>
Co-authored-by: Daniël van Eeden <[email protected]>
Co-authored-by: Jianjun Liao <[email protected]>
Co-authored-by: unconsolable <[email protected]>
Co-authored-by: Shenghui Wu <[email protected]>
Co-authored-by: guo-shaoge <[email protected]>
Co-authored-by: Ryan Leung <[email protected]>
Co-authored-by: xufei <[email protected]>
Co-authored-by: Morgan Tocker <[email protected]>
Co-authored-by: Zhou Kunqin <[email protected]>
Co-authored-by: 王超 <[email protected]>
Co-authored-by: TonsnakeLin <[email protected]>
Co-authored-by: Ehco <[email protected]>
Co-authored-by: Mattias Jonsson <[email protected]>
Co-authored-by: HuaiyuXu <[email protected]>
Co-authored-by: Zak Zhao <[email protected]>
Co-authored-by: xhe <[email protected]>
Co-authored-by: Hangjie Mo <[email protected]>
Co-authored-by: Yuanjia Zhang <[email protected]>
Co-authored-by: glorv <[email protected]>
Co-authored-by: djshow832 <[email protected]>
Co-authored-by: Chunzhu Li <[email protected]>
Co-authored-by: Ti Chi Robot <[email protected]>
Co-authored-by: Xiaoju Wu <[email protected]>
Co-authored-by: xiongjiwei <[email protected]>
Co-authored-by: tiancaiamao <[email protected]>
Co-authored-by: Yifan Xu <[email protected]>
Co-authored-by: JmPotato <[email protected]>
Co-authored-by: Zach <[email protected]>
Co-authored-by: bb7133 <[email protected]>
Co-authored-by: lvtu <[email protected]>
Co-authored-by: crazycs <[email protected]>
Co-authored-by: znhh6018 <[email protected]>
Co-authored-by: eddie lin <[email protected]>
Co-authored-by: dongjunduo <[email protected]>
Co-authored-by: Zhenchi <[email protected]>
Co-authored-by: wangggong <[email protected]>
Co-authored-by: zhangjinpeng1987 <[email protected]>
Co-authored-by: Jack Yu <[email protected]>
Co-authored-by: Arenatlx <[email protected]>
Co-authored-by: Yiding Cui <[email protected]>
Co-authored-by: Chengpeng Yan <[email protected]>
Co-authored-by: bestwoody <[email protected]>
Co-authored-by: Calvin Neo <[email protected]>
Co-authored-by: Lynn <[email protected]>
Co-authored-by: Zhuhe Fang <[email protected]>
Co-authored-by: Mini256 <[email protected]>
Co-authored-by: Xiang Zhang <[email protected]>
Co-authored-by: Yexiang Zhang <[email protected]>
Co-authored-by: cfzjywxk <[email protected]>
Co-authored-by: db <[email protected]>
Co-authored-by: 山岚 <[email protected]>
Co-authored-by: Yujie Xia <[email protected]>
Co-authored-by: Yilong Li <[email protected]>
Co-authored-by: tuuuuuu <[email protected]>
Co-authored-by: qupeng <[email protected]>
Co-authored-by: you06 <[email protected]>
fengou1 added a commit that referenced this issue Dec 27, 2021
* br: fix the integration tests (#30423)

* util, cmd: remove unused filesort (#30438)

* *: update client-go for small backoff time (#30436)

* server: Fix unstable tests with FakeAuthSwitch (#30287)

* dumpling: fix dump failed when sequence exists (#30164)

* *: replace compareDatum by compare (#30421)

* lightning: fix gcs max key limit (#30393)

* expression, parser: add built-in func is_uuid (#30318)

* expression: migrate test-infra to testify for constant_fold_test.go (#30424)

* executor: fix pipelined window invalid memory address (#30418)

* makefile: add gotestsum for verify ci (#29848)

* server: close sql rows to fix unstable test (#30306)

* Makefile: add coverage record for BR and Dumpling (#30457)

* executor: track the mem usage of IndexMergeReader (#30210)

* infosync: close body when ReadAll encounters error (#30462)

* planner: show accessed partition when explain mpp query over partition table (#30367)

* *: Fix use of user identity in SHOW GRANTS + error messages (#30294)

* ddl: add not null flag for auto_increment column  (#30477)

* expression: make some unstable test serial (#30323)

* expression: migrate test-infra to testify for constant_propagation_test.go (#30430)

* executor: stable test TestSetDDLReorgBatchSize and TestSetDDLReorgWorkerCnt (#30480)

* statistics, util/ranger: add cardinality estimation trace for `GetRowCountBy...` (#30321)

* *: skip mysql client goroutine leak detection in integration ddl (#30467)

* executor,util: write slow query to slow log no matter what log level (#30461)

* executor: enable index_merge used in transaction. (#29875)

* logutil: add testcase for SlowQueryLogger.MaxDays/MaxSize/MaxBackups (#30316)

* expression: fix data race in builtin_other_vec_generated_test.go (#30503)

* expression: fix data race in the collationInfo (#30490)

* planner/core, session: fix error message of wrong variable scope (#30510)

* lightning: support Re/ReregisterMySQL by different tls name (#30463)

* executor: TestBatchGetandPointGetwithHashPartition test typo (#29669) (#29671)

* mockstore: improve log to avoid panic for nil pointer (#30513)

* *: replace compareDatum by compare, PR 10 (#30456)

* planner: Disable dynamic partition prune mode for all non-autocommit (#27532) (#30505)

* expression: change the log level of an confusing log from warn to debug (#30484)

* br: Check crypter.key valid before backup (#29991)

* *: replace compareDatum by compare, PR 11 (#30465)

* dumpling: fix default column collation with upstream when dump table (#30531)

* server: fix prepared cursor select (#30285)

* executor: HashJoinExec checks the buildError even if the probeSide is empty (#30471)

* parser, expression: follow mysql, increase interval precedence (#30528)

* makefile: set timeout 25m for make race (#30555)

* planner: fix the unstable test TestAnalyzeGlobalStatsWithOpts/2 (#30576)

* expression,types: Adjusts UNIX_TIMESTAMP() for non-existing DST values (#28739) (#30405)

* br: add res.Body.close to avoid leak (#30545)

* lightning: add back integration test lightning_error_summary (#30547)

* sessionctx/variable: small refactor (split large file) (#30511)

* ddl: let `admin cancel ddl jobs` run in a new transaction (#30549)

* *: Retry when placement PutBundles failed (#30590)

* dumpling: delete unit test in github actions (#30562)

* *: support trace plan target='estimation' statement (#30491)

* expression: migrate test-infra to testify for integration_test.go (#30548)

* planner: support trace for min/max eliminate (#30441)

* support min/max trace

Signed-off-by: yisaer <[email protected]>

* address the comment

Signed-off-by: yisaer <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>

* br: remove cdclog in br (#30573)

* *: show cmd to check if all needed histograms are loaded (#29672)

* expression: clone repertoire when clone the scalar function (#30602)

* *: use the real StateRemote interface implementation for cached table (#30066)

* *: query failed after add index / timestamp out-of-range (#28424) (#29323)

* planner: implement collecting predicate columns from logical plan (#29878)

* *: show PK name when decoding the clustered index row key (#30623)

* ddl/callback_test.go: migrate test-infra to testify (#30317)

* *: Rename some names of placement ddl operation (#30622)

* executor: fix data race in the index_lookup_hash_join (#30619)

* ddl: remove unnecessary locking when adding an index (#29772)

* server: try to make `TidbTestSuite` more stable (#30643)

* *: Add some PD tests for placement and fix some bug found (#30621)

* *: migrate sync.WaitGroup to util.WaitGroupWrapper (#30644)

* planner: add trace for join eliminate rule (#30343)

* executor: migrate test-infra to testify for executor/shuffle_test.go (#30514)

* planner: make (*AccessPath).OnlyPointRange more succinct (#30520)

* planner: add trace for join reorder (#30394)

* executor: migrate test-infra to testify for executor/union_scan_test.go (#30525)

* expression: make cast return error if cast binary literal to another character set (#30537)

* *: update tikv client (#30670)

* *: update sysutil in go.mod to fix panic when search log (#30523)

* topsql: shouldn't evict the SQL meta, since the evicted SQL can be appear on Other components (TiKV) TopN records (#27050)

* testify: migrate test-infra to testify for analyze_test.go (#30640)

* util: replace compareDatum by compare,  point part (#30575)

* test: make all the tests run in serial (#30692)

* statistics: add mutex for Handle.globalMap and Handle.feedback (#30550)

* executor: fix regular expression in json so that it could match identifer start with '$' (#29750)

* util/testkit/testkit.go: fix typo (#30638)

* planner: Introduce a new global variable to control the historical statistics feature (#30646)

* topsql: introduce datasink interface (#30662)

* planner: unify the argument of stats functions to use SessionCtx instead of StatementContext (#30668)

* metrics: fix the Max SafeTS Gap metrics (#30689)

* lightning: Add source dir existence check for s3 (#30674)

* golangci-lint: support durationcheck (#30027)

* executor: fix data race on IndexHashJoin.cancelFunc (#30701)

* sessionctx/variable: change tidb_store_limit to global only (#30522)

* statistics: remove reassignment of Handle.pool in NewHandle (#30675)

* br: fix some unstable unit test cases. (#30716)

* bindinfo: fix the comment typo (#30616)

* server: support decoding prepared string args to character_set_client (#30723)

* expression: fix enum type join binary get wrong result (#30445)

* cmd/explaintest: fix wrong result comparison for explain test (#30717)

* parallel create tables in br

* metrics: fix copr-cache metrics (#30712)

* test: merge executor's serial tests to other tests (#30711)

* statistics: avoid deadlock when create/drop extended stats and analyze at the same time (#30566)

* ddl: add batch create table api

Signed-off-by: xhe <[email protected]>

* ddl: add unit tests

Signed-off-by: xhe <[email protected]>

* ddl: fix fmt

Signed-off-by: xhe <[email protected]>

* ddl: typo

Co-authored-by: Arenatlx <[email protected]>

* ddl: fix tests

Signed-off-by: xhe <[email protected]>

* ddl: rename to BatchCreateTableWithInfo

Signed-off-by: xhe <[email protected]>

* ddl: trace the error

Signed-off-by: xhe <[email protected]>

* ddl: comments

Signed-off-by: xhe <[email protected]>

* ddl: cancle the job right

Signed-off-by: xhe <[email protected]>

* ddl: cancel the job right 2

Signed-off-by: xhe <[email protected]>

* ddl: report error if entry too large

Signed-off-by: xhe <[email protected]>

* ddl: report error when table is duplicated

Signed-off-by: xhe <[email protected]>

* ddl: go fmt

Signed-off-by: xhe <[email protected]>

* infoschema: improve batch memory perf

Signed-off-by: xhe <[email protected]>

* ddl: retain ID

Signed-off-by: xhe <[email protected]>

* sessionctx: fix the value of analyze_version when upgrading 4.x to 5.… (#30743)

* ddl: reduce log frequency

Signed-off-by: xhe <[email protected]>

* ddl: fix tests

Signed-off-by: xhe <[email protected]>

* server: disable socket listener for `basicHTTPHandlerTestSuite` (#30680)

* planner: support the plan cache aware of bindings (#30169)

* planner: fix early set of plan's statisticsTable (#30754)

* *: implement renew write lock lease for cached table (#30206)

* *: Modify placement rule index to reserve some indexes for future work (#30737)

* executor: add an unit test case for unreasonable invoking Close (#30696)

* planner: fix wrong subquery's coercibility  (#30750)

* executor: add more testcases for index merge (#30497)

* server: add grpc server config for a suitable behavior (#30774)

* config, charset: make charset config not affected by collation config (#30572)

* lightning: emit tidb log by change FilterCore to only allow matched packages (#30700)

* topsql: a centralized place to generate tipb report data (#30781)

* planner: add trace for partition pruning (#30546)

* planner: refine collation handling for between (#30793)

* test: merge serial tests in bindinfo, expression, parser and statistics (#30749)

* br: update log description for split check (#30763)

* *: replace compareDatum by compare, range part (#30710)

* *: placement policy ref will be converted to direct options when recover or flashback table (#30705)

* ddl: handle the incorrect number of placement followers (#30715)

* ddl: revert "ddl: remove unnecessary locking when adding an index" (#30667)

* br/pkg/task: migrate test-infra to testify (#30605)

* *: fix the flen type datetime for union/case-when/control-funcs (#30588)

* types, util: clean up compareDatum (#30815)

* ddl: add helper function to set and query TiFlash's sync status (#30473)

* dumpling: fix more dumpling log level query template (#30176)

* parser: support `admin flush plan_cache` (#30747)

* topsql: support multiple datasinks (#30808)

* br: update permission, so tikv can write to folder when backup to local (#30396)

* session: fix bootstrap to only persist global variables (#30593)

close #28667

* docs/design: update collation compatibility issues in charsets doc (#30806)

* executor: improve SET sysvar=DEFAULT handling (#29680)

close #29670

* br: add error handling for group context cancel when restore file is corrupted (#30190)

close #30135

* executor: buildWindow cannot call typeInfer twice (#30773)

close #30402

* *: refactor encoding and uniform usages (#30288)

* lightning: optimize region split check logic (#30428)

close #30018

* br: ignore mock directory when gcov in br (#30586)

* *: forbid set tiflash replica count for a placement table (#30844)

close #30741

* execute: don't transform charset in internal sql (#30843)

close #30789

* planner: update PlanBuilder.windowSpecs when building subquery (#30878)

close #30804

* br: fix S3 backup endpoint suffix (#30530)

close #30104

* lightning: make pre-check output message clearer (#30439)

close #30395

* expression: wrap to_binary and from_binary for cast function's argument (#30706)

* executor: fix bug when using IndexMerge in transaction (#30719)

close #30685

* ddl: migrate test-infra to testify for ddl/foreign_key_test.go (#30853)

close #29103

* expression: fix wrong retType for reverse function (#30829)

close #30809

* planner: support trace topn push down (#30800)

ref #29661

* github: add issue requirement to pull request template (#30817)

close #30814

* fix merge issue

* topsql: introduce stmtstats and sql execution count (#30277)

* topsql: add pubsub datasink (#30860)

* executor: fix the incorrect untouch used in optimistic transactions (#30447)

close #30410

* expression, cmd: let crc32() support gbk (#30900)

close #30898

* server: Add uptime status var and statistics (#29790)

close #8842

* br: error log optimization (#29640)

close #27015

* planner: fix wrong collation when rewrite in condition (#30492)

close #30486

* planner: add extractor for tikv_region_peers (#30656)

* fix issue that loss table restore

* lightning: add back table empty check and add a switch config (#30887)

close #27919

* br: improve backoff unit test (#30892)

* *: add TxnManager to manage txn in session (#30574)

* *: add TxnManager to manage txn in session

* modify

* add tests

* move failpoint content to a single file

* Makefile: add `t.Parallel` check to ensure tests are run in serial (#30869)

* refactoring code

* refactoring code

* placement: remove isolationlevel (#30859)

close #30858

* planner: revise the optimize trace output (#30882)

* table: set the datum collation correctly in CastValue() (#30931)

close #30930

* *: Use TxnManager.GetTxnInfoSchema() to get the txn infoschema (#30934)

close #30933

* parser: add IsValid() to Encoding to speed up string validation for UTF-8 (#30937)

close #30936

* planner: rename pstmtPlanCacheXX to PlanCacheXX (#30909)

* table/tables: make CI TestCacheTableBasicReadAndWrite more stable (#30924)

close #30922

* restore: use new ScatterRegions API (#30899)

close #30425

* *: when placement conflicts with tiflash, cancel the job (#30945)

* Makefile,tools: make CI great again! (#30828)

close #30822

* br/pkg/membuf: remove global buffer pool (#29934)

* ddl: add format error for incorrect dict syntax in the placement rule (#30919)

close #30454

* planner: fix index merge plan when expr cannot be pushed to tikv (#30341)

close #30200

* executor: display 'show create table' and INFOSCHEMA for cached table correctly (#30951)

close #30950

* br: extend the timeout for scan region since 3 seconds is not enough (#30889)

close #30720

* planner: remove bindSQL from planCacheKey to planCacheValue (#30916)

* execution: refine precision of cast as decimal in agg func (#30805)

* *: fix data race in the tikv_client (#30964)

close #30658

* ddl: migrate test-infra to testify for ddl/db_partition_test.go (#30952)

close #28635

* planner: fix `AccessPath.TableFilters` got modified unexpectedly (#30966)

close #30965

* test: merge serial tests in ddl, infoschema, session, store, table, telemetry and types (#30874)

* executor: fix the returned field count of the prepare statement (#30981)

close #30971

* binlog: allow multiple ddl targets (#30904)

* planner: trace predicate push down  (#30902)

ref #29661

* placement: give default 2 followers for non-sugar syntax (#31000)

* flatten the json output (#30905)

Signed-off-by: yisaer <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>

* test: control log level with environment variables (#30871)

* planner: add usage of paging copr in optimizer (#30536)

close #30578

* test: merge serial tests in cmd, planner, server, util (#31003)

* planner: change predicateColumnCollector to columnStatsUsageCollector and collect histogram-needed columns (#30671)

* executor: migrate test-infra to testify for distsql_test.go (#31023)

close #28574

* remote uncessary package errors

* reused the retry code from lightning

* refactoring retryable

* ddl: add batch create table api

Signed-off-by: xhe <[email protected]>

* ddl: add unit tests

Signed-off-by: xhe <[email protected]>

* ddl: fix fmt

Signed-off-by: xhe <[email protected]>

* br ddl code

* parallel create tables in br

* ddl: add batch create table api

Signed-off-by: xhe <[email protected]>

* ddl: add unit tests

Signed-off-by: xhe <[email protected]>

* ddl: fix fmt

Signed-off-by: xhe <[email protected]>

* ddl: typo

Co-authored-by: Arenatlx <[email protected]>

* ddl: fix tests

Signed-off-by: xhe <[email protected]>

* ddl: rename to BatchCreateTableWithInfo

Signed-off-by: xhe <[email protected]>

* ddl: trace the error

Signed-off-by: xhe <[email protected]>

* ddl: comments

Signed-off-by: xhe <[email protected]>

* ddl: cancle the job right

Signed-off-by: xhe <[email protected]>

* ddl: cancel the job right 2

Signed-off-by: xhe <[email protected]>

* ddl: report error if entry too large

Signed-off-by: xhe <[email protected]>

* ddl: report error when table is duplicated

Signed-off-by: xhe <[email protected]>

* ddl: go fmt

Signed-off-by: xhe <[email protected]>

* infoschema: improve batch memory perf

Signed-off-by: xhe <[email protected]>

* ddl: retain ID

Signed-off-by: xhe <[email protected]>

* ddl: reduce log frequency

Signed-off-by: xhe <[email protected]>

* ddl: fix tests

Signed-off-by: xhe <[email protected]>

* ddl: remove retainID from the interface

Signed-off-by: xhe <[email protected]>

* ddl: fix tests

Signed-off-by: xhe <[email protected]>

* executor: fix rebasing problem

Signed-off-by: xhe <[email protected]>

* sessionctx: enable IndexMerge by default (#30650)

close #29597

* br: Enable lint `gosec` in br (#30895)

close #30699

* planner: support 'admin flush plan cache' (#30370)

* merge from tidb batch_1

Co-authored-by: 3pointer <[email protected]>
Co-authored-by: wjHuang <[email protected]>
Co-authored-by: Lei Zhao <[email protected]>
Co-authored-by: Daniël van Eeden <[email protected]>
Co-authored-by: sylzd <[email protected]>
Co-authored-by: Jianjun Liao <[email protected]>
Co-authored-by: unconsolable <[email protected]>
Co-authored-by: tison <[email protected]>
Co-authored-by: Shenghui Wu <[email protected]>
Co-authored-by: tangenta <[email protected]>
Co-authored-by: Weizhen Wang <[email protected]>
Co-authored-by: guo-shaoge <[email protected]>
Co-authored-by: Ryan Leung <[email protected]>
Co-authored-by: xufei <[email protected]>
Co-authored-by: Morgan Tocker <[email protected]>
Co-authored-by: Zhou Kunqin <[email protected]>
Co-authored-by: 王超 <[email protected]>
Co-authored-by: TonsnakeLin <[email protected]>
Co-authored-by: Ehco <[email protected]>
Co-authored-by: Mattias Jonsson <[email protected]>
Co-authored-by: HuaiyuXu <[email protected]>
Co-authored-by: Zak Zhao <[email protected]>
Co-authored-by: WizardXiao <[email protected]>
Co-authored-by: xhe <[email protected]>
Co-authored-by: Hangjie Mo <[email protected]>
Co-authored-by: Yuanjia Zhang <[email protected]>
Co-authored-by: glorv <[email protected]>
Co-authored-by: djshow832 <[email protected]>
Co-authored-by: Chunzhu Li <[email protected]>
Co-authored-by: Song Gao <[email protected]>
Co-authored-by: Ti Chi Robot <[email protected]>
Co-authored-by: Xiaoju Wu <[email protected]>
Co-authored-by: xiongjiwei <[email protected]>
Co-authored-by: tiancaiamao <[email protected]>
Co-authored-by: Yifan Xu <[email protected]>
Co-authored-by: JmPotato <[email protected]>
Co-authored-by: Zach <[email protected]>
Co-authored-by: bb7133 <[email protected]>
Co-authored-by: lvtu <[email protected]>
Co-authored-by: crazycs <[email protected]>
Co-authored-by: znhh6018 <[email protected]>
Co-authored-by: eddie lin <[email protected]>
Co-authored-by: dongjunduo <[email protected]>
Co-authored-by: Zhenchi <[email protected]>
Co-authored-by: wangggong <[email protected]>
Co-authored-by: zhangjinpeng1987 <[email protected]>
Co-authored-by: Jack Yu <[email protected]>
Co-authored-by: Arenatlx <[email protected]>
Co-authored-by: Yiding Cui <[email protected]>
Co-authored-by: Chengpeng Yan <[email protected]>
Co-authored-by: bestwoody <[email protected]>
Co-authored-by: Calvin Neo <[email protected]>
Co-authored-by: Lynn <[email protected]>
Co-authored-by: Zhuhe Fang <[email protected]>
Co-authored-by: Mini256 <[email protected]>
Co-authored-by: Xiang Zhang <[email protected]>
Co-authored-by: Yexiang Zhang <[email protected]>
Co-authored-by: cfzjywxk <[email protected]>
Co-authored-by: db <[email protected]>
Co-authored-by: 山岚 <[email protected]>
Co-authored-by: Yujie Xia <[email protected]>
Co-authored-by: Yilong Li <[email protected]>
Co-authored-by: tuuuuuu <[email protected]>
Co-authored-by: qupeng <[email protected]>
Co-authored-by: you06 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants