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 "Daniel John Debrunner (JIRA)" <de...@db.apache.org> on 2006/09/07 23:01:22 UTC

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

Access rule violations should use a SQL state starting with '42' according to the SQL standard.
-----------------------------------------------------------------------------------------------

                 Key: DERBY-1828
                 URL: http://issues.apache.org/jira/browse/DERBY-1828
             Project: Derby
          Issue Type: Bug
          Components: JDBC
    Affects Versions: 10.2.1.0, 10.3.0.0
            Reporter: Daniel John Debrunner


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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by Myrna van Lunteren <m....@gmail.com>.
On 5/9/07, Jørgen Løland (JIRA) <ji...@apache.org> wrote:
>
>     [ 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: releaseNote.html
>
> I am uncertain about this release note, so it would be really great if someone reviewed it.

Hi Jørgen,

I think the Release Note looks good to me, thx!

I glanced over the actual patch and have a comment, though...
I see you have not modified any of the translated messages.
It looks like a tremendous amount of work, but either the same thing
as happens for English should happen for all other translated
messages, or the affected messages in the other languages should be
removed altogether...

Myrna

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

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494647 ] 

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

Thank you for reviewing the patch, Myrna. 

I'll make a subtask and start working on this straight away.

> 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
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1828-1.diff, DERBY-1828-1.stat, DERBY-1828-2.diff, DERBY-1828-2.stat, DERBY-1828-2indent.diff, releaseNote.html
>
>
> 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.


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

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Derby Info: [Patch Available]

The patch (1) partially solves the issue. More error codes with state '28' will most likely have to be moved.

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


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

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493016 ] 

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

Thank you for the comment, Dan. I see your point regarding 28502, and hence leave it where it is. I will continue with this patch as described, but give the community some days to respond to whether or not it can be included in this release. 


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


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

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen resolved DERBY-1828.
---------------------------------------

    Resolution: Fixed
    Derby Info: [Release Note Needed]  (was: [Release Note Needed, Patch Available])

Committed revision 537850.

> 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
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1828-1.diff, DERBY-1828-1.stat, DERBY-1828-2.diff, DERBY-1828-2.stat, DERBY-1828-2indent.diff, releaseNote.html
>
>
> 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.


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

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492683 ] 

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

I have two questions regarding this issue:

Q1) I need your opinion on whether or not this issue can be fixed before the next major release. I.e., may new error codes cause problems for existing applications?

Q2) Second, what would be the correct SQL states for the messages currently found under the "28" header in SQLState? My suggestions are:


***
Current in SQLState: AUTH_DATABASE_CONNECTION_REFUSED = "04501.C";

messages.properties reveals this:
-----8<------
04501.C=Database connection refused.
...
08004=Connection refused : {0}
08004.C.1=Connection authentication failure occurred.  Reason: {0}.
08004.C.2=The connection was refused because the database {0} was not found.
----->8------

Hence, it seems clear that 04501 is a variant of 08004, and should move accordingly. 08004 is "SQL-server rejected establishment of SQL-connection" according to SQL2003/SQL1999, which sounds reasonable.

***
Currently in SQLState:
AUTH_INVALID_USER_NAME                                      = "28502.C";
The message for this is "The user name '{0}' is not valid." Another case of 08004? 

***
Current in SQLStates:
-----8<------
AUTH_INVALID_AUTHORIZATION_PROPERTY                         = "28501";
AUTH_USER_IN_READ_AND_WRITE_LISTS                           = "28503";
AUTH_DUPLICATE_USERS                                        = "28504";
AUTH_INTERNAL_BAD_UUID                                      = "28505";
----->8------ 
State 42? 


***
Current in SQLStates:
-----8<------
AUTH_NO_PERMISSION                                          = "28506";
AUTH_NO_PERMISSION_FOR_GRANT                                = "28507";
AUTH_NO_COLUMN_PERMISSION                                   = "28508";
AUTH_NO_COLUMN_PERMISSION_FOR_GRANT                         = "28509";
AUTH_NOT_OWNER                                              = "2850C";
AUTH_NO_ACCESS_NOT_OWNER                                    = "2850D";
AUTH_NOT_DATABASE_OWNER                                     = "2850E";
AUTH_GRANT_REVOKE_NOT_ALLOWED                               = "2850F";
----->8------ 
As already pointed out in this issue, these should move to '42' - syntax error or *access rule violation*. This is what patch (1) does.

