db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (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 Thu, 19 Apr 2007 00:52:15 GMT

    [ 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"

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
> -----------------------------------------------------------------------------------------------
>                 Key: DERBY-1828
>                 URL: https://issues.apache.org/jira/browse/DERBY-1828
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions:,
>            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.

View raw message