Skip to Content.
Sympa Menu

freetds - Re: dbdead, PHP, and Apache

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Castellano, Nicholas" <Nicholas_Castellano AT acml.com>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: dbdead, PHP, and Apache
  • Date: Thu, 19 Sep 2002 11:54:26 -0400


Total binary compatibility may not be a realistic possibility. However,
effective binary compatibility has already been achieved, at least for
simple DB-Library programs.

Only the exposed elements of the API need to be compatible. Library
internals and structure elements don't need to be the same. Nothing in
Sybase's header files accesses any of the internal structures. As long as
the exposed API is the same, it will work.

The sonames can be a problem, but at least on some platforms it is possible
to override this.

The following program was dynamically linked against Sybase 12 DB-Library on
Digital UNIX. This demonstration should show just how close we are to
effective binary compatibility. The slight differences in the output are
because this program used dbprhead()/dbprrow() which behave differently in
FreeTDS:

bash$ ./sybaserunsql user password db 'select @@version' server

----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
---------------------------

Adaptive Server Enterprise/11.5.1.1/P/Digital UNIX/4.0/SWR 8710 ESD
4/OPT/Wed Dec 1 14:56:46 PST 1999


bash$ export LD_LIBRARY_PATH=/usr/local/lib
bash$ ./sybaserunsql user password db 'select @@version' server
31577:./sybaserunsql: /sbin/loader: Fatal Error: object libsybdb.so from
liblist in ./sybaserunsql has version "", which does not match the found
object: /usr/local/lib/libsybdb.so (with version "1.0.0:1.0")

bash$ export _RLD_ARGS="-ignore_all_versions"
bash$ ./sybaserunsql user password db 'select @@version' server
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
---------------------------
Adaptive Server Enterprise/11.5.1.1/P/Digital UNIX/4.0/SWR 8710 ESD
4/OPT/Wed Dec 1 14:56:46 PST 1999


Note that FreeTDS was configured "--enable-sybase-compat" to provide a
dbopen() entry point.

Cheers,
--nick

-----Original Message-----
From: bounce-freetds-145195 AT franklin.oit.unc.edu
[mailto:bounce-freetds-145195 AT franklin.oit.unc.edu]
Sent: Thursday, September 19, 2002 10:56 AM
To: TDS Development Group
Subject: [freetds] Re: dbdead, PHP, and Apache

[...]
It's different because, from what I've been told, total binary-compatibility
with Sybase dblib/ctlib is not regarded as a feasible goal[0]. (Maybe this
feeling has changed since I last asked,
though?) Binary compatibility with ODBC, OTOH, is a *requirement* for any
ODBC driver that will be loaded by an ODBC driver manager.

[...]
[0] Where complete binary-compatibility means that all function & struct
symbols provided by Sybase libs are provided by FreeTDS; the sizes and
alignments of all the structs is compatible; the return values and arguments
of the functions match; the *list* of libraries is identical (Sybase's libct
pulls in other libs that we don't provide); and the sonames of all libraries
match.


The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that for certain accounts we do not accept
orders and/or instructions by e-mail, and for those accounts we will not be
responsible for carrying out such orders and/or instructions. Kindly refrain
from sending orders or instructions by e-mail unless you have confirmed that
we accept such communications for your account. Please also note that to
satisfy regulatory requirements we review the outgoing and incoming e-mail
correspondence of staff members serving certain functions.






Archive powered by MHonArc 2.6.24.

Top of Page