Description:
result of `select cast("12:12:12.000" as time(3)) = "12:12:12"` is unexpected.
How to repeat:
mysql> select cast("12:12:12.000" as time(3)) = "12:12:12";
Field 1: `cast("12:12:12.000" as time(3)) = "12:12:12"`
Catalog: `def`
Database: ``
Table: ``
Org_table: ``
Type: LONGLONG
Collation: binary (63)
Length: 1
Max_length: 1
Decimals: 0
Flags: BINARY NUM
+----------------------------------------------+
| cast("12:12:12.000" as time(3)) = "12:12:12" |
+----------------------------------------------+
| 0 |
+----------------------------------------------+
1 row in set (0.01 sec)
mysql> select cast("12:12:12.000" as datetime(3)) = "12:12:12";
Field 1: `cast("12:12:12.000" as datetime(3)) = "12:12:12"`
Catalog: `def`
Database: ``
Table: ``
Org_table: ``
Type: LONGLONG
Collation: binary (63)
Length: 1
Max_length: 1
Decimals: 0
Flags: BINARY NUM
+--------------------------------------------------+
| cast("12:12:12.000" as datetime(3)) = "12:12:12" |
+--------------------------------------------------+
| 1 |
+--------------------------------------------------+
1 row in set (0.00 sec)
Suggested fix:
`select cast("12:12:12.000" as time(3)) = "12:12:12"` should also return 1.