提交 112c69e5 authored 作者: noelgrandin's avatar noelgrandin

Issue 490: support MySQL "USING BTREE" index declaration

上级 f9b16e0d
...@@ -60,6 +60,7 @@ Change Log ...@@ -60,6 +60,7 @@ Change Log
</li><li>MySQL compatibiltity, support the "AUTO_INCREMENT=3" part of the CREATE TABLE statement. </li><li>MySQL compatibiltity, support the "AUTO_INCREMENT=3" part of the CREATE TABLE statement.
</li><li>Issue 486: MySQL compatibiltity, support the "DEFAULT CHARSET" part of the CREATE TABLE statement. </li><li>Issue 486: MySQL compatibiltity, support the "DEFAULT CHARSET" part of the CREATE TABLE statement.
</li><li>Issue 487: support the MySQL "SET foreign_key_checks = 0" command </li><li>Issue 487: support the MySQL "SET foreign_key_checks = 0" command
</li><li>Issue 490: support MySQL "USING BTREE" index declaration
</li></ul> </li></ul>
<h2>Version 1.3.172 (2013-05-25)</h2> <h2>Version 1.3.172 (2013-05-25)</h2>
......
...@@ -5164,6 +5164,10 @@ public class Parser { ...@@ -5164,6 +5164,10 @@ public class Parser {
read("("); read("(");
} }
command.setIndexColumns(parseIndexColumnList()); command.setIndexColumns(parseIndexColumnList());
// MySQL compatibility
if (readIf("USING")) {
read("BTREE");
}
return command; return command;
} }
AlterTableAddConstraint command; AlterTableAddConstraint command;
......
...@@ -266,6 +266,7 @@ public class TestCompatibility extends TestBase { ...@@ -266,6 +266,7 @@ public class TestCompatibility extends TestBase {
stat.execute("CREATE TABLE TEST_4(ID INT PRIMARY KEY) charset=UTF8"); stat.execute("CREATE TABLE TEST_4(ID INT PRIMARY KEY) charset=UTF8");
stat.execute("CREATE TABLE TEST_5(ID INT PRIMARY KEY) ENGINE=InnoDb auto_increment=3 default charset=UTF8"); stat.execute("CREATE TABLE TEST_5(ID INT PRIMARY KEY) ENGINE=InnoDb auto_increment=3 default charset=UTF8");
stat.execute("CREATE TABLE TEST_6(ID INT PRIMARY KEY) ENGINE=InnoDb auto_increment=3 charset=UTF8"); stat.execute("CREATE TABLE TEST_6(ID INT PRIMARY KEY) ENGINE=InnoDb auto_increment=3 charset=UTF8");
stat.execute("CREATE TABLE TEST_7(ID INT, KEY TEST_7_IDX(ID) USING BTREE)");
// this maps to SET REFERENTIAL_INTEGRITY TRUE/FALSE // this maps to SET REFERENTIAL_INTEGRITY TRUE/FALSE
stat.execute("SET foreign_key_checks = 0"); stat.execute("SET foreign_key_checks = 0");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论