db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r544684 - in /db/derby/code/trunk/java: engine/org/apache/derby/iapi/util/ engine/org/apache/derby/impl/jdbc/ engine/org/apache/derby/loc/ shared/org/apache/derby/shared/common/reference/ testing/org/apache/derbyTesting/functionTests/tests/...
Date Tue, 05 Jun 2007 23:49:11 GMT
Author: djd
Date: Tue Jun  5 16:49:09 2007
New Revision: 544684

URL: http://svn.apache.org/viewvc?view=rev&rev=544684
Log:
DERBY-2735 Make 28502 exception statement level severity so that IDUtil.getUserAuthorizationId()
can be used anywhere a valid authentication identifier is required. Ensure a non-session level
severity
exception during a connection creation failure is handled as a session level severity.
Add testing of invalid authentication identifiers to  SYSCS_GET_USER_ACCESS.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_cs.properties
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_de_DE.properties
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_es.properties
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_fr.properties
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_hu.properties
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_it.properties
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_ja_JP.properties
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_ko_KR.properties
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_pl.properties
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_pt_BR.properties
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_ru.properties
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_zh_CN.properties
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_zh_TW.properties
    db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java Tue Jun  5 16:49:09
2007
@@ -473,16 +473,17 @@
 	/**
 	 * Map userName to authorizationId
 	 * 
-	 * @exception StandardException on error
+	 * @exception StandardException on error or userName is null
 	 */
 	public static String getUserAuthorizationId(String userName) throws StandardException
 	{
 		try {
-			return parseId(userName);
+            if (userName != null)
+			    return parseId(userName);
 		}
 		catch (StandardException se) {
-			throw StandardException.newException(SQLState.AUTH_INVALID_USER_NAME, userName);
 		}
+        throw StandardException.newException(SQLState.AUTH_INVALID_USER_NAME, userName);
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java Tue Jun
 5 16:49:09 2007
@@ -39,6 +39,7 @@
 import org.apache.derby.iapi.jdbc.EngineConnection;
 
 import org.apache.derby.iapi.db.Database;
+import org.apache.derby.iapi.error.ExceptionSeverity;
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.i18n.MessageService;
 import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
@@ -369,6 +370,12 @@
 			throw NO_MEM;
 		}
 		catch (Throwable t) {
+            if (t instanceof StandardException)
+            {
+                StandardException se = (StandardException) t;
+                if (se.getSeverity() < ExceptionSeverity.SESSION_SEVERITY)
+                    se.setSeverity(ExceptionSeverity.SESSION_SEVERITY);
+            }
 			tr.cleanupOnError(t);
 			throw handleException(t);
 		} finally {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml Tue Jun  5 16:49:09
2007
@@ -733,7 +733,7 @@
             <title>Class 28: Invalid Authorization Specification</title>
 
             <msg>
-                <name>28502.C</name>
+                <name>28502</name>
                 <text>The user name '{0}' is not valid. </text>
                 <arg>authorizationID</arg>
             </msg>

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_cs.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_cs.properties?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_cs.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_cs.properties Tue Jun  5
16:49:09 2007
@@ -1165,7 +1165,7 @@
 25502=Zm\u011bna dat SQL nen\u00ed povolena pro p\u0159ipojen\u00ed, u\u017eivatele nebo
datab\u00e1zi pouze pro \u010dten\u00ed.
 25503=DDL nen\u00ed povoleno pro p\u0159ipojen\u00ed, u\u017eivatele nebo datab\u00e1zi pouze
pro \u010dten\u00ed.
 25505=U\u017eivatel pouze pro \u010dten\u00ed nebo u\u017eivatel v datab\u00e1zi pouze pro
\u010dten\u00ed nesm\u00ed zak\u00e1zat re\u017eim pouze pro \u010dten\u00ed p\u0159ipojen\u00ed.
-28502.C=Jm\u00e9no u\u017eivatele ''{0}'' nen\u00ed platn\u00e9. 
+28502=Jm\u00e9no u\u017eivatele ''{0}'' nen\u00ed platn\u00e9. 
 
 
 # Dependency Manager

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_de_DE.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_de_DE.properties?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_de_DE.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_de_DE.properties Tue Jun
 5 16:49:09 2007
@@ -1182,7 +1182,7 @@
 25502=F\u00fcr eine Verbindung, einen Benutzer oder eine Datenbank mit Lesezugriff sind \u00c4nderungen
von SQL-Daten unzul\u00e4ssig.
 25503=F\u00fcr eine Verbindung, einen Benutzer oder eine Datenbank mit Lesezugriff ist die
DDL unzul\u00e4ssig.
 25505=Ein Benutzer mit Lesezugriff oder der Benutzer einer schreibgesch\u00fctzten Datenbank
ist nicht berechtigt, den Schreibschutzmodus f\u00fcr eine Verbindung zu inaktivieren.
-28502.C=Der Benutzername ''{0}'' ist ung\u00fcltig. 
+28502=Der Benutzername ''{0}'' ist ung\u00fcltig. 
 
 
 # Dependency Manager

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_es.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_es.properties?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_es.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_es.properties Tue Jun  5
16:49:09 2007
@@ -1165,7 +1165,7 @@
 25502=No se permite un cambio de datos SQL en una conexi\u00f3n, usuario o base de datos
de s\u00f3lo lectura.
 25503=No se permite DDL en una conexi\u00f3n, usuario o base de datos de s\u00f3lo lectura.
 25505=Un usuario de s\u00f3lo lectura o un usuario de una base de datos de s\u00f3lo lectura
no tiene permitido inhabilitar la modalidad de s\u00f3lo lectura de una conexi\u00f3n.
-28502.C=El nombre de usuario ''{0}'' no es v\u00e1lido. 
+28502=El nombre de usuario ''{0}'' no es v\u00e1lido. 
 
 
 # Dependency Manager

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_fr.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_fr.properties?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_fr.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_fr.properties Tue Jun  5
16:49:09 2007
@@ -1165,7 +1165,7 @@
 25502=Une modification des donn\u00e9es SQL n''est pas autoris\u00e9e pour une connexion,
un utilisateur ou une base de donn\u00e9es en lecture seule.
 25503=Une DDL n''est pas autoris\u00e9e pour une connexion, un utilisateur ou une base de
donn\u00e9es en lecture seule.
 25505=Un utilisateur en lecture seule ou un utilisateur dans une base de donn\u00e9es en
lecture seule n''est pas autoris\u00e9 \u00e0 d\u00e9sactiver le mode lecture seule sur une
connexion.
-28502.C=Le nom d''utilisateur ''{0}'' n''est pas valide. 
+28502=Le nom d''utilisateur ''{0}'' n''est pas valide. 
 
 
 # Dependency Manager

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_hu.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_hu.properties?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_hu.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_hu.properties Tue Jun  5
16:49:09 2007
@@ -1165,7 +1165,7 @@
 25502=Az SQL adatm\u00f3dos\u00edt\u00e1s csak olvashat\u00f3 kapcsolat, felhaszn\u00e1l\u00f3
vagy adatb\u00e1zis eset\u00e9n nem megengedett.
 25503=A DDL csak olvashat\u00f3 kapcsolat, felhaszn\u00e1l\u00f3 vagy adatb\u00e1zis eset\u00e9n
nem megengedett.
 25505=Csak olvashat\u00f3 felhaszn\u00e1l\u00f3 vagy egy csak olvashat\u00f3 adatb\u00e1zis
felhaszn\u00e1l\u00f3ja nem tilthatja le a csak olvashat\u00f3 m\u00f3dot a kapcsolaton.
-28502.C=A(z) ''{0}'' felhaszn\u00e1l\u00f3n\u00e9v \u00e9rv\u00e9nytelen. 
+28502=A(z) ''{0}'' felhaszn\u00e1l\u00f3n\u00e9v \u00e9rv\u00e9nytelen. 
 
 
 # Dependency Manager

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_it.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_it.properties?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_it.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_it.properties Tue Jun  5
16:49:09 2007
@@ -1165,7 +1165,7 @@
 25502=Modifica dati SQL non consentita per una connessione, un utente o un database di sola
lettura.
 25503=DDL non consentito per una connessione, un utente o un database di sola lettura.
 25505=Un utente con autorizzazione di sola lettura, o un utente in un database di sola lettura,
non pu\u00f2 disattivare la modalit\u00e0 di sola lettura su una connessione.
-28502.C=Il nome utente ''{0}'' non \u00e8 valido. 
+28502=Il nome utente ''{0}'' non \u00e8 valido. 
 
 
 # Dependency Manager

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_ja_JP.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_ja_JP.properties?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_ja_JP.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_ja_JP.properties Tue Jun
 5 16:49:09 2007
@@ -1167,7 +1167,7 @@
 25502=\u8aad\u307f\u53d6\u308a\u5c02\u7528\u63a5\u7d9a\u3001\u30e6\u30fc\u30b6\u30fc\u3001\u307e\u305f\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u5bfe\u3059\u308b\u3001SQL
\u30c7\u30fc\u30bf\u5909\u66f4\u306f\u8a31\u53ef\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
 25503=\u8aad\u307f\u53d6\u308a\u5c02\u7528\u63a5\u7d9a\u3001\u30e6\u30fc\u30b6\u30fc\u3001\u307e\u305f\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u5bfe\u3059\u308b
DDL \u306f\u8a31\u53ef\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
 25505=\u8aad\u307f\u53d6\u308a\u5c02\u7528\u30e6\u30fc\u30b6\u30fc\u307e\u305f\u306f\u8aad\u307f\u53d6\u308a\u5c02\u7528\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30e6\u30fc\u30b6\u30fc\u306f\u3001\u63a5\u7d9a\u306b\u5bfe\u3059\u308b\u8aad\u307f\u53d6\u308a\u5c02\u7528\u30e2\u30fc\u30c9\u3092\u4f7f\u7528\u4e0d\u53ef\u306b\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002
-28502.C=\u30e6\u30fc\u30b6\u30fc\u540d ''{0}'' \u306f\u7121\u52b9\u3067\u3059\u3002 
+28502=\u30e6\u30fc\u30b6\u30fc\u540d ''{0}'' \u306f\u7121\u52b9\u3067\u3059\u3002 
 
 
 # Dependency Manager

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_ko_KR.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_ko_KR.properties?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_ko_KR.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_ko_KR.properties Tue Jun
 5 16:49:09 2007
@@ -1176,7 +1176,7 @@
 25502=\uc77d\uae30 \uc804\uc6a9 \uc5f0\uacb0, \uc0ac\uc6a9\uc790 \ub610\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0
\ub300\ud55c SQL \ub370\uc774\ud130 \ubcc0\uacbd\uc774 \ud5c8\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
 25503=DDL\uc740 \uc77d\uae30 \uc804\uc6a9 \uc5f0\uacb0, \uc0ac\uc6a9\uc790 \ub610\ub294 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0
\ub300\ud574 \ud5c8\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
 25505=\uc77d\uae30 \uc804\uc6a9 \uc0ac\uc6a9\uc790 \ub610\ub294 \uc77d\uae30 \uc804\uc6a9
\ub370\uc774\ud130\ubca0\uc774\uc2a4\uc758 \uc0ac\uc6a9\uc790\ub294 \uc5f0\uacb0\uc5d0\uc11c
\uc77d\uae30 \uc804\uc6a9 \ubaa8\ub4dc\ub97c \uc0ac\uc6a9 \ubd88\uac00\ub2a5\ud558\uac8c \ud560
\uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
-28502.C=''{0}'' \uc0ac\uc6a9\uc790 \uc774\ub984\uc774 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.

+28502=''{0}'' \uc0ac\uc6a9\uc790 \uc774\ub984\uc774 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.

 
 
 # Dependency Manager

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_pl.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_pl.properties?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_pl.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_pl.properties Tue Jun  5
16:49:09 2007
@@ -1165,7 +1165,7 @@
 25502=Zmiana danych SQL nie jest dozwolona dla po\u0142\u0105cze\u0144, u\u017cytkownika
lub bazy danych tylko do odczytu.
 25503=Instrukcje DDL nie s\u0105 dozwolone dla po\u0142\u0105cze\u0144, u\u017cytkownika
lub bazy danych tylko do odczytu.
 25505=U\u017cytkownik tylko do odczytu lub u\u017cytkownik w bazie danych tylko do odczytu
nie ma uprawnie\u0144 do wy\u0142\u0105czenia trybu tylko do odczytu dla po\u0142\u0105czenia.
-28502.C=Nazwa u\u017cytkownika ''{0}'' nie jest poprawna. 
+28502=Nazwa u\u017cytkownika ''{0}'' nie jest poprawna. 
 
 
 # Dependency Manager

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_pt_BR.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_pt_BR.properties?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_pt_BR.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_pt_BR.properties Tue Jun
 5 16:49:09 2007
@@ -1161,7 +1161,7 @@
 25502=N\u00e3o \u00e9 permitida altera\u00e7\u00e3o nos dados SQL em conex\u00f5es, usu\u00e1rios
e bancos de dados apenas-de-leitura.
 25503=N\u00e3o \u00e9 permitida a DDL em conex\u00f5es, usu\u00e1rios e bancos de dados apenas-de-leitura.
 25505=Um usu\u00e1rio apenas-de-leitura, ou um usu\u00e1rio em um banco de dados apenas-de-leitura,
n\u00e3o pode desativar o modo apenas-de-leitura da conex\u00e3o.
-28502.C=O nome de usu\u00e1rio ''{0}'' n\u00e3o \u00e9 v\u00e1lido.
+28502=O nome de usu\u00e1rio ''{0}'' n\u00e3o \u00e9 v\u00e1lido.
 
 # Dependency Manager
 XD003.S=N\u00e3o foi poss\u00edvel restaurar a depend\u00eancia do disco. DependableFinder
= ''{0}''. Informa\u00e7\u00f5es adicionais: ''{1}''.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_ru.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_ru.properties?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_ru.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_ru.properties Tue Jun  5
16:49:09 2007
@@ -1165,7 +1165,7 @@
 25502=\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445
SQL \u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f
\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f
\u0438\u043b\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u043b\u044c\u043a\u043e-\u0434\u043b\u044f-\u0447\u0442\u0435\u043d\u0438\u044f.
 25503=DDL \u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f
\u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f
\u0438\u043b\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u043b\u044c\u043a\u043e-\u0434\u043b\u044f-\u0447\u0442\u0435\u043d\u0438\u044f.
 25505=\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0442\u043e\u043b\u044c\u043a\u043e-\u0434\u043b\u044f-\u0447\u0442\u0435\u043d\u0438\u044f
\u0438\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e
\u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u043b\u044c\u043a\u043e-\u0434\u043b\u044f-\u0447\u0442\u0435\u043d\u0438\u044f
\u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c
\u0440\u0435\u0436\u0438\u043c  \u0442\u043e\u043b\u044c\u043a\u043e-\u0434\u043b\u044f-\u0447\u0442\u0435\u043d\u0438\u044f
\u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f.
-28502.C=\u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f
''{0}'' \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c.

+28502=\u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f
''{0}'' \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c.

 
 
 # Dependency Manager

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_zh_CN.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_zh_CN.properties?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_zh_CN.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_zh_CN.properties Tue Jun
 5 16:49:09 2007
@@ -1223,7 +1223,7 @@
 25502=\u5bf9\u4e8e\u53ea\u8bfb\u8fde\u63a5\u3001\u7528\u6237\u6216\u6570\u636e\u5e93\uff0c\u4e0d\u5141\u8bb8\u4f7f\u7528
SQL \u6570\u636e\u66f4\u6539\u3002
 25503=\u5bf9\u4e8e\u53ea\u8bfb\u8fde\u63a5\u3001\u7528\u6237\u6216\u6570\u636e\u5e93\uff0c\u4e0d\u5141\u8bb8\u4f7f\u7528
DDL\u3002
 25505=\u53ea\u8bfb\u7528\u6237\u6216\u53ea\u8bfb\u6570\u636e\u5e93\u4e2d\u7684\u7528\u6237\u4e0d\u5141\u8bb8\u7981\u7528\u8fde\u63a5\u4e0a\u7684\u53ea\u8bfb\u65b9\u5f0f\u3002
-28502.C=\u7528\u6237\u540d\u201c{0}\u201d\u65e0\u6548\u3002
+28502=\u7528\u6237\u540d\u201c{0}\u201d\u65e0\u6548\u3002
 
 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_zh_TW.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_zh_TW.properties?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_zh_TW.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_zh_TW.properties Tue Jun
 5 16:49:09 2007
@@ -1183,7 +1183,7 @@
 25502=\u552f\u8b80\u9023\u7dda\u3001\u4f7f\u7528\u8005\u6216\u8cc7\u6599\u5eab\u4e0d\u5141\u8a31\u57f7\u884c
SQL \u8cc7\u6599\u8b8a\u66f4\u3002
 25503=\u552f\u8b80\u9023\u7dda\u3001\u4f7f\u7528\u8005\u6216\u8cc7\u6599\u5eab\u4e0d\u5141\u8a31\u57f7\u884c
DDL\u3002
 25505=\u4e0d\u5141\u8a31\u552f\u8b80\u4f7f\u7528\u8005\u6216\u5728\u552f\u8b80\u8cc7\u6599\u5eab\u4e2d\u7684\u4f7f\u7528\u8005\u505c\u7528\u9023\u7dda\u7684\u552f\u8b80\u6a21\u5f0f\u3002
-28502.C=\u4f7f\u7528\u8005\u540d\u7a31 ''{0}'' \u7121\u6548\u3002
+28502=\u4f7f\u7528\u8005\u540d\u7a31 ''{0}'' \u7121\u6548\u3002
 
 
 # Dependency Manager

Modified: db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
(original)
+++ db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
Tue Jun  5 16:49:09 2007
@@ -1391,7 +1391,7 @@
 	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_USER_NAME                                      = "28502.C";
+	String AUTH_INVALID_USER_NAME                                      = "28502";
 
 	/*
 	** Dependency manager

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java
Tue Jun  5 16:49:09 2007
@@ -71,11 +71,8 @@
     public static Test suite() {
         TestSuite suite = new TestSuite("AuthenticationTest");
         suite.addTest(baseSuite("AuthenticationTest:embedded"));
-        if (!JDBC.vmSupportsJSR169())
-        {
-            suite.addTest(TestConfiguration.clientServerDecorator(
+        suite.addTest(TestConfiguration.clientServerDecorator(
                 baseSuite("AuthenticationTest:client")));
-        }
         return suite;
     }
     
@@ -620,6 +617,16 @@
         
         csSetAccess.setString(1, "dan");
         csSetAccess.setString(2, "FULLACCESS");
+        csSetAccess.execute();
+
+        // Invalid users
+        csSetAccess.setString(1, null);
+        csSetAccess.setString(2, "FULLACCESS");
+        assertStatementError("28502", csSetAccess);
+        
+        csSetAccess.setString(1, "123"); // not an identifier.
+        csSetAccess.setString(2, "FULLACCESS");
+        assertStatementError("28502", csSetAccess);
 
         // Random user will now have only READONLYACCESS
         setDatabaseProperty(
@@ -644,6 +651,8 @@
         psGetAccess.setString(1, "TONYBLAIR");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "FULLACCESS");
         conn1.commit();
+        
+        conn1.close();
            
     }
     

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java?view=diff&rev=544684&r1=544683&r2=544684
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
Tue Jun  5 16:49:09 2007
@@ -59,8 +59,7 @@
     {
         ResultSet rs = null;
         
-        Connection conn = getConnection();        
-        Statement s = conn.createStatement();
+        Statement s = createStatement();
         
         s.executeUpdate(
             "create table t(i int, s smallint)");
@@ -126,7 +125,6 @@
              {"08006","An error occurred during connect reset and the connection has been
terminated.  See chained exceptions for details.","40000"},
              {"08006","Database '{0}' shutdown.","45000"},
              {"0A000","The DRDA command {0} is not currently implemented.  The connection
has been terminated.","40000"},
-             {"28502","The user name '{0}' is not valid.","40000"},
              {"57017","There is no available conversion for the source code page, {0}, to
the target code page, {1}.  The connection has been terminated.","40000"},
              {"58009","Network protocol exception: only one of the VCM, VCS length can be
greater than 0.  The connection has been terminated.","40000"},
              {"58009","The connection was terminated because the encoding is not supported.","40000"},
@@ -242,7 +240,7 @@
              {"XXXXX","Normal database session close.","40000"}};
 
         JDBC.assertUnorderedResultSet(rs, expectedRows);
-        conn.rollback();
+        rollback();
         s.close();
     }
 }



Mime
View raw message