Strabon
changeset 79:2ac2820a0b13
Fixes store for triples other than geometries. Go for geometries now.
author | Babis Nikolaou <charnik@di.uoa.gr> |
---|---|
date | Fri Mar 23 15:05:39 2012 +0200 (2012-03-23) |
parents | 83d84d87ab59 |
children | 28bce4140e1f |
files | monetdb/src/main/java/org/openrdf/sail/monetdb/MonetDBConnectionFactory.java |
line diff
1.1 --- a/monetdb/src/main/java/org/openrdf/sail/monetdb/MonetDBConnectionFactory.java Thu Mar 22 16:31:17 2012 +0200 1.2 +++ b/monetdb/src/main/java/org/openrdf/sail/monetdb/MonetDBConnectionFactory.java Fri Mar 23 15:05:39 2012 +0200 1.3 @@ -70,7 +70,27 @@ 1.4 throws SailException 1.5 { 1.6 try { 1.7 - Connection db = getConnection(); 1.8 + 1.9 + /** 1.10 + * //Connection db = getConnection(); 1.11 + * 1.12 + * It's crucial not to create another connection here (as was 1.13 + * the case previously) and share the <nsAndTableIndexes> connection. Here, 1.14 + * the connection is going to be used for creating predicate tables. On 1.15 + * the other hand, <nsAndTableIndexes> connection is used for creating 1.16 + * the temporary <transaction_statements> table and executing the inserts 1.17 + * into it, and afterwards executing the inserts into the respective 1.18 + * predicate table. Since <nsAndTableIndexes> connection has autocommit off 1.19 + * and the connection here has autocommit on, then the tables created by the 1.20 + * connection here are not seen by <nsAndTableIndexes> (recall that connection 1.21 + * <nsAndTableIndexes> has already been started, so it precedes the newly connection 1.22 + * created here). Thus, we were getting an exception like "INSERT INTO <predicate>: 1.23 + * no such table". 1.24 + * 1.25 + * The workaround is not to create a new connection for the creation of predicate tables 1.26 + * and just share the <nsAndTableIndexes> connection. 1.27 + */ 1.28 + Connection db = nsAndTableIndexes; 1.29 db.setAutoCommit(true); 1.30 /**************************/ 1.31 // if (db.getTransactionIsolation() != TRANSACTION_READ_COMMITTED) {