提交 a87076f0 authored 作者: noelgrandin@gmail.com's avatar noelgrandin@gmail.com

Some places in the code were not respecting the value set in the "SET MAX_MEMORY_ROWS x" command

上级 69b907a3
......@@ -36,6 +36,7 @@ Change Log
JdbcDatabaseMetaData#supportsTransactionIsolationLevel(TRANSACTION_READ_UNCOMMITTED)
should return false
</li><li>Fix bug which could generate deadlocks when multiple connections accessed the same table.
</li><li>Some places in the code were not respecting the value set in the "SET MAX_MEMORY_ROWS x" command
</li></ul>
<h2>Version 1.4.182 Beta (2014-10-17)</h2>
......
......@@ -494,7 +494,7 @@ public class MVTable extends TableBase {
long i = 0;
Store store = session.getDatabase().getMvStore();
int bufferSize = SysProperties.MAX_MEMORY_ROWS / 2;
int bufferSize = database.getMaxMemoryRows() / 2;
ArrayList<Row> buffer = New.arrayList(bufferSize);
String n = getName() + ":" + index.getName();
int t = MathUtils.convertLongToInt(total);
......@@ -535,7 +535,7 @@ public class MVTable extends TableBase {
long total = remaining;
Cursor cursor = scan.find(session, null, null);
long i = 0;
int bufferSize = (int) Math.min(total, SysProperties.MAX_MEMORY_ROWS);
int bufferSize = (int) Math.min(total, database.getMaxMemoryRows());
ArrayList<Row> buffer = New.arrayList(bufferSize);
String n = getName() + ":" + index.getName();
int t = MathUtils.convertLongToInt(total);
......
......@@ -264,7 +264,7 @@ public class RegularTable extends TableBase {
long total = remaining;
Cursor cursor = scan.find(session, null, null);
long i = 0;
int bufferSize = (int) Math.min(rowCount, SysProperties.MAX_MEMORY_ROWS);
int bufferSize = (int) Math.min(rowCount, database.getMaxMemoryRows());
ArrayList<Row> buffer = New.arrayList(bufferSize);
String n = getName() + ":" + index.getName();
int t = MathUtils.convertLongToInt(total);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论