Обсуждение: Startup message issues

Поиск
Список
Период
Сортировка

Startup message issues

От
"Chris Smith"
Дата:
Hope you don't mind the sudden questions.

I'm working through the JDBC driver code.  The connection code really confuses
me.  It seems like if we're speaking the V3 protocol successfully, we ought to
be able to assume that the server is at least 7.4.  That would seem to remove
a lot of the complexity of the open-connection code for v3 - namely, the
client encoding stuff that contains backward-compatibility code all the way
back to 7.1, and the 'show autocommit' that seems to have been an issue only
for 7.3.  Assuming 7.4, I think we could jsut assume autocommit and set the
client encoding to UNICODE in the startup message, and be done with it.
Right?

(Note: I don't actually know anything about the actual defaults and concerns
here.  I'm getting my information from other code in the driver that makes
these same assumptions that I'm proposing to make here.  If one of these
assumptions is wrong, then it's the other code that needs to be fixed.)

Comments?

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation


Re: Startup message issues

От
Kris Jurka
Дата:

On Fri, 13 Feb 2004, Chris Smith wrote:

> Hope you don't mind the sudden questions.
>
> I'm working through the JDBC driver code.  The connection code really confuses
> me.  It seems like if we're speaking the V3 protocol successfully, we ought to
> be able to assume that the server is at least 7.4.  That would seem to remove
> a lot of the complexity of the open-connection code for v3 - namely, the
> client encoding stuff that contains backward-compatibility code all the way
> back to 7.1, and the 'show autocommit' that seems to have been an issue only
> for 7.3.  Assuming 7.4, I think we could jsut assume autocommit and set the
> client encoding to UNICODE in the startup message, and be done with it.
> Right?

This would be a good thing to do.  I believe the V3 protocol was put in
with the goal of getting it working which meant a copy, paste, and minimal
edit.  So yes V3 implies 7.4 and it would be nice if it took full
advantage of what is offered.

Kris Jurka



Re: Startup message issues

От
Dave Cramer
Дата:
Chris,

that is true, at least the first bit. If we successfully connect with V3
then we are talking to at least a 7.4 backend, however the driver does
need to be able to talk to a 7.3 backend, so some of the compatibility
stuff needs to stay.


Dave
On Fri, 2004-02-13 at 12:46, Chris Smith wrote:
> Hope you don't mind the sudden questions.
>
> I'm working through the JDBC driver code.  The connection code really confuses
> me.  It seems like if we're speaking the V3 protocol successfully, we ought to
> be able to assume that the server is at least 7.4.  That would seem to remove
> a lot of the complexity of the open-connection code for v3 - namely, the
> client encoding stuff that contains backward-compatibility code all the way
> back to 7.1, and the 'show autocommit' that seems to have been an issue only
> for 7.3.  Assuming 7.4, I think we could jsut assume autocommit and set the
> client encoding to UNICODE in the startup message, and be done with it.
> Right?
>
> (Note: I don't actually know anything about the actual defaults and concerns
> here.  I'm getting my information from other code in the driver that makes
> these same assumptions that I'm proposing to make here.  If one of these
> assumptions is wrong, then it's the other code that needs to be fixed.)
>
> Comments?
>
> --
> www.designacourse.com
> The Easiest Way to Train Anyone... Anywhere.
>
> Chris Smith - Lead Software Developer/Technical Trainer
> MindIQ Corporation
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
--
Dave Cramer
519 939 0336
ICQ # 14675561


Re: Startup message issues

От
Barry Lind
Дата:
Chris,

I will be the first to admit that the V3 protocol support is a hack (one
that I did :-( )  The intention was to get something quickly working (so
most of the code is just duplicated from the V2 code and then modified)
and then to go back later and refactor and cleanup.  Well that didn't
happen.  So I am really glad you are taking a stab at cleaning this up.

Specifically to your email, there is no reason that I can remember that
your assumptions are not valid.

thanks,
--Barry


Chris Smith wrote:
> Hope you don't mind the sudden questions.
>
> I'm working through the JDBC driver code.  The connection code really confuses
> me.  It seems like if we're speaking the V3 protocol successfully, we ought to
> be able to assume that the server is at least 7.4.  That would seem to remove
> a lot of the complexity of the open-connection code for v3 - namely, the
> client encoding stuff that contains backward-compatibility code all the way
> back to 7.1, and the 'show autocommit' that seems to have been an issue only
> for 7.3.  Assuming 7.4, I think we could jsut assume autocommit and set the
> client encoding to UNICODE in the startup message, and be done with it.
> Right?
>
> (Note: I don't actually know anything about the actual defaults and concerns
> here.  I'm getting my information from other code in the driver that makes
> these same assumptions that I'm proposing to make here.  If one of these
> assumptions is wrong, then it's the other code that needs to be fixed.)
>
> Comments?
>
> --
> www.designacourse.com
> The Easiest Way to Train Anyone... Anywhere.
>
> Chris Smith - Lead Software Developer/Technical Trainer
> MindIQ Corporation
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster