duckdb / duckdb_mysql

https://duckdb.org/docs/extensions/mysql
MIT License
55 stars 13 forks source link

Can not insert duckdb temp table into mysql table #87

Closed kekec14 closed 2 months ago

kekec14 commented 2 months ago

What happens?

Hello!

I need to insert duckdb temp table with name duckdb_temp_table into existing mysql table with name table_name.

I get an error: IO Error: Failed to run query "INSERT INTOizvozi.table_name(tip, date of bill) VALUES (100.0, '2022-01-05')": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'of bill) VALUES (100.0,'2022-01-05 00:00:00')' at line 1

According to an error, I think problem is backtick (`), which is not used in column names.

Do I miss some configuration parameter or is this a bug which occures when INSERT INTO BY NAME is used?

Thank you!

To Reproduce

duckdb_temp_table :

│  tip│ date of bill │
│ int32 │     date     │
├───────┼──────────────┤
│   100 │ 2022-01-05 

mysql insert statement: INSERT INTO mysql_db.table_name by name ( SELECT * FROM temp_table );

OS:

Windows

MySQL Version:

8.0.39

DuckDB Version:

v1.0.0 1f98600c2c

DuckDB Client:

CLI

Full Name:

dp

Affiliation:

mysql

Have you tried this on the latest main branch?

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?