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

MySQL engine can't identify keywords from mysql5.8 #2635

Closed
wowtous opened this issue Jul 12, 2018 · 2 comments
Closed

MySQL engine can't identify keywords from mysql5.8 #2635

wowtous opened this issue Jul 12, 2018 · 2 comments
Assignees
Labels
bug Confirmed user-visible misbehaviour in official release

Comments

@wowtous
Copy link

wowtous commented Jul 12, 2018

clickhouse version: 1.1.54390
mysql version: 8.0.4-rc-log

  1. conf
hostname: 127.0.0.1
port: 3306
username: test
password: test
  1. create a mysql test table and insert some test data.
create table test.test (id int,rank int(11),name varchar(100));
insert into test.test (id,rank,name) values (1,1,'test1'),(2,2,'test2'),(3,3,'test3');
  1. create MySQL engine table in the CH
create database test;
create table test.test (
 id Int32,
 rank Int32,
 name String
) ENGINE = MySQL('127.0.0.1:3306', 'test', 'test', 'test', 'test', 1) ;

when I query like this:

select * from test.test;
select rank from test.test

The error is:

Received exception from server (version 1.1.54390):
Code: 1000. DB::Exception: Received from 127.0.0.1:9000. DB::Exception: mysqlxx::BadQuery: 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 'rank) VALUES...
@wowtous wowtous changed the title MySQL engine can't identify keywords from mysql MySQL engine can't identify keywords from mysql5.8 Jul 12, 2018
@alexey-milovidov alexey-milovidov added the bug Confirmed user-visible misbehaviour in official release label Jul 14, 2018
@alexey-milovidov
Copy link
Member

Confirmed. We should quote all identifiers in a query for external database.

@wowtous
Copy link
Author

wowtous commented Jul 19, 2018

good job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release
Projects
None yet
Development

No branches or pull requests

2 participants