Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#547 Delete relations in blocks if needed

v3.2
closed
nobody
JBossCMP (86)
5
2005-09-04
2004-12-16
Pekka Vainio
No

Solution to bug 1062429
(http://sourceforge.net/tracker/index.php?func=detail&aid=1062429&group_id=22866&atid=376685
).

This patch will add configuration parameter
delete-relations-max to jbosscmp-jdbc.xml. If
specified this parameter will limit number of relations
to be removed in one sql-statement. If limit is
exceeded multiple delete statements will be executed.

At least Sybase has problems with too many parameters
in statements. Accoording to the bug Oracle and SQL
server is affected too.

Affected files:
jboss/src/etc/conf/default/standardjbosscmp-jdbc.xml
- set limit for Sybase
jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCTypeMappingMetaData.java
- limit configuration
jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCDeleteRelationsCommand.java
- delete in blocks if limit specified and exceeded

Since I have no real knowledge of JBoss internals I
hope jbosscmp-jdbc is the right place for this
configuration. Parameter name could be more
informative, but I could not figure out what could be
short and informative name for it.

Discussion

  • Logged In: YES
    user_id=543482

    Looks ok. Should there be || instead of &&?
    + if (deleteRelationsMax == -1 &&
    relationData.removedRelations.size() < deleteRelationsMax) {

    Isn't max-keys-in-delete a better name for the element?

    Do you want to commit it yourself?

    Thanks.

     
  • Pekka Vainio
    Pekka Vainio
    2004-12-20

    Logged In: YES
    user_id=125350

    Yes, you are right, fixed && -> ||

    Changed configuration element name to max-keys-in-delete.

     
  • Pekka Vainio
    Pekka Vainio
    2004-12-20

    Corrected patch to fix bug 1062429

     
  • Pekka Vainio
    Pekka Vainio
    2004-12-21

    Logged In: YES
    user_id=125350

    Btw. what did you mean by committing it myself?

     
  • Scott M Stark
    Scott M Stark
    2005-09-04

    Logged In: YES
    user_id=175228

    All issues have been moved to http://jira.jboss.com. Existing
    issues have been moved. New issues will be closed with this
    canned reponse.

     
  • Scott M Stark
    Scott M Stark
    2005-09-04

    • status: open --> closed