***
Current in SQLStates:
-----8<------
AUTH_SHUTDOWN_NOT_DB_OWNER                                  = "2850H.C";
AUTH_ENCRYPT_NOT_DB_OWNER                                   = "2850I.C";
AUTH_HARD_UPGRADE_NOT_DB_OWNER                              = "2850J.C";
----->8------ 
May be either state '08' or '42'. They are violations of access rules (thrown when non-db owner tries to shutdown/encrypt/... the db), and therefore fit into state 42. However, the commands are requested through connect, and therefore also fit into 08 CONNECTION EXCEPTION. Since they are thrown at connect, I would suggest 08.

In addition there are some '25' error codes, but these are not discussed for now.

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


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

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jørgen Løland closed DERBY-1828.
--------------------------------


Closing issue as it has been tagged as fixed since May 2007

> 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.1.4
>            Reporter: Daniel John Debrunner
>            Assignee: Jørgen Løland
>             Fix For: 10.3.1.4
>
>         Attachments: DERBY-1828-1.diff, DERBY-1828-1.stat, DERBY-1828-2.diff, DERBY-1828-2.stat, DERBY-1828-2indent.diff, releaseNote.html
>
>
> 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.


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

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ 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-2.stat
                DERBY-1828-2.diff

Patch (2) supersedes (1). The patch moves all 2850x error codes except 28502 to 4250x or 08004 (if the exception is thrown during connect). 04501 is also moved to 08004. A whole lot of tests have been modified to expect the new codes.

The patch passes allsuites, but fails bootLock in derbyall (which is normal here. Will have to fix it...).

Myrna (in "opinions please on possible existing app impact of DERBY-1828"): 
> Hi,

> In DERBY-1828, Jørgen proposes to adjust some SQLStates in the
> authorization area.
> I'd like the community's input on the release-related question:

> Jørgen asks:
> "Q1) I need your opinion on whether or not this issue can be fixed
> before the next major release. I.e., may new error codes cause
> problems for existing applications?"

Thanks for addressing this, Myrna. If there are no objections before Wed May 9, 2:00 PM CET, I will mark "Patch available" for patch (2).

> 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, DERBY-1828-2.diff, DERBY-1828-2.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.


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

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ 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.


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

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Assignee: Jørgen Løland

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


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

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494967 ] 

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

Reviewer/committer: Consider reviewing the patch (DERBY-1828-and-2633-1) in DERBY-2633 instead of this one. It contains patch 2indent and the patch for the subtask.

> 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
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1828-1.diff, DERBY-1828-1.stat, DERBY-1828-2.diff, DERBY-1828-2.stat, DERBY-1828-2indent.diff, releaseNote.html
>
>
> 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.


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

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Derby Info:   (was: [Patch Available])

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


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

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ 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-2indent.diff

The patch (2indent) fixes indentation issues; the stat file is unchanged.

> 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, DERBY-1828-2.diff, DERBY-1828-2.stat, DERBY-1828-2indent.diff
>
>
> 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.


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

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494527 ] 

Myrna van Lunteren commented on DERBY-1828:
-------------------------------------------

Forgot to say: modifying the translated message files can be done as a follow-up patch or subtask.


> 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
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1828-1.diff, DERBY-1828-1.stat, DERBY-1828-2.diff, DERBY-1828-2.stat, DERBY-1828-2indent.diff, releaseNote.html
>
>
> 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.


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

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
    [ 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.


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

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-1828:
----------------------------------

    Derby Info: [Existing Application Impact, Release Note Needed]  (was: [Release Note Needed])

> 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
>            Assignee: Jørgen Løland
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1828-1.diff, DERBY-1828-1.stat, DERBY-1828-2.diff, DERBY-1828-2.stat, DERBY-1828-2indent.diff, releaseNote.html
>
>
> 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.


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

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495619 ] 

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

Knut,
Thanks for committing 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
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1828-1.diff, DERBY-1828-1.stat, DERBY-1828-2.diff, DERBY-1828-2.stat, DERBY-1828-2indent.diff, releaseNote.html
>
>
> 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.


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

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ 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: releaseNote.html

I am uncertain about this release note, so it would be really great if someone reviewed it.

Release note attempt:
---------------------------------------
Summary of Change
Most authorization failures have new error codes.

Symptoms Seen by Applications Affected by Change
In the previous release, authorization failures had error codes 2850x and 04501. In this release, most of these errors have new error codes. The code changes are: 04501, 2850H, 2850I and 2850J are now 08004. 28506-2850G are now 42500-4250A, 28501 is now 4250B, 28503-28505 are now 4250C-4250E. Only the error codes have been changed; error messages are not affected.

Incompatibilities with Previous Release
Applications that rely on authorization error codes may fail.

Rationale for Change
The old error codes violated the SQL standard. The new error codes are correct.

Application Changes Required
Applications that rely on authorization error codes must be recoded to expect the new codes. 


