[ https://issues.apache.org/jira/browse/DERBY-3181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Pendleton updated DERBY-3181: ----------------------------------- Attachment: testChange.diff With your change applied, I ran 'ant junit-core' and saw some test diffs: junit-core: [junit] Running org.apache.derbyTesting.junit.EnvTest [junit] Tests run: 18, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.296 sec [junit] Running org.apache.derbyTesting.functionTests.tests.derbynet._Suite [junit] Tests run: 330, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 102.169 sec [junit] Running org.apache.derbyTesting.functionTests.tests.tools._Suite [junit] Tests run: 127, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 92.221 sec [junit] Running org.apache.derbyTesting.functionTests.tests.demo._Suite [junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 28.37 sec [junit] Running org.apache.derbyTesting.functionTests.tests.lang._Suite [junit] Tests run: 3225, Failures: 0, Errors: 14, Skipped: 0, Time elapsed: 2,976.494 sec [junit] Test org.apache.derbyTesting.functionTests.tests.lang._Suite FAILED [junit] Running org.apache.derbyTesting.functionTests.tests.jdbcapi._Suite [junit] Tests run: 7881, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 1,526.023 sec [junit] Test org.apache.derbyTesting.functionTests.tests.jdbcapi._Suite FAILED [junit] Running org.apache.derbyTesting.functionTests.tests.store._Suite [junit] Tests run: 346, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1,026.574 sec [junit] Running org.apache.derbyTesting.functionTests.tests.engine._Suite [junit] Tests run: 39, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 96.724 sec [junit] Running org.apache.derbyTesting.functionTests.tests.replicationTests.ReplicationSuite [junit] Tests run: 23, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 635.49 sec [junit] Running org.apache.derbyTesting.unitTests.junit._Suite [junit] Tests run: 166, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.923 sec [junit] Running org.apache.derbyTesting.functionTests.tests.upgradeTests._Suite [junit] Tests run: 6439, Failures: 14, Errors: 138, Skipped: 0, Time elapsed: 2,170.677 sec [junit] Test org.apache.derbyTesting.functionTests.tests.upgradeTests._Suite FAILED [junit] Running org.apache.derbyTesting.functionTests.suites.EncryptionSuite [junit] Tests run: 203, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 65.194 sec But when I looked at the actual test failures, it turned out that it was just the same test, jdbcapi/DatabaseMetaDataTest.java, which was failing -- the test suites run that test multiple times, in multiple different configurations. DatabaseMetaDataTest calls getBestRowIdentifier with an invalid scope, intentionally, in order to test it, but was not expecting an exception. I changed the test to catch the expected exception for the invalid scope (see the testChange.diff patch), and now the tests are running clean. Can you try applying the testChange.diff patch to your system and see if the test results are improved for you? > isNullable on ResultSetMetaData from DatabaseMetaData.getBestRowIdentifier > values are opposite when there is no rows in ResultSet vs. when there is a > row. > ---------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-3181 > URL: https://issues.apache.org/jira/browse/DERBY-3181 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.4.1.3 > Reporter: Myrna van Lunteren > Assignee: Danoja Dias > Priority: Trivial > Labels: derby_triage10_5_2 > Attachments: Derby-3181.diff, repro.java, testChange.diff > > > With code like the following: > DatabaseMetaData dmd = conn.getMetaData(); > ResultSet rs = dmd.getBestRowIdentifier(null,"APP","a",3,true); > ResultSetMetaData rsmd = rs.getMetaData(); > int actualCols = rsmd.getColumnCount(); > for (int i = 0; i < actualCols; i++) > { > System.out.print("getColumnName: " + rsmd.getColumnName(i+1) > + ", isNullable: "); > System.out.println(rsmd.isNullable(i+1)); > } > The printed values for isNullable returned are opposite of what they are when > the getBestRowIdentifier call looks like this: > ResultSet rs = dmd.getBestRowIdentifier(null,"APP","a",1,true); > In the latter case, the values are: > getColumnName: SCOPE, isNullable: 0 > getColumnName: COLUMN_NAME, isNullable: 1 > getColumnName: DATA_TYPE, isNullable: 0 > getColumnName: TYPE_NAME, isNullable: 1 > getColumnName: COLUMN_SIZE, isNullable: 0 > getColumnName: BUFFER_LENGTH, isNullable: 0 > getColumnName: DECIMAL_DIGITS, isNullable: 0 > getColumnName: PSEUDO_COLUMN, isNullable: 0 > In the first case, the values are: > getColumnName: SCOPE, isNullable: 1 > getColumnName: COLUMN_NAME, isNullable: 0 > getColumnName: DATA_TYPE, isNullable: 1 > getColumnName: TYPE_NAME, isNullable: 1 > getColumnName: COLUMN_SIZE, isNullable: 1 > getColumnName: BUFFER_LENGTH, isNullable: 1 > getColumnName: DECIMAL_DIGITS, isNullable: 1 > getColumnName: PSEUDO_COLUMN, isNullable: 1 > The isNullable value should be stable. > It's probably worthwhile verifying what the value *should* be in the first > place. -- This message was sent by Atlassian JIRA (v6.3.4#6332)