提交 30a48bfa authored 作者: Thomas Mueller's avatar Thomas Mueller

Converting a UUID to bytes was incorrect.

上级 762aacbb
...@@ -18,7 +18,9 @@ Change Log ...@@ -18,7 +18,9 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>The Recover tool did not convert correctly convert CLOB data with non-ASCII characters. <ul><li>Converting a UUID to bytes was incorrect. Because of that, updatable result sets on
tables with UUID primary key did not work.
</li><li>The Recover tool did not convert correctly convert CLOB data with non-ASCII characters.
This was also a problem when using the automatic upgrade to the page store file format. This was also a problem when using the automatic upgrade to the page store file format.
</li></ul> </li></ul>
......
...@@ -167,8 +167,8 @@ public class ValueUuid extends Value { ...@@ -167,8 +167,8 @@ public class ValueUuid extends Value {
public byte[] getBytes() { public byte[] getBytes() {
byte[] buff = new byte[16]; byte[] buff = new byte[16];
for (int i = 0; i < 8; i++) { for (int i = 0; i < 8; i++) {
buff[i] = (byte) ((high >> (8 * (8 - i))) & 255); buff[i] = (byte) ((high >> (8 * (7 - i))) & 255);
buff[8 + i] = (byte) ((low >> (8 * (8 - i))) & 255); buff[8 + i] = (byte) ((low >> (8 * (7 - i))) & 255);
} }
return buff; return buff;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论