From: Wolfgang M. M. <wol...@us...> - 2004-05-10 11:23:08
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25553/src/org/exist Modified Files: Indexer.java Log Message: XUpdate: * Btree not correctly updated after node changes, leading to NullPointerException * Attribute values truncated * Page splitting error results in NullPointerException after a few hundred XUpdates * New configuration parameter to control XUpdate behaviour Other: * Properties passed to Collection, XPathQueryService, XQueryService had no effect. * Modified evaluation of index settings in conf.xml. Index: Indexer.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/Indexer.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Indexer.java 27 Apr 2004 15:47:01 -0000 1.7 --- Indexer.java 10 May 2004 11:22:52 -0000 1.8 *************** *** 43,46 **** --- 43,47 ---- import org.exist.dom.TextImpl; import org.exist.storage.DBBroker; + import org.exist.storage.NodePath; import org.exist.util.Configuration; import org.exist.util.FastStringBuffer; *************** *** 75,79 **** protected XMLString charBuf = new XMLString(); protected int currentLine = 0; ! protected StringBuffer currentPath = new StringBuffer(); protected DocumentImpl document = null; protected boolean insideDTD = false; --- 76,82 ---- protected XMLString charBuf = new XMLString(); protected int currentLine = 0; ! // protected StringBuffer currentPath = new StringBuffer(); ! protected NodePath currentPath = new NodePath(); ! protected DocumentImpl document = null; protected boolean insideDTD = false; *************** *** 147,151 **** // reset internal fields level = 0; ! currentPath.setLength(0); stack = new Stack(); nsMappings.clear(); --- 150,154 ---- // reset internal fields level = 0; ! currentPath.reset(); stack = new Stack(); nsMappings.clear(); *************** *** 170,174 **** if (stack.empty()) { if (!validate) ! broker.store(comment, currentPath.toString()); document.appendChild(comment); } else { --- 173,177 ---- if (stack.empty()) { if (!validate) ! broker.store(comment, currentPath); document.appendChild(comment); } else { *************** *** 183,187 **** last.appendChildInternal(text); if (!validate) ! broker.store(text, currentPath.toString()); } charBuf.reset(); --- 186,190 ---- last.appendChildInternal(text); if (!validate) ! broker.store(text, currentPath); } charBuf.reset(); *************** *** 189,193 **** last.appendChildInternal(comment); if (!validate) ! broker.store(comment, currentPath.toString()); } } --- 192,196 ---- last.appendChildInternal(comment); if (!validate) ! broker.store(comment, currentPath); } } *************** *** 232,236 **** stack.pop(); ! currentPath = removeLastPathComponent(currentPath); // currentPath.delete( // currentPath.lastIndexOf("/"), --- 235,240 ---- stack.pop(); ! // currentPath = removeLastPathComponent(currentPath); ! currentPath.removeLastComponent(); // currentPath.delete( // currentPath.lastIndexOf("/"), *************** *** 248,252 **** broker.update(last); } else ! broker.store(last, currentPath.toString()); } level--; --- 252,256 ---- broker.update(last); } else ! broker.store(last, currentPath); } level--; *************** *** 438,442 **** stack.push(node); ! currentPath.append('/').append(qname); if (!validate) { broker.store(node, currentPath); --- 442,447 ---- stack.push(node); ! currentPath.addComponent(qname); ! // currentPath.append('/').append(qname); if (!validate) { broker.store(node, currentPath); *************** *** 456,460 **** stack.push(node); ! currentPath.append('/').append(qname); if (!validate) { broker.store(node, currentPath); --- 461,466 ---- stack.push(node); ! currentPath.addComponent(qname); ! // currentPath.append('/').append(qname); if (!validate) { broker.store(node, currentPath); |