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

Error when create statement contains the option of "algorithm" #258

Closed
zhunina opened this issue Sep 11, 2017 · 4 comments
Closed

Error when create statement contains the option of "algorithm" #258

zhunina opened this issue Sep 11, 2017 · 4 comments
Assignees
Labels
Druid Parser Function resolve problem has been fixed by developer sql-coverage verified issue's resolve was verified by tester
Milestone

Comments

@zhunina
Copy link

zhunina commented Sep 11, 2017

Steps:
1

mysql> create table tbl_name(id int,c_id int,name varchar(8)) partition by linear key algorithm=2 (id,c_id) partitions 4 (partition p0,partition p1,partition p2,partition p3);
ERROR 1064 (HY000): syntax error, error in :' key algorithm=2 (id,c_id) partitio',expect LPAREN, actual IDENTIFIER algorithm

2

mysql> create table tbl_name(id int,c_id int,name varchar(8)) partition by key  algorithm=1(id) partitions 4 (partition p0,partition p1,partition p2,partition p3);
ERROR 1064 (HY000): syntax error, error in :'key  algorithm=1(id) partitions 4 (',expect LPAREN, actual IDENTIFIER algorithm
@sunsun314
Copy link
Contributor

This issue is create by Druid Parser did not support the sql
the range of Druid Parser support partition is like:
partition_options:
{[LINEAR] HASH(expr)
| PARTITION BY [linear] KEY (column_list)
| RANGE{(expr) | COLUMNS(column_list)}
| LIST{(expr) | COLUMNS(column_list)}
}
[(partition_definition [, partition_definition] ...)]

@zhunina zhunina changed the title Error when create statemnt contains the option of "algorithm" Error when create statement contains the option of "algorithm" Sep 18, 2017
@ditdb
Copy link
Contributor

ditdb commented Nov 24, 2017

这个已经pull到alibaba/druid上, 并被其commit到master上,见 #2131

@yanhuqing666 yanhuqing666 added this to the 2.18.11.0 milestone Oct 11, 2018
@yanhuqing666 yanhuqing666 added the resolve problem has been fixed by developer label Oct 11, 2018
@FlyingMao FlyingMao added the verified issue's resolve was verified by tester label Oct 31, 2018
@FlyingMao
Copy link

verified version:
5.6.29-dble-9.9.9.9-359645c-20181029082136

@FlyingMao
Copy link

for tester:
suggest autotest position: sqls/bugs/bug.sql (reference line 209~213)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Druid Parser Function resolve problem has been fixed by developer sql-coverage verified issue's resolve was verified by tester
Projects
None yet
Development

No branches or pull requests

6 participants