public class SelectDistinctTest extends JDBCPerfTestCase
Modifier and Type | Field and Description |
---|---|
private static int |
EXPECTED_DISTINCT_BINARY5
The number of distinct rows to be expected in the test for CHAR(5) FOR
BIT DATA.
|
private static int |
EXPECTED_DISTINCT_CHAR5
The number of distinct rows to be expected in the test for CHAR(5).
|
private java.sql.PreparedStatement |
ps
The prepared statement to be used in the test body.
|
private static java.lang.String |
TEST_BINARY5
Name of the test case for CHAR(5) FOR BIT DATA, and the name of the
table used by that test.
|
private static java.lang.String |
TEST_CHAR5
Name of the test case for CHAR(5), and the name of the table used by
that test.
|
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Modifier | Constructor and Description |
---|---|
private |
SelectDistinctTest(java.lang.String name,
int iterations,
int repeats)
Create a test case.
|
Modifier and Type | Method and Description |
---|---|
static byte[] |
charToBinary(java.lang.String s)
Stored function that converts an SQL CHAR value to an SQL CHAR FOR BIT
DATA value.
|
void |
selectDistinctBinary5()
Test case for SELECT DISTINCT on a CHAR(5) FOR BIT DATA column.
|
void |
selectDistinctChar5()
Test case for SELECT DISTINCT on a CHAR(5) column.
|
protected void |
setUp()
Set up the test environment.
|
static junit.framework.Test |
suite()
Create the suite of all test cases in this class.
|
protected void |
tearDown()
Tear down the test environment.
|
runBareOverridable, runTest
assertCallError, assertCheckTable, assertCommitError, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertResults, assertResults, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, chattyPrepare, chattyPrepareCall, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, dumpRs, dumpRs, emptyStatementCache, executeQuery, expectCompilationError, expectCompilationError, expectExecutionError, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, goodStatement, goodUpdate, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runScript, runScript, runSQLCommands, setAutoCommit, usingDB2Client, usingDerbyNetClient, usingEmbedded
alarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSameNullness, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, newAssertionFailedError, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemErr, setSystemOut, setSystemProperty, sleep, sleepAtLeastOneTick, traceit, vmAtLeast
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, setName, toString
private java.sql.PreparedStatement ps
private static final java.lang.String TEST_CHAR5
private static final int EXPECTED_DISTINCT_CHAR5
private static final java.lang.String TEST_BINARY5
private static final int EXPECTED_DISTINCT_BINARY5
private SelectDistinctTest(java.lang.String name, int iterations, int repeats)
name
- the name of the test method, and the name of the table used
in the testiterations
- the number of iterations in each testrepeats
- the number of times each test should be repeatedpublic static junit.framework.Test suite()
protected void setUp() throws java.sql.SQLException
setUp
in class junit.framework.TestCase
java.sql.SQLException
protected void tearDown() throws java.lang.Exception
tearDown
in class BaseJDBCTestCase
java.lang.Exception
public static byte[] charToBinary(java.lang.String s) throws java.io.UnsupportedEncodingException
s
- the string to convert to binary datajava.io.UnsupportedEncodingException
public void selectDistinctChar5() throws java.sql.SQLException
java.sql.SQLException
public void selectDistinctBinary5() throws java.sql.SQLException
java.sql.SQLException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.