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

Converting a UUID to bytes was incorrect.

上级 06fb1080
......@@ -166,8 +166,8 @@ public class ValueUuid extends Value {
public byte[] getBytes() {
byte[] buff = new byte[16];
for (int i = 0; i < 8; i++) {
buff[i] = (byte) ((high >> (8 * (8 - i))) & 255);
buff[8 + i] = (byte) ((low >> (8 * (8 - i))) & 255);
buff[i] = (byte) ((high >> (8 * (7 - i))) & 255);
buff[8 + i] = (byte) ((low >> (8 * (7 - i))) & 255);
}
return buff;
}
......
select cast(cast('01020304-0506-0708-090a-0b0c0d0e0f00' as uuid) as binary);
> 0102030405060708090a0b0c0d0e0f00;
create table test(name varchar(255)) as select 'Hello+World+';
select count(*) from test where name like 'Hello++World++' escape '+';
> 1;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论