[Bug]: CURTIME()/CURRENT_TIME() accept fractional-seconds precision > 6 instead of MySQL error 1426
Maintainers usually reply within 1 day
Nobody has claimed this yet.
- #33332 by @MatrixAdventurer — closed without merging
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
Research direction
Start by locating builtInCurrentTime, which the issue identifies as clamping fractional precision, and compare its validation with the sibling time functions that already return MySQL error 1426. Reproduce with SELECT CURTIME(7); and SELECT CURRENT_TIME(10);; done means both reject precision above 6 with the expected error. A linked pull request is already closed, so check its discussion and changes for context.
Written by the indexing model from the issue text.
Description
Is there an existing issue for the same bug?
- I have checked the existing issues (searched
curtime,current_time precision,Too-big precision).
Branch Name
main (5485cbc3)
Describe the bug
CURTIME(fsp) / CURRENT_TIME(fsp) silently accept a fractional-seconds precision above 6 and return a TIME value. The sibling functions NOW(), SYSDATE(), CURRENT_TIMESTAMP(), UTC_TIME() and UTC_TIMESTAMP() already reject it with MySQL error 1426.
builtInCurrentTime clamps the scale into [0, 6] instead of validating it.
Steps to reproduce
SELECT CURTIME(7);
SELECT CURRENT_TIME(10);
SELECT NOW(7);
Expected behavior (MySQL 8.0)
SELECT CURTIME(7); -- ERROR 1426 (42000): Too-big precision 7 specified for 'curtime'. Maximum is 6.
SELECT CURRENT_TIME(10); -- ERROR 1426 (42000): Too-big precision 10 specified for 'curtime'. Maximum is 6.
SELECT NOW(7); -- ERROR 1426 (42000): Too-big precision 7 specified for 'now'. Maximum is 6.
Actual behavior (MatrixOne main 5485cbc3)
SELECT CURTIME(7); -- returns a TIME, e.g. 10:20:07
SELECT CURRENT_TIME(10); -- returns a TIME, e.g. 10:20:07
SELECT NOW(7); -- ERROR 1426: Too-big precision 7 specified for 'now'. Maximum is 6. (already correct)
Additional information
Single-node mo-service -launch etc/launch/launch.toml.
本操作由 LW 授权的 Grok Bot 智能体执行。
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 312
- Avg merge
- 22h 59m
- Merged PRs (30d)
- 736
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from matrixorigin/matrixone
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
matrixorigin/matrixone#33363 ·
Maintainers usually reply within 1 day
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
matrixorigin/matrixone#33362 ·
Maintainers usually reply within 1 day
-
SLEEP rejects NULL and negative durations that MySQL acceptsPossibly taken @XuPeng-SH claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
matrixorigin/matrixone#32653 ·
Maintainers usually reply within 1 day
-
[Bug]: TestChangeWatchProxy loses its first tenant connection during PingContext in Ubuntu CIPossibly taken @XuPeng-SH claimed this today. Openkind/bug needs-triage
matrixorigin/matrixone#33371 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Bug]: TestDaemonClaimSQLRoundTrip exhausts its shared deadline during the stale claim update in Ubuntu CIPossibly taken @XuPeng-SH claimed this today. Openkind/bug needs-triage
matrixorigin/matrixone#33370 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in matrixorigin/matrixone
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
zalando/postgres-operator#3257 ·
Maintainers usually reply within 2 days
-
[inputs.internal] README lists go_version tag on internal_gather instead of internal_agentPossibly taken @cvas22 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
influxdata/telegraf#20264 ·
Maintainers usually reply within 1 day
-
[Bug] Standalone migration breaks existing Ingress routes using the envoy-http Service port nameOpenaccepted bug wg/enterprise-environment
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/semantic-router#7483 · 1 comment ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
stacklok/toolhive-catalog#2076 ·
Maintainers usually reply within 1 day