提交 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
...@@ -35,7 +35,8 @@ Change Log ...@@ -35,7 +35,8 @@ Change Log
</li><li>Issue 581: When running in LOCK_MODE=0, </li><li>Issue 581: When running in LOCK_MODE=0,
JdbcDatabaseMetaData#supportsTransactionIsolationLevel(TRANSACTION_READ_UNCOMMITTED) JdbcDatabaseMetaData#supportsTransactionIsolationLevel(TRANSACTION_READ_UNCOMMITTED)
should return false should return false
</li><li>Fix bug which could generate deadlocks when multiple connections accessed the same table. </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> </li></ul>
<h2>Version 1.4.182 Beta (2014-10-17)</h2> <h2>Version 1.4.182 Beta (2014-10-17)</h2>
......
...@@ -494,7 +494,7 @@ public class MVTable extends TableBase { ...@@ -494,7 +494,7 @@ public class MVTable extends TableBase {
long i = 0; long i = 0;
Store store = session.getDatabase().getMvStore(); Store store = session.getDatabase().getMvStore();
int bufferSize = SysProperties.MAX_MEMORY_ROWS / 2; int bufferSize = database.getMaxMemoryRows() / 2;
ArrayList<Row> buffer = New.arrayList(bufferSize); ArrayList<Row> buffer = New.arrayList(bufferSize);
String n = getName() + ":" + index.getName(); String n = getName() + ":" + index.getName();
int t = MathUtils.convertLongToInt(total); int t = MathUtils.convertLongToInt(total);
...@@ -535,7 +535,7 @@ public class MVTable extends TableBase { ...@@ -535,7 +535,7 @@ public class MVTable extends TableBase {
long total = remaining; long total = remaining;
Cursor cursor = scan.find(session, null, null); Cursor cursor = scan.find(session, null, null);
long i = 0; 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); ArrayList<Row> buffer = New.arrayList(bufferSize);
String n = getName() + ":" + index.getName(); String n = getName() + ":" + index.getName();
int t = MathUtils.convertLongToInt(total); int t = MathUtils.convertLongToInt(total);
......
...@@ -264,7 +264,7 @@ public class RegularTable extends TableBase { ...@@ -264,7 +264,7 @@ public class RegularTable extends TableBase {
long total = remaining; long total = remaining;
Cursor cursor = scan.find(session, null, null); Cursor cursor = scan.find(session, null, null);
long i = 0; 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); ArrayList<Row> buffer = New.arrayList(bufferSize);
String n = getName() + ":" + index.getName(); String n = getName() + ":" + index.getName();
int t = MathUtils.convertLongToInt(total); int t = MathUtils.convertLongToInt(total);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论