mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved mysql parser add_index support. for issue #1645
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package com.alibaba.druid.bvt.bug;
|
||||
|
||||
import com.alibaba.druid.sql.SQLUtils;
|
||||
import com.alibaba.druid.util.JdbcConstants;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
* Created by wenshao on 23/03/2017.
|
||||
*/
|
||||
public class Issue1654 extends TestCase {
|
||||
public void test_for_issue() throws Exception {
|
||||
String sql = "ALTER TABLE db_manage.zcy_gpcatalog_node_t ADD INDEX index_code USING BTREE (code);";
|
||||
String formatedSql = SQLUtils.format(sql, JdbcConstants.MYSQL);
|
||||
assertEquals("ALTER TABLE db_manage.zcy_gpcatalog_node_t\n" +
|
||||
"\tADD INDEX index_code USING BTREE (code);", formatedSql);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user