-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-4.0This bug affects 4.0.x versions.This bug affects 4.0.x versions.affects-5.0This bug affects 5.0.x versions.This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.This bug affects 5.2.x versions.severity/criticalsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
drop table t;
create table t(a time(4));
insert into t values("-700:10:10.123456111");
select hour(a) from t;
set tidb_enable_vectorized_expression = off;
select hour(a) from t;
2. What did you expect to see? (Required)
[tidb]> select hour(a) from t;
+---------+
| hour(a) |
+---------+
| 700 |
+---------+
1 row in set (0.001 sec)
3. What did you see instead (Required)
[tidb]> create table t(a time(4));
Query OK, 0 rows affected (0.004 sec)
[tidb]> insert into t values("-700:10:10.123456111");
Query OK, 1 row affected (0.001 sec)
[tidb]> select hour(a) from t;
+---------+
| hour(a) |
+---------+
| -700 |
+---------+
1 row in set (0.001 sec)
[tidb]> set tidb_enable_vectorized_expression = off;
Query OK, 0 rows affected (0.000 sec)
[tidb]> select hour(a) from t;
+---------+
| hour(a) |
+---------+
| 700 |
+---------+
1 row in set (0.001 sec)
4. What is your TiDB version? (Required)
master(a9a3b3c)
kennytm
Metadata
Metadata
Assignees
Labels
affects-4.0This bug affects 4.0.x versions.This bug affects 4.0.x versions.affects-5.0This bug affects 5.0.x versions.This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.This bug affects 5.2.x versions.severity/criticalsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.