-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
*: Add TIME_TRUNCATE_FRACTIONAL sql_mode #56442
base: master
Are you sure you want to change the base?
Conversation
Hi @mjonss. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with 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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #56442 +/- ##
================================================
+ Coverage 73.3611% 76.0375% +2.6763%
================================================
Files 1626 1648 +22
Lines 449213 457224 +8011
================================================
+ Hits 329548 347662 +18114
+ Misses 99482 87905 -11577
- Partials 20183 21657 +1474
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example from the MySQL docs:
sql> CREATE TABLE t (id INT, tval TIME(1));
Query OK, 0 rows affected (0.0096 sec)
sql> SET sql_mode='';
Query OK, 0 rows affected (0.0003 sec)
sql> INSERT INTO t (id, tval) VALUES(1, 1.55);
Query OK, 1 row affected (0.0010 sec)
sql> SET sql_mode='TIME_TRUNCATE_FRACTIONAL';
Query OK, 0 rows affected (0.0001 sec)
sql> INSERT INTO t (id, tval) VALUES(2, 1.55);
Query OK, 1 row affected (0.0008 sec)
sql> SELECT id, tval FROM t ORDER BY id;
+----+------------+
| id | tval |
+----+------------+
| 1 | 00:00:01.6 |
| 2 | 00:00:01.5 |
+----+------------+
2 rows in set (0.0014 sec)
sql> SELECT TIDB_VERSION()\G
*************************** 1. row ***************************
TIDB_VERSION(): Release Version: v8.4.0-alpha-338-g640dc8844c
Edition: Community
Git Commit Hash: 640dc8844cbd0d3ff1fafa64ce213afcc7dd25a4
Git Branch: time_truncate_fractional-sqlmode
UTC Build Time: 2024-10-04 15:02:03
GoVersion: devel go1.24-065c1359 Fri Oct 4 14:49:31 2024 +0000
Race Enabled: false
Check Table Before Drop: false
Store: unistore
1 row in set (0.0007 sec)
I think "Changes MySQL compatibility" should be checked and I also think this needs a release note. |
TiDB:
MySQL:
Maybe we should create a new issue for this? |
Co-authored-by: Daniël van Eeden <github@myname.nl>
I created #56451. |
/retest |
@mjonss: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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. |
/ok-to-test |
/assign @tangenta @zanmato1984 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits.
@zanmato1984 @lance6716 Are there any reason that this SQL mode needs to be included in TiKV/TiFlash/UniStore? Can there be any coprocessor calls that would be affected? Or how can I look for it? |
@mjonss: The following test failed, say
Full PR test history. Your PR dashboard. 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/test-infra repository. I understand the commands that are listed here. |
Seems this SQL mode affects function tidb/pkg/expression/infer_pushdown.go Line 277 in f4e820d
tidb/pkg/expression/infer_pushdown.go Line 213 in f4e820d
It'll be great if you can directly work on that. Here are some links in TiFlash that may help:
If you have any difficulties, please let me know, and our team will love to help or take over. Thanks. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dveeden, lance6716, zanmato1984 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
PR needs rebase. 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. |
What problem does this PR solve?
Issue Number: close #29406
Problem Summary:
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.