"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "hsqldb/src/org/hsqldb/index/IndexStats.java" between
hsqldb-2.6.0.zip and hsqldb-2.6.1.zip

About: HSQLDB (HyperSQL DataBase) is a SQL relational database engine written in Java. It supports nearly full ANSI-92 SQL (BNF format) and full core SQL:2008.

IndexStats.java  (hsqldb-2.6.0):IndexStats.java  (hsqldb-2.6.1)
skipping to change at line 34 skipping to change at line 34
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package org.hsqldb.index; package org.hsqldb.index;
import org.hsqldb.Table; import org.hsqldb.Table;
import org.hsqldb.TypeInvariants;
import org.hsqldb.lib.HsqlArrayList; import org.hsqldb.lib.HsqlArrayList;
import org.hsqldb.persist.PersistentStore; import org.hsqldb.persist.PersistentStore;
import org.hsqldb.result.Result; import org.hsqldb.result.Result;
import org.hsqldb.types.Type;
/** /**
* Holds results of index check * Holds results of index check
* *
* @author Fred Toussi (fredt@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net)
* @version 2.5.1 * @version 2.6.1
* @since 2.5.1 * @since 2.5.1
*/ */
public class IndexStats { public class IndexStats {
public static final IndexStats[] emptyArray = new IndexStats[0]; public static final IndexStats[] emptyArray = new IndexStats[0];
// //
public static final int sizes = 1; public static final int sizes = 1;
public static final int checkSpaces = 2; public static final int checkSpaces = 2;
public static final int checkRows = 3; public static final int checkRows = 3;
skipping to change at line 70 skipping to change at line 72
public PersistentStore store; public PersistentStore store;
public boolean hasErrors; public boolean hasErrors;
public long errorCount; public long errorCount;
public long loopCount; public long loopCount;
public long goodRowCount; public long goodRowCount;
public boolean reindexed; // set after a reindex public boolean reindexed; // set after a reindex
HsqlArrayList unorderedList = new HsqlArrayList(); HsqlArrayList unorderedList = new HsqlArrayList();
public static Result newEmptyResult() { public static Result newEmptyResult() {
Result result = Result.newDoubleColumnResult("TABLE_OR_INDEX_NAME", String[] names = new String[] {
"INFO"); "TABLE_NAME", "INDEX_NAME", "INFO"
};
Type[] types = new Type[] {
Type.SQL_VARCHAR_DEFAULT, TypeInvariants.SQL_IDENTIFIER,
Type.SQL_VARCHAR_DEFAULT
};
Result result = Result.newMultiColumnResult(names, types);
return result; return result;
} }
public void addTableStats(Result result) { public void addTableStats(Result result) {
String[] data = new String[] { Object[] data = new Object[] {
"TABLE " ((Table) index.getTable()).getName()
+ ((Table) index.getTable()).getName()
.getSchemaQualifiedStatementName(), .getSchemaQualifiedStatementName(),
"rows " + store.elementCount() "", "rows " + store.elementCount()
}; };
result.addRow(data); result.navigator.add(data);
} }
public void addStats(Result result) { public void addStats(Result result) {
{ {
String[] data = new String[] { Object[] data = new Object[] {
((Table) index.getTable()).getName()
.getSchemaQualifiedStatementName(),
index.getName().getStatementName(), index.getName().getStatementName(),
"readable rows " + goodRowCount "readable rows " + goodRowCount
}; };
result.addRow(data); result.navigator.add(data);
} }
if (errorCount != 0) { if (errorCount != 0) {
String[] data = new String[] { Object[] data = new Object[] {
"", "error rows " + errorCount "", "", "error rows " + errorCount
}; };
result.addRow(data); result.navigator.add(data);
} }
if (loopCount != 0) { if (loopCount != 0) {
String[] data = new String[] { Object[] data = new Object[] {
"", "loop rows " + loopCount "", "", "loop rows " + loopCount
}; };
result.addRow(data); result.navigator.add(data);
} }
for (int i = 0; i < unorderedList.size(); i++) { for (int i = 0; i < unorderedList.size(); i++) {
String[] data = new String[] { Object[] data = new Object[] {
"", (String) unorderedList.get(i) "", "", (Object) unorderedList.get(i)
}; };
result.addRow(data); result.navigator.add(data);
} }
} }
public void addReindexedStats(Result result) { public void addReindexedStats(Result result) {
{ {
String[] data = new String[] { Object[] data = new Object[] {
((Table) index.getTable()).getName()
.getSchemaQualifiedStatementName(),
index.getName().getStatementName(), "reindexed" index.getName().getStatementName(), "reindexed"
}; };
result.addRow(data); result.navigator.add(data);
} }
} }
} }
 End of changes. 17 change blocks. 
21 lines changed or deleted 32 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)