Skip to content

Conversation

mjonss
Copy link
Contributor

@mjonss mjonss commented Jun 5, 2025

What problem does this PR solve?

Issue Number: close #61335

Problem Summary:

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Copy link

ti-chi-bot bot commented Jun 5, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 5, 2025
@mjonss mjonss added ok-to-test Indicates a PR is ready to be tested. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 5, 2025
Copy link

tiprow bot commented Jun 5, 2025

Hi @mjonss. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@mjonss
Copy link
Contributor Author

mjonss commented Jun 5, 2025

/retest

@ti-chi-bot ti-chi-bot bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 5, 2025
@mjonss
Copy link
Contributor Author

mjonss commented Jun 5, 2025

/retest

Copy link

codecov bot commented Jun 6, 2025

Codecov Report

Attention: Patch coverage is 88.88889% with 3 lines in your changes missing coverage. Please review.

Project coverage is 73.5834%. Comparing base (5343560) to head (0b32a08).
Report is 149 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #61533        +/-   ##
================================================
+ Coverage   73.0870%   73.5834%   +0.4964%     
================================================
  Files          1730       1730                
  Lines        481184     481217        +33     
================================================
+ Hits         351683     354096      +2413     
+ Misses       107956     105617      -2339     
+ Partials      21545      21504        -41     
Flag Coverage Δ
integration 42.4101% <88.8888%> (?)
unit 72.4278% <88.8888%> (+0.0996%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.7804% <ø> (ø)
parser ∅ <ø> (∅)
br 46.9933% <ø> (+0.0183%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nice fix! Could you add more test cases like :

  1. where column date_add(<invalid_time>, interval 1 day)
  2. where date_add(column, interval 1 day) <invalid_time>

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 6, 2025
@mjonss
Copy link
Contributor Author

mjonss commented Jun 6, 2025

/retest

@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 6, 2025
@mjonss mjonss marked this pull request as ready for review June 6, 2025 18:23
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 6, 2025
@mjonss
Copy link
Contributor Author

mjonss commented Jun 11, 2025

/retest

store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("create table t (id int, ts timestamp)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume timestamp and timestamp(6) are expected to behave the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I just tested manually and it is the same, but would prefer to not include timestamp(6) in this test. I am currently working on a more covering tests for timestamp, which also includes timestamp with fractions, which should cover this as well.

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 12, 2025
@dveeden
Copy link
Contributor

dveeden commented Jun 16, 2025

mysql-8.0.11-TiDB-v9.0.0-alpha-892-gb79cae3387-dirty> show warnings;
+---------+------+--------------------------------------------------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                                                                        |
+---------+------+--------------------------------------------------------------------------------------------------------------------------------+
| Warning | 8179 | Timestamp is not valid, since it is in Daylight Saving Time transition '{2025 3 30 2 30 0 0}' for time zone 'Europe/Amsterdam' |
| Warning | 8179 | Timestamp is not valid, since it is in Daylight Saving Time transition '{2025 3 30 2 30 0 0}' for time zone 'Europe/Amsterdam' |
| Warning | 8179 | Timestamp is not valid, since it is in Daylight Saving Time transition '{2025 3 30 2 30 0 0}' for time zone 'Europe/Amsterdam' |
+---------+------+--------------------------------------------------------------------------------------------------------------------------------+
3 rows in set (0.000 sec)

This warning:

  • Is TiDB specific
  • Is similar to the 1292 "Incorrect datetime value..." warning in MySQL
  • Is more specific to what is wrong with the supplied value
  • Has a timestamp format that is different than what the user supplied or what is usual for MySQL
  • Was not added in this PR

I would prefer to keep things as similar to MySQL as possible. However the added info here is useful.

Copy link

ti-chi-bot bot commented Jun 16, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dveeden, qw4990

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 16, 2025
Copy link

ti-chi-bot bot commented Jun 16, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-06-12 12:51:14.722876636 +0000 UTC m=+532252.951191898: ☑️ agreed by qw4990.
  • 2025-06-16 13:22:00.586965231 +0000 UTC m=+105173.310144213: ☑️ agreed by dveeden.

@ti-chi-bot ti-chi-bot bot merged commit c48a03d into pingcap:master Jun 16, 2025
24 checks passed
@mjonss mjonss deleted the dst-convert-adj-instead-of-zero-date-61335 branch June 17, 2025 07:39
@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Jul 8, 2025
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jul 8, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #62265.
But this PR has conflicts, please resolve them!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reporting a tablefullscan When I read the data between invalid data due to DST
4 participants