Hi,

that's what I tried to explain, maybe not very clearly:

MySQL uses a binary protocol, not text based, probably for speed.
That protocol is AFAIK not documented anywhere, but you can see it in
the source code for MySQL C library (messy), or the source code for
the Java JDBC "driver" (cleaner and simpler).

The mentioned C library can choose faster Unix domain sockets if the
client is on the same machine as the server, or slower TCP sockets if
it's on different; Java JDBC driver always uses TCP sockets.

So I wasn't suggesting using MySQL JDBC or ODBC driver, but writing
REBOL only "driver" that communicates with TCP, with knowledge about
the protocol gained from that Java source code.

Hope it's clearer now...

-- 
S pozdravem
Michal Kracik

[EMAIL PROTECTED] wrote:
> 
> [EMAIL PROTECTED] wrote:
> 
> > Hi,
> >
> > I looked at MySQL a bit. All languages except Java connect to MySQL
> > with a C library. Java (as well as REBOL) can't do this in a portable
> > way, so there's a JDBC driver written in Java which connects with a TCP
> > socket (and a binary protocol). It's available with source (LGPL
> > licensed) at http://www.worldserver.com/mm.mysql/
> >
> > The code that's required to connect and issue a SQL command is quite
> > small and I think it should not be too hard to rewrite in REBOL.
> > Bigger problem is interpreting record sets in binary and converting
> > them to some useful REBOL "structures".
> 
> I looked at mysql.org page yesterday too, but found out only following:
> 
> there are two ways of how to configure mysql database for connections:
> 
> - you can use unix sockets (connection thru files - faster one)
> - connection thru TCP/IP
> 
> Now let's expect you can't afford buying /Command version and so connect thru
> some native library or /ODBC, so you are left with /Core and TCP/IP
> connection or Unix sockets as described above.
> 
> So - is let's say TCP/IP connection described anywhere? It has to use some
> kind of text based protocol. The question is what form MySQL returns record
> set in and how time-consuming parsing/decoding would be.
> 
> Maybe even connection thru sockets would not be so difficult to achieve?
> 
> Regards,
> -pekr-
> 
> >
> >
> > --
> > Michal Kracik
> >
> > [EMAIL PROTECTED] wrote:
> > >
> > > [EMAIL PROTECTED]!
> > > > so where's a link to MySQL and PostGresSQL socket connectivity
> > >
> > > [EMAIL PROTECTED]
> > > > BTW, if you write a MySQL protocol handler, I could find a good use
> > > for it... :-)
> > >
> > > [EMAIL PROTECTED]
> > > > It would be great to connect rebol to MySql, but then I don't know if
> > > MySql runs on as many platform as does rebol/core
> > >
> > > If Command had MySQL support out of the box, I could put it to work on
> > > paying projects the day it ships. (I get paid, Carl gets paid.)
> > >
> > > Without MySQL support, REBOL is still a hobby (sigh), leaving me
> > > stranded in the JSP/PHP zones.
> > >
> > > -- Ted Husted, Husted dot Com, Fairport NY USA.
> > > -- Custom Software ~ Technical Services.
> > > -- Tel 716 425-0252; Fax 716 223-2506.
> > > -- http://www.husted.com/

Reply via email to