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

Bug Report: CREATE TEMPORARY TABLE ... AS (SELECT ... ) prints a warning in the Vitess log while it just works #17983

Open
mcrauwel opened this issue Mar 18, 2025 · 0 comments

Comments

@mcrauwel
Copy link
Contributor

Overview of the Issue

I noticed this in the Vitess logs

W0318 15:28:05.312131       1 parser.go:85] ignoring error parsing DDL 'CREATE TEMPORARY TABLE it_departments AS (SELECT dept_no, dept_name FROM departments WHERE dept_no IN ('d005', 'd008'))': syntax error at position 41 near 'AS'
W0318 15:28:05.312894       1 parser.go:85] ignoring error parsing DDL 'CREATE TEMPORARY TABLE it_departments AS (SELECT dept_no, dept_name FROM departments WHERE dept_no IN ('d005', 'd008'))': syntax error at position 41 near 'AS'
W0318 15:28:05.313626       1 parser.go:85] ignoring error parsing DDL 'CREATE TEMPORARY TABLE it_departments AS (SELECT dept_no, dept_name FROM departments WHERE dept_no IN ('d005', 'd008'))': syntax error at position 41 near 'AS'
W0318 15:28:05.315061       1 parser.go:85] ignoring error parsing DDL 'CREATE TEMPORARY TABLE it_departments AS (SELECT dept_no, dept_name FROM departments WHERE dept_no IN ('d005', 'd008'))': syntax error at position 41 near 'AS'

Reproduction Steps

mysql> SELECT * FROM departments;
+---------+--------------------+
| dept_no | dept_name          |
+---------+--------------------+
| d009    | Customer Service   |
| d005    | Development        |
| d002    | Finance            |
| d003    | Human Resources    |
| d001    | Marketing          |
| d004    | Production         |
| d006    | Quality Management |
| d008    | Research           |
| d007    | Sales              |
+---------+--------------------+
9 rows in set (0.12 sec)

mysql> CREATE TEMPORARY TABLE it_departments AS (SELECT dept_no, dept_name FROM departments WHERE dept_no IN ('d005', 'd008'));
Query OK, 2 rows affected (0.12 sec)

mysql> SHOW CREATE TABLE it_departments\G
*************************** 1. row ***************************
       Table: it_departments
Create Table: CREATE TEMPORARY TABLE `it_departments` (
  `dept_no` char(4) NOT NULL,
  `dept_name` varchar(40) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
1 row in set (0.12 sec)

mysql> SELECT * FROM it_departments;
+---------+-------------+
| dept_no | dept_name   |
+---------+-------------+
| d005    | Development |
| d008    | Research    |
+---------+-------------+
2 rows in set (0.12 sec)

mysql> SELECT @@version;
+---------------+
| @@version     |
+---------------+
| 8.0.34-Vitess |
+---------------+
1 row in set (0.11 sec)

Binary Version

vttablet version Version: 21.0.0-SNAPSHOT (Git revision 32de268d18b4cb5ae1188d240134d3720b375ccd branch 'latest-21.0') built on Wed Feb 19 05:04:48 UTC 2025 by vitess@buildkitsandbox using go1.23.6 linux/amd64

Operating System and Environment details

Linux/amd64 - Ubuntu

Log Fragments

@mcrauwel mcrauwel added Needs Triage This issue needs to be correctly labelled and triaged Type: Bug labels Mar 18, 2025
@frouioui frouioui added Component: Query Serving and removed Needs Triage This issue needs to be correctly labelled and triaged labels Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants