db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jørgen Løland (JIRA) <j...@apache.org>
Subject [jira] Commented: (DERBY-1828) Access rule violations should use a SQL state starting with '42' according to the SQL standard.
Date Wed, 18 Apr 2007 12:22:15 GMT

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

Jørgen Løland commented on DERBY-1828:
--------------------------------------

See previous discussion: http://mail-archives.apache.org/mod_mbox/db-derby-dev/200609.mbox/%3c45004A04.5080002@apache.org%3e

There seems to be an agreement that access rule violations should have state '42', and that
SQLSyntaxErrorException is the correct exception for these. Hence, I'll move the following
errors to range 4250x (see SQLStates):

String AUTH_NO_TABLE_PERMISSION                                    = "28506";
String AUTH_NO_TABLE_PERMISSION_FOR_GRANT                          = "28507";
String AUTH_NO_COLUMN_PERMISSION                                   = "28508";
String AUTH_NO_COLUMN_PERMISSION_FOR_GRANT                         = "28509";
String AUTH_NO_EXECUTE_PERMISSION                                  = "2850A";
String AUTH_NO_EXECUTE_PERMISSION_FOR_GRANT                        = "2850B";
String AUTH_NOT_OWNER                                              = "2850C";
String AUTH_NO_ACCESS_NOT_OWNER                                    = "2850D";
String AUTH_NOT_DATABASE_OWNER                                     = "2850E";
String AUTH_GRANT_REVOKE_NOT_ALLOWED                               = "2850F";
String AUTH_NO_OBJECT_PERMISSION                                   = "2850G";
String AUTH_SHUTDOWN_NOT_DB_OWNER                                  = "2850H.C";
String AUTH_ENCRYPT_NOT_DB_OWNER                                   = "2850I.C";
String AUTH_HARD_UPGRADE_NOT_DB_OWNER                              = "2850J.C";

I am not sure if the following errors should be moved, and will not move them unless I'm told
otherwise.

String AUTH_DATABASE_CONNECTION_REFUSED                            = "04501.C";
String AUTH_SET_CONNECTION_READ_ONLY_IN_ACTIVE_XACT                = "25501";
String AUTH_WRITE_WITH_READ_ONLY_CONNECTION                        = "25502";
String AUTH_DDL_WITH_READ_ONLY_CONNECTION                          = "25503";
String AUTH_CANNOT_SET_READ_WRITE                                  = "25505";
String AUTH_INVALID_AUTHORIZATION_PROPERTY                         = "28501";
String AUTH_INVALID_USER_NAME                                      = "28502.C";
String AUTH_USER_IN_READ_AND_WRITE_LISTS                           = "28503";
String AUTH_DUPLICATE_USERS                                        = "28504";
String AUTH_INTERNAL_BAD_UUID                                      = "28505";


> 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
>
> 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.


Mime
View raw message