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

Bug: date_format function with invalid format argument panic #17318

Closed
1 of 2 tasks
b41sh opened this issue Jan 17, 2025 · 0 comments · Fixed by #17323
Closed
1 of 2 tasks

Bug: date_format function with invalid format argument panic #17318

b41sh opened this issue Jan 17, 2025 · 0 comments · Fixed by #17323
Assignees
Labels
C-bug Category: something isn't working found-by-sqlsmith

Comments

@b41sh
Copy link
Member

b41sh commented Jan 17, 2025

Search before asking

  • I had searched in the issues and found no similar issues.

Version

main

What's Wrong?

date_format function with invalid format argument panic, seems caused by chrono bug
this bug is found by Tidb test

panicked at /home/b41sh/.rustup/toolchains/nightly-2024-11-28-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs:2688:14:
a Display implementation returned an error unexpectedly: Error
   0: backtrace::backtrace::libunwind::trace
             at /home/b41sh/.cargo/git/checkouts/backtrace-rs-fb1f822361417489/72265be/src/backtrace/libunwind.rs:116:5
      backtrace::backtrace::trace_unsynchronized
             at /home/b41sh/.cargo/git/checkouts/backtrace-rs-fb1f822361417489/72265be/src/backtrace/mod.rs:66:5
      backtrace::backtrace::trace

How to Reproduce?

root@0.0.0.0:48000/default> SELECT date_format(now(), '%i');
error: APIError: QueryFailed: [1104]a Display implementation returned an error unexpectedly: Error

root@0.0.0.0:48000/default> SELECT date_format(now(), '%O');
error: APIError: QueryFailed: [1104]a Display implementation returned an error unexpectedly: Error

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: something isn't working found-by-sqlsmith
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants