Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: union with constant value dose not supported #1883

Open
davidshiz opened this issue Jun 14, 2023 · 3 comments
Open

feature: union with constant value dose not supported #1883

davidshiz opened this issue Jun 14, 2023 · 3 comments
Assignees
Labels
A-feature feature with good idea

Comments

@davidshiz
Copy link
Collaborator

mysql> CREATE TABLE t1 (a CHAR(6));
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE TABLE t2 (a VARCHAR(8));
Query OK, 0 rows affected (0.01 sec)

mysql> SELECT * FROM t1 UNION SELECT * FROM t2 UNION SELECT 123;
ERROR 6 (HY000): The query includes syntax that is not supported by the storage engine. Either restructure the query with supported syntax, or enable the MySQL core::Query Path in config file to execute the query with reduced performance.

@davidshiz davidshiz added the A-feature feature with good idea label Jun 14, 2023
@davidshiz davidshiz changed the title feature: Multi union operations are not supported feature: Multi union clause are not supported Jun 14, 2023
@davidshiz davidshiz changed the title feature: Multi union clause are not supported feature: union with constant value dose not supported Jun 14, 2023
@davidshiz
Copy link
Collaborator Author

union all is also not supported ref #1860

@RingsC
Copy link
Contributor

RingsC commented Jun 15, 2023

mysql>  CREATE TABLE t1 (a CHAR(6));
Query OK, 0 rows affected (0.00 sec)

mysql>  CREATE TABLE t2 (a VARCHAR(8));
Query OK, 0 rows affected (0.01 sec)

mysql>  SELECT * FROM t1 UNION SELECT * FROM t2 UNION SELECT 123;
Empty set (2.61 sec)

@haitaoguan
Copy link
Collaborator

mysql> show create table x1\G
*************************** 1. row ***************************
       Table: x1
Create Table: CREATE TABLE `x1` (
  `a` char(6) DEFAULT NULL
) ENGINE=TIANMU DEFAULT CHARSET=utf8mb4
1 row in set (0.00 sec)

mysql> show create table x2\G
*************************** 1. row ***************************
       Table: x2
Create Table: CREATE TABLE `x2` (
  `a` varchar(8) DEFAULT NULL
) ENGINE=TIANMU DEFAULT CHARSET=utf8mb4
1 row in set (0.00 sec)

mysql> SELECT * FROM x1 UNION SELECT * FROM x2 UNION SELECT 123;
ERROR 2013 (HY000): Lost connection to MySQL server during query

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-feature feature with good idea
Projects
Status: No status
Development

No branches or pull requests

3 participants