db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2641) Convert lang/staleplans.sql to JUnit
Date Tue, 15 May 2007 14:13:16 GMT

     [ https://issues.apache.org/jira/browse/DERBY-2641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Knut Anders Hatlen updated DERBY-2641:

    Attachment: derby-2641-1.stat

The attached patch adds a JUnit test (StalePlansTest) which tests the same things as lang/staleplans.sql.
The patch does not remove the old test.

One thing that puzzled me with the original test, was that three of the calls to SYSCS_GETRUNTIMESTATISTICS()
had comments which said they expected table scans, but the query plans in the master file
showed that index scans were used. For now, I left the comments which said we expected table
scans and added a note saying that we actually get index scans.

For those interested, we get the unexpected query plans on the first, second and fourth call
to SYSCS_GETRUNTIMESTATISTICS() in the old staleplans.sql test. In the new JUnit test, all
the queries with unexpected query plans are found in testStalePlansOnSmallTable(). I would
say it is reasonable to expect a table scan in these cases since the table only contains one
row, but I don't know enough about this area to say whether it's a bug. If someone thinks
it's a bug, I will file a JIRA for it.

> Convert lang/staleplans.sql to JUnit
> ------------------------------------
>                 Key: DERBY-2641
>                 URL: https://issues.apache.org/jira/browse/DERBY-2641
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: derby-2641-1.diff, derby-2641-1.stat

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message