Skip to content

concat(ifnull(time(3)) returns different results from MySQL #29498

@espresso98

Description

@espresso98

Bug Report

SET TIMESTAMP doesn't take effect.

1. Minimal reproduce step (Required)

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (t3 TIME(3), d DATE);
INSERT INTO t1 VALUES ('00:00:00.567', '2002-01-01');
SELECT CONCAT(IFNULL(t3, d)) AS col1 FROM t1;

2. What did you expect to see? (Required)

+-------------------------+
| col1                    |
+-------------------------+
| 2019-03-11 00:00:00.567 |
+-------------------------+

3. What did you see instead (Required)

+----------------+
| col1           |
+----------------+
| 2021-11-04 00: |
+----------------+

4. What is your TiDB version? (Required)

+-------------------------+--------------------------------------------------------------------------+
| Variable_name           | Value                                                                    |
+-------------------------+--------------------------------------------------------------------------+
| innodb_version          | 5.6.25                                                                   |
| protocol_version        | 10                                                                       |
| tidb_analyze_version    | 2                                                                        |
| tidb_row_format_version | 2                                                                        |
| tls_version             | TLSv1,TLSv1.1,TLSv1.2                                                    |
| version                 | 5.7.25-TiDB-v5.2.2                                                       |
| version_comment         | TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible |
| version_compile_machine | x86_64                                                                   |
| version_compile_os      | osx10.8                                                                  |
+-------------------------+--------------------------------------------------------------------------+

Metadata

Metadata

Assignees

Labels

affects-5.0This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.severity/majorsig/executionSIG executiontype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions