提交 8b0c4f6b authored 作者: noelgrandin's avatar noelgrandin

Fix bug in DB2 syntax "select * from test with ur", patch from litailang

上级 f07a5e6f
......@@ -59,6 +59,7 @@ Change Log
</li><li>Issue 534: CREATE ALIAS NOCACHE, Patch by Nicolas Fortin
</li><li>Fix an issue with storing Unicode surrogate pairs in CLOB columns.
</li><li>H2 console: add SHIFT+ENTER "run selected" functionality
</li><li>Fix bug in DB2 syntax "select * from test with ur", patch from litailang
</li></ul>
<h2>Version 1.3.174 (2013-10-19)</h2>
......
......@@ -3674,6 +3674,9 @@ public class Parser {
}
return getKeywordOrIdentifier(s, "UNION", KEYWORD);
case 'W':
if ("WITH".equals(s)) {
return KEYWORD;
}
return getKeywordOrIdentifier(s, "WHERE", KEYWORD);
default:
return IDENTIFIER;
......
......@@ -379,6 +379,7 @@ public class TestCompatibility extends TestBase {
stat = conn.createStatement();
stat.execute("drop table test if exists");
stat.execute("create table test(id varchar)");
res = stat.executeQuery("select * from test with ur");
res = stat.executeQuery("select * from test where id = 1 with rr");
res = stat.executeQuery("select * from test order by id fetch next 2 rows only with rr");
res = stat.executeQuery("select * from test order by id fetch next 2 rows only with rs");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论