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

--no commit message

--no commit message
上级 5c0a8e63
...@@ -131,7 +131,7 @@ public abstract class Command implements CommandInterface { ...@@ -131,7 +131,7 @@ public abstract class Command implements CommandInterface {
public LocalResult executeQueryLocal(int maxrows) throws SQLException { public LocalResult executeQueryLocal(int maxrows) throws SQLException {
startTime = System.currentTimeMillis(); startTime = System.currentTimeMillis();
Database database = session.getDatabase(); Database database = session.getDatabase();
Object sync = database.getMultiThreaded() ? (Object) session : (Object) database; Object sync = database.isMultiThreaded() ? (Object) session : (Object) database;
session.waitIfExclusiveModeEnabled(); session.waitIfExclusiveModeEnabled();
synchronized (sync) { synchronized (sync) {
try { try {
...@@ -174,7 +174,7 @@ public abstract class Command implements CommandInterface { ...@@ -174,7 +174,7 @@ public abstract class Command implements CommandInterface {
session.commit(true); session.commit(true);
} else if (session.getAutoCommit()) { } else if (session.getAutoCommit()) {
session.commit(false); session.commit(false);
} else if (session.getDatabase().getMultiThreaded()) { } else if (session.getDatabase().isMultiThreaded()) {
Database db = session.getDatabase(); Database db = session.getDatabase();
if (db != null) { if (db != null) {
if (db.getLockMode() == Constants.LOCK_MODE_READ_COMMITTED) { if (db.getLockMode() == Constants.LOCK_MODE_READ_COMMITTED) {
...@@ -194,7 +194,7 @@ public abstract class Command implements CommandInterface { ...@@ -194,7 +194,7 @@ public abstract class Command implements CommandInterface {
long start = startTime = System.currentTimeMillis(); long start = startTime = System.currentTimeMillis();
Database database = session.getDatabase(); Database database = session.getDatabase();
database.allocateReserveMemory(); database.allocateReserveMemory();
Object sync = database.getMultiThreaded() ? (Object) session : (Object) database; Object sync = database.isMultiThreaded() ? (Object) session : (Object) database;
session.waitIfExclusiveModeEnabled(); session.waitIfExclusiveModeEnabled();
synchronized (sync) { synchronized (sync) {
int rollback = session.getLogId(); int rollback = session.getLogId();
......
...@@ -168,7 +168,7 @@ public class TransactionCommand extends Prepared { ...@@ -168,7 +168,7 @@ public class TransactionCommand extends Prepared {
Session[] sessions = db.getSessions(false); Session[] sessions = db.getSessions(false);
for (int i = 0; i < sessions.length; i++) { for (int i = 0; i < sessions.length; i++) {
Session s = sessions[i]; Session s = sessions[i];
if (db.getMultiThreaded()) { if (db.isMultiThreaded()) {
synchronized (s) { synchronized (s) {
s.rollback(); s.rollback();
} }
......
...@@ -802,7 +802,7 @@ public class MetaTable extends Table { ...@@ -802,7 +802,7 @@ public class MetaTable extends Table {
} }
add(rows, new String[] { "EXCLUSIVE", database.getExclusiveSession() == null ? "FALSE" : "TRUE" }); add(rows, new String[] { "EXCLUSIVE", database.getExclusiveSession() == null ? "FALSE" : "TRUE" });
add(rows, new String[] { "MODE", database.getMode().getName() }); add(rows, new String[] { "MODE", database.getMode().getName() });
add(rows, new String[] { "MULTI_THREADED", database.getMultiThreaded() ? "1" : "0"}); add(rows, new String[] { "MULTI_THREADED", database.isMultiThreaded() ? "1" : "0"});
add(rows, new String[] { "MVCC", database.isMultiVersion() ? "TRUE" : "FALSE" }); add(rows, new String[] { "MVCC", database.isMultiVersion() ? "TRUE" : "FALSE" });
add(rows, new String[] { "QUERY_TIMEOUT", "" + session.getQueryTimeout() }); add(rows, new String[] { "QUERY_TIMEOUT", "" + session.getQueryTimeout() });
// the setting for the current database // the setting for the current database
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论