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

Reading a large result set with a BLOB or CLOB column could throw a NullPointerException.

上级 194b9deb
...@@ -70,9 +70,9 @@ class ResultDiskBuffer implements ResultExternal { ...@@ -70,9 +70,9 @@ class ResultDiskBuffer implements ResultExternal {
this.sort = sort; this.sort = sort;
this.columnCount = columnCount; this.columnCount = columnCount;
Database db = session.getDatabase(); Database db = session.getDatabase();
rowBuff = Data.create(null, Constants.DEFAULT_PAGE_SIZE); rowBuff = Data.create(db, Constants.DEFAULT_PAGE_SIZE);
String fileName = session.getDatabase().createTempFile(); String fileName = db.createTempFile();
file = session.getDatabase().openFile(fileName, "rw", false); file = db.openFile(fileName, "rw", false);
file.setCheckedWriting(false); file.setCheckedWriting(false);
file.seek(FileStore.HEADER_LENGTH); file.seek(FileStore.HEADER_LENGTH);
if (sort != null) { if (sort != null) {
...@@ -88,7 +88,7 @@ class ResultDiskBuffer implements ResultExternal { ...@@ -88,7 +88,7 @@ class ResultDiskBuffer implements ResultExternal {
private ResultDiskBuffer(ResultDiskBuffer parent) { private ResultDiskBuffer(ResultDiskBuffer parent) {
this.parent = parent; this.parent = parent;
rowBuff = Data.create(null, Constants.DEFAULT_PAGE_SIZE); rowBuff = Data.create(parent.rowBuff.getHandler(), Constants.DEFAULT_PAGE_SIZE);
file = parent.file; file = parent.file;
if (parent.tapes != null) { if (parent.tapes != null) {
tapes = New.arrayList(); tapes = New.arrayList();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论