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)
drop table if exists t1;
drop view if exists vv;
create table t1(c1 int primary key);
insert into t1 values(1), (2), (3);
create view vv as with recursive cte1(c1) as (select c1 from t1 where c1 = 2 union select c1 + 1 c1 from cte1 where c1 < 3) select * from cte1;
desc vv;
2. What did you expect to see? (Required)
MySQL:
mysql> desc vv;
+-------+------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+------+------+-----+---------+-------+
| c1 | int | YES | | NULL | |
+-------+------+------+-----+---------+-------+
1 row in set (0.11 sec)
3. What did you see instead (Required)
TiDB: It's unreasonable because c1 is NULLABLE and Primary key.
mysql> desc vv;
+-------+---------+------+------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+------+---------+-------+
| c1 | int(11) | YES | PRI | NULL | |
+-------+---------+------+------+---------+-------+
1 row in set (0.01 sec)
4. What is your TiDB version? (Required)
master
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)
MySQL:
3. What did you see instead (Required)
TiDB: It's unreasonable because c1 is NULLABLE and Primary key.
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: