db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julius Stroffek (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1434) Client can send incorrect database name to server after having made multiple connections to different databases.
Date Wed, 11 Oct 2006 13:30:11 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1434?page=comments#action_12441455 ] 
            
Julius Stroffek commented on DERBY-1434:
----------------------------------------

Sumarization of behaviour:

1.) For each connection to a database a Session object is created on a server. It is processed
by a separate DRDAConnThread instance thread.

2.) The database is assigned to DRDAConnThread object from the RDBNAM codepoint from terms
ACCRDB, ACCSEC or SECCHK, which works correctly.

3.) The Section Number in PKGNAMCSN code point is sent always correctly. This causes no problem
with processing terms like CNTQRY or CLSQRY. The corresponding DRDAStatement object is found
by looking for the whole PKGNAMCSN content. Because the wrong PKGNAMCSN is sent all the time
and processed by the same instance of DRDAConnThread - it works also fine. The corresponding
statements are managed locally by DRDAConnThread instance and the right statement is identified
by the section number which is sent correctly.

3.) In case of these terms PRPSQLSTT, EXCSQLIMM, OPNQRY, CNTQRY, CLSQRY, PRPSQLSTT, DSCSQLSTT,
EXCSQLSTT, the codepoint PKGNAMCSN is optional in DRDA DDM but is mandatory for Derby's implementation.
Instead of sending PKGNAMCSN the PKGSN code point is sufficient. This might increase a performance
a bit. Derby has also some optimalizations parsing the pkgnamcsn assuming that PKGNAMCSN is
the same most of the time (I cannot see any case when it should differ).

Small note:
Code point PKGNAMCSN is optional in EXCSQLSET (even not described by DRDA DDM, but sent only
by jcc1.2 driver), but according the comments in parseEXCSQLSET it is also required (changing
the comment is sufficient).

> Client can send incorrect database name to server after having made multiple connections
to different databases.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1434
>                 URL: http://issues.apache.org/jira/browse/DERBY-1434
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.1.3.1
>            Reporter: A B
>         Assigned To: Julius Stroffek
>             Fix For: 10.2.2.0
>
>         Attachments: _driver_1, d1434.java, d1434_v2.java, Server2.trace
>
>
> I have a simple program that connects to a database using the Derby Client, executes
a simple query, then connects to a different database using a different Connection object
and executes another simple query on that second connection.  The queries both execute without
error, so it appears that the connections are correct--i.e. each query will only work on one
of the databases, and both queries work, therefore each must be getting executed against the
correct database.
> But in looking at the client and server traces, I noticed that for the query on the second
database, the client is actually sending the name of the *first* database as RDBNAM, which
(I think?) is wrong--it should be sending the name of the second database, since the query
is being executed on the second Connection object.
> This behavior does not appear to occur for JCC.

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

        

Mime
View raw message