Closed cbqqkcel closed 1 month ago
https://github.com/lealone/Lealone/blob/20492a40688b0514f0b51579671c17cb160e1ca9/lealone-common/src/main/java/com/lealone/db/value/ValueLob.java#L101
int len = getBufferSize(handler, false, remaining); len = IOUtils.readFully(in, buff);
这里是不是应该这样,还是说getBufferSize(handler, false, remaining);没必要执行
getBufferSize(handler, false, remaining); len = IOUtils.readFully(in, buff);
140行也有同样的问题
那个是 h2 数据库的遗留代码,确实没用到,它的新代码用了,从 readFully(InputStream in, byte[] buffer) 变成了 readFully(InputStream in, byte[] buffer, int max),底层都是调用 java.io.InputStream.read(byte[], int, int), max 这个参数并不一定是输入流的实际长度。
https://github.com/lealone/Lealone/blob/20492a40688b0514f0b51579671c17cb160e1ca9/lealone-common/src/main/java/com/lealone/db/value/ValueLob.java#L101
int len = getBufferSize(handler, false, remaining); len = IOUtils.readFully(in, buff);
这里是不是应该这样,还是说getBufferSize(handler, false, remaining);没必要执行
getBufferSize(handler, false, remaining); len = IOUtils.readFully(in, buff);
140行也有同样的问题