Unverified 提交 60a8aedf authored 作者: Noel Grandin's avatar Noel Grandin 提交者: GitHub

Merge pull request #940 from TimofeyKuznesov/master

add Support for MySQL: DROP INDEX index_name ON tbl_name
......@@ -1625,6 +1625,10 @@ public class Parser {
command.setIndexName(indexName);
ifExists = readIfExists(ifExists);
command.setIfExists(ifExists);
//Support for MySQL: DROP INDEX index_name ON tbl_name
if(readIf("ON")) {
readIdentifierWithSchema();
}
return command;
} else if (readIf("USER")) {
boolean ifExists = readIfExists(false);
......
......@@ -398,6 +398,8 @@ public class TestCompatibility extends TestBase {
// check the MySQL index dropping syntax
stat.execute("ALTER TABLE TEST_COMMENT_ENGINE ADD CONSTRAINT CommentUnique UNIQUE (SOME_ITEM_ID)");
stat.execute("ALTER TABLE TEST_COMMENT_ENGINE DROP INDEX CommentUnique");
stat.execute("CREATE INDEX IDX_ATTACHMENT_ID ON TEST_COMMENT_ENGINE (ATTACHMENT_ID)");
stat.execute("DROP INDEX IDX_ATTACHMENT_ID ON TEST_COMMENT_ENGINE");
conn.close();
conn = getConnection("compatibility");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论