Found one relevant code site in "table/MetaTable.java":
add(rows, "MULTI_THREADED", database.isMultiThreaded() ? "1" : "0");
add(rows, "MVCC", database.isMultiVersion() ? "TRUE" : "FALSE");
This would suggest that a call to "database.isMultiThreaded()" returns
false in my test. To be extra certain, I added:
System.out.println("database.isMultiThreaded=" +
database.isMultiThreaded());
Then I found this in "engine/Database.java", suggesting that even if I try
to set the setting, it gets refused as long as MVCC is active. Most likely,
the exception message complaining about MVCC is lost and not output.
public void setMultiThreaded(boolean multiThreaded) {
if (multiThreaded && this.multiThreaded != multiThreaded) {
if (multiVersion && mvStore == null) {
// currently the combination of MVCC and MULTI_THREADED is
not
// supported
throw DbException.get(
ErrorCode.UNSUPPORTED_SETTING_COMBINATION,
"MVCC & MULTI_THREADED");
}
if (lockMode == 0) {
// currently the combination of LOCK_MODE=0 and
MULTI_THREADED
// is not supported
throw DbException.get(
ErrorCode.UNSUPPORTED_SETTING_COMBINATION,
"LOCK_MODE=0 & MULTI_THREADED");
}
}
this.multiThreaded = multiThreaded;
}
So, here I added:
System.out.println("Tried setting multiThreaded = true, but was refused.");
I also noted that in the Database class constructor, a similar check is not
peformed, and this.multiThreaded is set without checking. Then I ran the
modified version. It produced the following log:
Set multiThreaded to false in constructor.
TCP server running at tcp://127.0.1.1:9092 (others can connect)
Web Console server running at http://127.0.1.1:8082 (only local connections)
Set multiThreaded to true in constructor.
database.isMultiThreaded=true
database.isMultiThreaded=true
So, it would seem to me that the query from INFORMATION_SCHEMA.SETTINGS
returns misleading information. I will try to look deeper into why.
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.