Skip to content

Commit

Permalink
Merge pull request alibaba#590 from bucketli/master
Browse files Browse the repository at this point in the history
多加一个空格导致有些测试用例过不去
  • Loading branch information
wenshao committed Jul 11, 2014
2 parents 900d28e + 2da1c9d commit 6e2c3be
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ public boolean visit(MySqlTableIndex x) {
print(x.getIndexType());
}

print(" (");
print("(");
for (int i = 0, size = x.getColumns().size(); i < size; ++i) {
if (i != 0) {
print(", ");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void test_index_using_btree() throws Exception {
+ "`ebay_token` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'eBay授权码',"//
+ "`ebay_name` varchar(50) NOT NULL COMMENT 'eBay唯一名',"//
+ "`create_time` datetime NOT NULL COMMENT '授权时间',"//
+ "`invalid_time` datetime NOT NULL COMMENT '授权失效时间'," + "PRIMARY KEY USING BTREE (`auth_id`), INDEX `ind_usr_id` USING BTREE (`usr_id`)"//
+ "`invalid_time` datetime NOT NULL COMMENT '授权失效时间'," + "PRIMARY KEY USING BTREE (`auth_id`), INDEX `ind_usr_id` USING BTREE(`usr_id`)"//
+ ") ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='INS_EBAY_AUTH';";

MySqlStatementParser parser = new MySqlStatementParser(sql);
Expand Down Expand Up @@ -108,7 +108,7 @@ public void test_index_using_btree() throws Exception {
+"\n\t`create_time` datetime NOT NULL COMMENT '授权时间', "//
+"\n\t`invalid_time` datetime NOT NULL COMMENT '授权失效时间', "//
+"\n\tPRIMARY KEY USING BTREE (`auth_id`), "
+"\n\tINDEX `ind_usr_id` USING BTREE (`usr_id`)"
+"\n\tINDEX `ind_usr_id` USING BTREE(`usr_id`)"
+"\n) ENGINE = InnoDB CHARSET = utf8 COLLATE utf8_bin COMMENT = 'INS_EBAY_AUTH'", output);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ public void test_0() throws Exception {

Assert.assertNotNull(error);
// error.printStackTrace();
Assert.assertEquals("syntax error, IDENTIFIER free_postage, pos 31", error.getMessage());
Assert.assertEquals("syntax error, error in :'oods free_postage',expect IDENTIFIER, actual IDENTIFIER free_postage", error.getMessage());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public void test_0() throws Exception {

Assert.assertNotNull(error);
// error.printStackTrace();
Assert.assertEquals("syntax error, QUES LIMIT, pos 248", error.getMessage());
Assert.assertEquals("syntax error, error in :'us = LIMIT ?, ?',expect QUES, actual QUES LIMIT", error.getMessage());
}
}

0 comments on commit 6e2c3be

Please sign in to comment.