You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Jørgen Løland (JIRA)" <ji...@apache.org> on 2007/04/30 12:49:15 UTC

[jira] Updated: (DERBY-1828) Access rule violations should use a SQL state starting with '42' according to the SQL standard.

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

Jørgen Løland updated DERBY-1828:
---------------------------------

    Attachment: DERBY-1828-1.stat
                DERBY-1828-1.diff

I have written a patch that moves 

AUTH_NO_TABLE_PERMISSION = "28506";
AUTH_NO_TABLE_PERMISSION_FOR_GRANT = "28507";
AUTH_NO_COLUMN_PERMISSION = "28508";
AUTH_NO_COLUMN_PERMISSION_FOR_GRANT = "28509";
AUTH_NO_EXECUTE_PERMISSION = "2850A";
AUTH_NO_EXECUTE_PERMISSION_FOR_GRANT = "2850B";
AUTH_NOT_OWNER = "2850C";
AUTH_NO_ACCESS_NOT_OWNER = "2850D";
AUTH_NOT_DATABASE_OWNER = "2850E";
AUTH_GRANT_REVOKE_NOT_ALLOWED = "2850F";
AUTH_NO_OBJECT_PERMISSION = "2850G"; 

to the 4250x range. This includes modifying a great deal of test cases. The patch runs fine with allsuites, but fails one derbyall test: 

derbyall/storeall/storeall.fail:store/bootLock.java

********* Diff file derbyall/storeall/storemore/bootLock.diff
*** Start: bootLock jdk1.5.0_06 storeall:storemore 2007-04-30 09:26:29 ***
2,4d1
< expected exception
< SQLSTATE(XJ040):
< SQLSTATE(XSDB6):
Test Failed.
*** End:   bootLock jdk1.5.0_06 storeall:storemore 2007-04-30 09:27:07 ***

This test fails "randomly" here (on solaris 10, NFS, jdk 1.5) even on clean sandboxes, and I am pretty sure it is not related to the patch. 

> Access rule violations should use a SQL state starting with '42' according to the SQL standard.
> -----------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1828
>                 URL: https://issues.apache.org/jira/browse/DERBY-1828
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.2.1.6, 10.3.0.0
>            Reporter: Daniel John Debrunner
>         Assigned To: Jørgen Løland
>         Attachments: DERBY-1828-1.diff, DERBY-1828-1.stat
>
>
> The SQL standard says that SQL State '42' is for "syntax error or access
> rule violation" (section 23.1).
> There is a question of what JDBC 4.0 exception should be thrown for a access rule violation,
> JDBC 4.0 maps '42' to SQLSyntaxErrorException which seems wrong for an access rule.
> Message thread:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200609.mbox/%3c45004A04.5080002@apache.org%3e

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