bug fixed for sql parser. issue #1898

This commit is contained in:
wenshao
2017-08-14 21:29:39 +08:00
parent e210b1608a
commit 5a201ce33c
6 changed files with 83 additions and 19 deletions
@@ -0,0 +1,16 @@
package com.alibaba.druid.bvt.bug;
import junit.framework.TestCase;
import org.junit.Test;
/**
* Created by wenshao on 14/08/2017.
*/
public class Issue1898 extends TestCase {
public void test_for_issue() throws Exception {
String sql = "SELECT 0 bSomething";
String formatted = com.alibaba.druid.sql.SQLUtils.format(sql, "mysql");
// assertNotEquals("SELECT b'Something'", formatted);
assertEquals("SELECT 0 AS bSomething", formatted);
}
}