> 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
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1828-1.diff, DERBY-1828-1.stat, DERBY-1828-2.diff, DERBY-1828-2.stat, DERBY-1828-2indent.diff, releaseNote.html
>
>
> 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.


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

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492687 ] 

Daniel John Debrunner commented on DERBY-1828:
----------------------------------------------

Just on this one:

> Currently in SQLState:
> AUTH_INVALID_USER_NAME                                      = "28502.C";
> The message for this is "The user name '{0}' is not valid." Another case of 08004? 

I think this remains as 28xxx, it's for the format of the user identifier being invalid, not that the user is not a valid user in the set of authenticated users.

For an authentication failure Derby reports just that authentication failed. Systems should not report what specifically failed in an authentication
check, e.g. password is incorrect or user not known by the system. That provides more information for someone trying to break into the system.

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


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

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489912 ] 

Dag H. Wanvik commented on DERBY-1828:
--------------------------------------

The class "28" seems correct for failure to establish a connection
when checking credentials, cf. its usage in section 17.1 Connect
statement (SQL 2003). Since 2850H, 2850I and 2850J are thrown when
checking powers when connecting (albeit in a special mode), I think
they are correct to use the 28 class.

I notice that in the plain connect case of connect failure due to
credentials check, class "08" is used (LOGIN_FAILED "08004"). It seems
to me this should be a "28" class error as well; I read the "08" class
"connection exception" as being for other failures related to a
connection (JDBC NonTransientConnectionException or
SQLTransientConnectionException).  The failed login due to credentials
checking seems to belong in the "JDBC N/A SQLInvalidAuthorizationException"
 subclass.

Why "04" is used for AUTH_DATABASE_CONNECTION_REFUSED, I can't figure
out. Maybe someone can shed light on this. This also seems to be a 28
class error to me.

Changing 08004 seems risky though, it would break many existing apps...

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


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

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490130 ] 

Daniel John Debrunner commented on DERBY-1828:
----------------------------------------------

Dag:

> The class "28" seems correct for failure to establish a connection
> when checking credentials, cf. its usage in section 17.1 Connect
> statement (SQL 2003). 

Why?

The only use for class 28 is for "invalid authorization specification", all the uses of it in the SQL specification are for the case when the *format* of the user identifier is invalid, not for when the authorization fails.

I did raise this issue to the expert group for JDBC 4, I never understood why class 28 was special cased in the spec.



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


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

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494526 ] 

Myrna van Lunteren commented on DERBY-1828:
-------------------------------------------


Hi Jørgen,

I think the Release Note looks good to me, thx!

I glanced over the actual patch and have a comment, though...
I see you have not modified any of the translated messages.
It looks like a tremendous amount of work, but either the same thing
as happens for English should happen for all other translated
messages, or the affected messages in the other languages should be
removed altogether...

Myrna


> 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
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1828-1.diff, DERBY-1828-1.stat, DERBY-1828-2.diff, DERBY-1828-2.stat, DERBY-1828-2indent.diff, releaseNote.html
>
>
> 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.


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

Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Matrigali updated DERBY-1828:
----------------------------------


It looks like the following checkin is causing DERBY-2647:
r537850 | kahatlen | 2007-05-14 07:09:51 -0700 (Mon, 14 May 2007) | 7 lines

DERBY-1828: Access rule violations should use a SQL state starting
with '42' according to the SQL standard.
DERBY-2633: Authorization error codes have been moved. Translated
messages must be moved accordingly.

Patch contributed by J_rgen L_land.

> 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
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1828-1.diff, DERBY-1828-1.stat, DERBY-1828-2.diff, DERBY-1828-2.stat, DERBY-1828-2indent.diff, releaseNote.html
>
>
> 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.


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

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490215 ] 

Dag H. Wanvik commented on DERBY-1828:
--------------------------------------

Right, I think this paragraph of section 17.1 threw me off:
:
> 5) If the value of <connection user name>does not conform to the 
>     implementation-defined restrictions, then an exception condition is 
>    raised:invalid authorization specification .

but this paragraph is more relevant to credentials failure:

> 11) If the SQL-server rejects the establishment of the SQL-connection,then 
>       an exception condition is raised: connection exception  SQL-server 
>       rejected establishment of SQL-connection .

so "connection exception"  (08) is correct. Sorry for the confusion.

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


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

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

       Derby Info: [Patch Available, Release Note Needed]
    Fix Version/s: 10.3.0.0

> 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
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1828-1.diff, DERBY-1828-1.stat, DERBY-1828-2.diff, DERBY-1828-2.stat, DERBY-1828-2indent.diff
>
>
> 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.