db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-268) Add Support for truncate table
Date Mon, 27 Sep 2010 18:25:33 GMT

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

Rick Hillegas updated DERBY-268:
--------------------------------

    Attachment: TruncateConcurrency.java

Attaching a new rev of TruncateConcurrency. The previous version was always committing the
Selector after reading the first row. This version makes the commitSelector option function
correctly. Now if the Selector does not commit, I see that the Truncator blocks waiting for
a lock if the Truncator is working in a separate transaction.

This fix does not affect the following conclusions:

i) The behavior of TRUNCATE TABLE is still consistent with the SQL Standard.

ii) TRUNCATE TABLE still behaves like DROP TABLE.


Here are the results after fixing this defect:

------------ Re-initialization command is TRUNCATE TABLE -------------

1) TRUNCATE TABLE command raises "Operation 'TRUNCATE TABLE' cannot be performed on object
'T' because there is an open ResultSet dependent on that object."

java TruncateConcurrency truncate same sensitive
java TruncateConcurrency truncate same sensitive commitTruncator
java TruncateConcurrency truncate same sensitive commitSelector
java TruncateConcurrency truncate same sensitive commitTruncator commitSelector
java TruncateConcurrency truncate same insensitive
java TruncateConcurrency truncate same insensitive commitTruncator
java TruncateConcurrency truncate same insensitive commitSelector
java TruncateConcurrency truncate same insensitive commitTruncator commitSelector


2) TRUNCATE TABLE command hangs waiting for a lock

java TruncateConcurrency truncate different sensitive
java TruncateConcurrency truncate different sensitive commitTruncator
java TruncateConcurrency truncate different insensitive
java TruncateConcurrency truncate different insensitive commitTruncator


3) Selector hangs trying to read the second row

java TruncateConcurrency truncate different sensitive commitSelector
java TruncateConcurrency truncate different insensitive commitSelector


4) Selector trips over an NPE trying to read the second row

java TruncateConcurrency truncate different sensitive commitTruncator commitSelector
java TruncateConcurrency truncate different insensitive commitTruncator commitSelector




------------ Re-initialization command is DROP TABLE -------------

1') DROP TABLE raises "Operation 'DROP TABLE' cannot be performed on object 'T' because there
is an open ResultSet dependent on that object."

java TruncateConcurrency drop same sensitive
java TruncateConcurrency drop same sensitive commitTruncator
java TruncateConcurrency drop same sensitive commitSelector
java TruncateConcurrency drop same sensitive commitTruncator commitSelector
java TruncateConcurrency drop same insensitive
java TruncateConcurrency drop same insensitive commitTruncator
java TruncateConcurrency drop same insensitive commitSelector
java TruncateConcurrency drop same insensitive commitTruncator commitSelector


2') DROP TABLE command hangs waiting for a lock

java TruncateConcurrency drop different sensitive
java TruncateConcurrency drop different sensitive commitTruncator
java TruncateConcurrency drop different insensitive
java TruncateConcurrency drop different insensitive commitTruncator


3') Selector hangs trying to read the second row

java TruncateConcurrency drop different sensitive commitSelector
java TruncateConcurrency drop different insensitive commitSelector


4') Selector trips over an NPE trying to read the second row

java TruncateConcurrency drop different sensitive commitTruncator commitSelector
java TruncateConcurrency drop different insensitive commitTruncator commitSelector


------------ Re-initialization command is DELETE FROM -------------

The Selector successfully reads both rows

java TruncateConcurrency delete same sensitive
java TruncateConcurrency delete same sensitive commitTruncator
java TruncateConcurrency delete same sensitive commitSelector
java TruncateConcurrency delete same sensitive commitTruncator commitSelector
java TruncateConcurrency delete same insensitive
java TruncateConcurrency delete same insensitive commitTruncator
java TruncateConcurrency delete same insensitive commitSelector
java TruncateConcurrency delete same insensitive commitTruncator commitSelector
java TruncateConcurrency delete different sensitive
java TruncateConcurrency delete different sensitive commitTruncator
java TruncateConcurrency delete different sensitive commitSelector
java TruncateConcurrency delete different sensitive commitTruncator commitSelector
java TruncateConcurrency delete different insensitive
java TruncateConcurrency delete different insensitive commitTruncator
java TruncateConcurrency delete different insensitive commitSelector
java TruncateConcurrency delete different insensitive commitTruncator commitSelector


> Add Support for truncate table
> ------------------------------
>
>                 Key: DERBY-268
>                 URL: https://issues.apache.org/jira/browse/DERBY-268
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Lance Andersen
>            Assignee: Eranda Sooriyabandara
>            Priority: Minor
>         Attachments: derby-268-01-ab-enableForInsaneBuilds.diff, derby-268-02-aa-permsTest.diff,
Derby-268.diff, tests.diff, TruncateConcurrency.java, TruncateConcurrency.java, TruncateConcurrency.java
>
>
> Adding support for truncate table command will aid to portability

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


Mime
View raw message