public class LogChecksumSetup
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private CorruptibleIo |
cbio |
Constructor and Description |
---|
LogChecksumSetup() |
Modifier and Type | Method and Description |
---|---|
private void |
createTable(java.sql.Connection conn) |
private byte[] |
generateBinaryData(java.util.Random r,
int factor,
int size) |
(package private) void |
insertAndCorrupt(java.sql.Connection conn,
int rowCount)
Insert some rows into the table and corrupt the log for the last row,
so when we recover , there should be one row less even though we committed.
|
(package private) void |
logMessage(java.lang.String str) |
static void |
main(java.lang.String[] argv) |
private void |
runTest(java.sql.Connection conn) |
private void |
setupLogCorruption(int off,
int len) |
(package private) void |
updateAndCorrupt(java.sql.Connection conn,
int rowCount)
update some rows in the table and corrupt the log for the last row,
so when we recover , All checsum should be correct because corrupted
log transaction should been rolled back.
|
(package private) void |
verifyData(java.sql.Connection conn,
int expectedRowCount) |
private CorruptibleIo cbio
void insertAndCorrupt(java.sql.Connection conn, int rowCount) throws java.sql.SQLException
java.sql.SQLException
void updateAndCorrupt(java.sql.Connection conn, int rowCount) throws java.sql.SQLException
java.sql.SQLException
void verifyData(java.sql.Connection conn, int expectedRowCount) throws java.sql.SQLException
java.sql.SQLException
private void createTable(java.sql.Connection conn) throws java.sql.SQLException
java.sql.SQLException
private void setupLogCorruption(int off, int len)
private byte[] generateBinaryData(java.util.Random r, int factor, int size)
private void runTest(java.sql.Connection conn) throws java.sql.SQLException
java.sql.SQLException
void logMessage(java.lang.String str)
public static void main(java.lang.String[] argv) throws java.lang.Throwable
java.lang.Throwable
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.