From: Wolfgang M. M. <wol...@us...> - 2005-05-29 21:49:55
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28958/src/org/exist/storage Modified Files: NativeValueIndexByQName.java Log Message: Use 2-byte short for namespaceId and localNameId. Using just 1 byte is definitely not enough. Index: NativeValueIndexByQName.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeValueIndexByQName.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** NativeValueIndexByQName.java 29 May 2005 19:51:29 -0000 1.11 --- NativeValueIndexByQName.java 29 May 2005 21:49:47 -0000 1.12 *************** *** 21,25 **** package org.exist.storage; - import java.io.EOFException; import java.io.IOException; import java.util.Iterator; --- 21,24 ---- *************** *** 27,45 **** import org.apache.log4j.Logger; import org.dbxml.core.data.Value; - import org.dbxml.core.filer.BTreeCallback; import org.dbxml.core.filer.BTreeException; import org.dbxml.core.indexer.IndexQuery; import org.exist.collections.Collection; import org.exist.dom.AttrImpl; - import org.exist.dom.DocumentImpl; import org.exist.dom.DocumentSet; import org.exist.dom.ElementImpl; import org.exist.dom.ExtArrayNodeSet; import org.exist.dom.NodeImpl; - import org.exist.dom.NodeProxy; import org.exist.dom.NodeSet; import org.exist.dom.QName; import org.exist.dom.SymbolTable; - import org.exist.storage.io.VariableByteInput; import org.exist.storage.store.BFile; import org.exist.util.ByteConversion; --- 26,40 ---- *************** *** 166,170 **** * (collectionId, qname, indexType, indexData) */ public byte[] serialize(short collectionId, boolean caseSensitive) { ! final byte[] data = indexable.serializeValue(4, caseSensitive); ByteConversion.shortToByte(collectionId, data, 0); serializeQName(data, 2 ); --- 161,165 ---- * (collectionId, qname, indexType, indexData) */ public byte[] serialize(short collectionId, boolean caseSensitive) { ! final byte[] data = indexable.serializeValue(6, caseSensitive); ByteConversion.shortToByte(collectionId, data, 0); serializeQName(data, 2 ); *************** *** 177,182 **** short namespaceId = symbols.getNSSymbol(qname.getNamespaceURI()); short localNameId = symbols.getSymbol(qname.getLocalName()); ! data[offset] = (byte)namespaceId; ! data[offset+1] = (byte)localNameId; } --- 172,177 ---- short namespaceId = symbols.getNSSymbol(qname.getNamespaceURI()); short localNameId = symbols.getSymbol(qname.getLocalName()); ! ByteConversion.shortToByte(namespaceId, data, offset); ! ByteConversion.shortToByte(localNameId, data, offset + 2); } |