Summary: | revokePermission in PostgresRDBMSAdapter.java doesn't work | ||
---|---|---|---|
Product: | Slide | Reporter: | Tomasz Majchrzak <tomekem> |
Component: | Stores | Assignee: | Slide Developer List <slide-dev> |
Status: | CLOSED FIXED | ||
Severity: | normal | Keywords: | PatchAvailable |
Priority: | P2 | ||
Version: | Nightly | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
Patch to fix SQL-statements as suggested.
Patch to fix revokePermission for revisionNumber==null Prepare statement before use |
Description
Tomasz Majchrzak
2005-04-07 08:47:30 UTC
Created attachment 14636 [details]
Patch to fix SQL-statements as suggested.
Patch to fix SQL-statements as suggested. Changed the two different statements
into a single reusable PreparedStatement and standard JDBC setNull(), instead
of hardcoded "IS NULL" in SQL.
Patch applied. Please cross-check and close. The patch was incorrect for the case when revisionNumber==null. Previously I only had a chance to verify this on Oracle and thought that PostgreSQL would behave differently on the .setNull call. However, this is not the case and the delete statement will not be able to remove permissions if revisionNumber==null. Attaching new patch, unified with the latest CommonRDBMSAdapter. Created attachment 15270 [details]
Patch to fix revokePermission for revisionNumber==null
Patch to fix revokePermission for revisionNumber==null. Unified with
CommonRDBMSAdapter rev 1.13. Created against CVS HEAD as of 2nd June 2005 17:00
CET.
applied to both branches. please cross check and close. Logic is now correct (verified with PG v8.0.1), however the statement is never prepared -- probably a messup by me. Attaching a new trivial patch to prepare the statement before setting parameters and executing. Created attachment 15311 [details]
Prepare statement before use
Trivial unified patch to prepare statement before use. Created against CVS HEAD
but should apply to 2.1 branch as well.
Fixed now. Verified with PG 8.0.1 on Windows. |