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!
droptable if exists t1,t2,t3,t4;
createtablet1 (a intnot null, b char (10) not null);
insert into t1 values(1,‘a’),(2,‘b’),(3,‘c’),(3,‘c’);
select*from (((select*from t1)) union (select*from t1) union (select*from t1)) a;
2. What did you expect to see? (Required)
mysql>droptableif exists t1,t2,t3,t4;
Query OK, 0 rows affected, 2 warnings (0.05 sec)
mysql> create table t1 (a intnot null, b char (10) not null);
Query OK, 0 rows affected (0.01 sec)
mysql>insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c');
Query OK, 4 rows affected (0.00 sec)
Records: 4 Duplicates: 0 Warnings: 0
mysql>select*from (((select*from t1)) union (select*from t1) union (select*from t1)) a;
+---+---+
| a | b |
+---+---+
| 1 | a |
| 2 | b |
| 3 | c |
+---+---+3 rows inset (0.00 sec)
3. What did you see instead (Required)
mysql>droptableif exists t1,t2,t3,t4;
Query OK, 0 rows affected, 2 warnings (0.42 sec)
mysql> create table t1 (a intnot null, b char (10) not null);
Query OK, 0 rows affected (0.08 sec)
mysql>insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c');
Query OK, 4 rows affected (0.02 sec)
Records: 4 Duplicates: 0 Warnings: 0
mysql>select*from (((select*from t1)) union (select*from t1) union (select*from t1)) a;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line1 column 41 near "union (select * from t1) union (select * from t1)) a"
it is because the parser does not support (( subselect )), I tried to make the bracket recursive, but encounter a conflict of shift/reduce. any help would be appreciated.
Bug Report
Please answer these questions before submitting your issue. Thanks!
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: