Skip to content

[Bug] str_to_date output problem #44016

@LiBinfeng-01

Description

@LiBinfeng-01

Search before asking

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

Version

master latest

What's Wrong?

when we use fold constant in fe, it shows different result with be execute directly
mysql [(none)]>select str_to_date('2024-09-06 15:41:08', '%Y-%m-%d %T');
+---------------------------------------------------+
| str_to_date('2024-09-06 15:41:08', '%Y-%m-%d %T') |
+---------------------------------------------------+
| 2024-09-06 15:41:08 |
+---------------------------------------------------+
1 row in set (0.00 sec)
mysql [(none)]>set DEBUG_SKIP_FOLD_CONSTANT = true;
Query OK, 0 rows affected (0.00 sec)
mysql [(none)]>select str_to_date('2024-09-06 15:41:08', '%Y-%m-%d %T');
+---------------------------------------------------+
| str_to_date('2024-09-06 15:41:08', '%Y-%m-%d %T') |
+---------------------------------------------------+
| 2024-09-06 15:41:08.000000 |
+---------------------------------------------------+
1 row in set (0.03 sec)

What You Expected?

same behavior of fe and be execute

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions