提交 4a6e0d2d authored 作者: Thomas Mueller's avatar Thomas Mueller

DISTINCT and GROUP BY on a CLOB column was broken.

上级 bdaca84d
...@@ -600,7 +600,11 @@ public class ValueLob extends Value { ...@@ -600,7 +600,11 @@ public class ValueLob extends Value {
return (int) (precision ^ (precision >>> 32)); return (int) (precision ^ (precision >>> 32));
} }
try { try {
hash = ByteUtils.getByteArrayHash(getBytes()); if (type == CLOB) {
hash = getString().hashCode();
} else {
hash = ByteUtils.getByteArrayHash(getBytes());
}
} catch (SQLException e) { } catch (SQLException e) {
throw Message.convertToInternal(e); throw Message.convertToInternal(e);
} }
......
create table test(t clob) as select 1;
select distinct t from test;
> 1;
drop table test;
create table test(id int unique not null); create table test(id int unique not null);
drop table test; drop table test;
create table test(id int not null unique); create table test(id int not null unique);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论