You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
createtablet2(a float, b float, c float as (a % 10), key (c));
insert into t2 (a) values (-100), (20);
select c from t2 unionselect c from t2;
select c from t2;
select*from t2;
2. What did you expect to see? (Required)
mysql>select c from t2 unionselect c from t2;
+------+
| c |
+------+
| -0 |
| 0 |
+------+2 rows inset (0.03 sec)
mysql>select c from t2;
+------+
| c |
+------+
| -0 |
| 0 |
+------+2 rows inset (0.04 sec)
mysql>select*from t2;
+------+------+------+
| a | b | c |
+------+------+------+
| -100 | NULL | -0 |
| 20 | NULL | 0 |
+------+------+------+2 rows inset (0.04 sec)
3. What did you see instead (Required)
mysql> create table t2(a float, b float, c float as (a % 10), key (c));
Query OK, 0 rows affected (0.18 sec)
mysql>insert into t2 (a) values (-100), (20);
Query OK, 2 rows affected (0.09 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql>select c from t2 unionselect c from t2;
+---+
| c |
+---+
| 0 |
+---+1 row inset (0.07 sec)
mysql>
mysql>select c from t2;
+------+
| c |
+------+
| 0 |
| 0 |
+------+2 rows inset (0.04 sec)
mysql>select*from t2;
+------+------+------+
| a | b | c |
+------+------+------+
| -100 | NULL | -0 |
| 20 | NULL | 0 |
+------+------+------+2 rows inset (0.03 sec)
4. What is your TiDB version? (Required)
5.0.3
4.0.14
The text was updated successfully, but these errors were encountered:
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
5.0.3
4.0.14
The text was updated successfully, but these errors were encountered: