提交 e15bc041 authored 作者: Thomas Mueller's avatar Thomas Mueller

The wrong kind of exception (NullPointerException) was thrown in a UNION query…

The wrong kind of exception (NullPointerException) was thrown in a UNION query with an incorrect ORDER BY expression.
上级 111006d2
......@@ -18,7 +18,10 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>Browser: if no default browser is set, Google Chrome is now used if available.
<ul><li>The wrong kind of exception (NullPointerException) was thrown in a UNION query
with an incorrect ORDER BY expression.
</li><li>Issue 362: support LIMIT in UPDATE statements.
</li><li>Browser: if no default browser is set, Google Chrome is now used if available.
If not available, then Konqueror, Netscape, or Opera is used if available (as before).
</li><li>CSV tool: new feature to preserve the case sensitivity of column names
(option caseSensitiveColumnNames).
......
......@@ -353,12 +353,14 @@ public abstract class Query extends Prepared {
String ca = c.getOriginalTableAliasName();
if (ca == null) {
found = false;
// select id from test order by test.id
for (int i = 0, size = filters.size(); i < size; i++) {
TableFilter f = filters.get(i);
if (db.equalsIdentifiers(f.getTableAlias(), tableAlias)) {
found = true;
break;
if (filters != null) {
// select id from test order by test.id
for (int i = 0, size = filters.size(); i < size; i++) {
TableFilter f = filters.get(i);
if (db.equalsIdentifiers(f.getTableAlias(), tableAlias)) {
found = true;
break;
}
}
}
} else {
......
......@@ -5,6 +5,9 @@ call cast('null' as uuid);
create table test(name varchar(255));
> ok
select * from test union select * from test order by test.name;
> exception
insert into test values('a'), ('b'), ('c');
> update count: 3
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论