Skip to Content.
Sympa Menu

freetds - Re: [freetds] CS_UINT_TYPE, but not CS_BIGINT_TYPE

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] CS_UINT_TYPE, but not CS_BIGINT_TYPE
  • Date: Thu, 27 Mar 2008 16:48:07 +0100

>
> James K. Lowden wrote:
> > Federico Alves wrote:
> >> I open a ticket with DBD-Sybase and the author Michel
> Peppler thinks
> >> there is an issue
> >> with freetds, not with DBD-Sybase.
> >> <URL: http://rt.cpan.org/Ticket/Display.html?id=34411 >
> >>
> >> On Mon Mar 24 20:19:06 2008, falves1 wrote:
> >>> I compiled DBD-Sybase 1.08 using DBI 1.604, and the perl
> Makefile.PL
> >>> works fine, but then when I do a make I get this
> >>> Sybase.xsi:275: error: invalid lvalue in assignment
> >>> Sybase.xsi: In function âXS_DBD__Sybase__db_DESTROYâ:
> >>> Sybase.xsi:334: error: invalid lvalue in assignment
> >>> make: *** [Sybase.o] Error 1
> >> This is a problem with FreeTDS.
> >>
> >> The issue is that FreeTDS defines CS_UINT_TYPE, but not
> CS_BIGINT_TYPE,
> >> and Sybase never defines one without the other.
> >
> > I'm not convinced this is a "problem" with FreeTDS, and I'm
> not sure how
> > to fix it.
> >
> > FreeTDS doesn't guarantee line-by-line compatibility with
> Sybase's header
> > files. The project's header files describe the functions,
> structures, and
> > datatypes implemented by the library. If CS_UINT_TYPE but not
> > CS_BIGINT_TYPE is supported/used/implemented by the
> library, then only
> > CS_UINT_TYPE *should* appear in the header file. Anything
> else would
> > mislead the developer: the translation unit might compile
> but fail to
> > link, or link and not work.
> >
> > Michael, AIUI DBD::Sybase assumes CS_BIGINT_TYPE upon testing for
> > CS_UINT_TYPE. Wouldn't it be better to test for
> CS_BIGINT_TYPE directly?
>
> I've made those changes, but (using 0.82rc2, which is
> probably not quite
> the latest) I get errors with CS_BIGINT not defined (and I can't test
> for that, as that's a typedef, not a #define in Sybase's
> implementation).
>
> So it looks to me like FreeTDS's OC implementation has a
> small problem
> in that respect (or at least had in the version I have here).
>
> Michael

I started writing a patch to fully support bigint and date/time (attached).
However I think it would be better to remove CS_BIGINT_TYPE, CS_UBIGINT_TYPE,
CS_DATE_TYPE and CS_TIME_TYPE. The reason is that are not that supported and
there are some possible issue with the patch:
- what happen if server does not support date/time/bigint ?? FreeTDS is able
to translate to a proper server type for parameters (ie numeric for bigint or
datetime for time/date) ? Or should ctlib fail ?
- are date and time handled correctly ?

freddy77

Attachment: vedi.diff.gz
Description: vedi.diff.gz




Archive powered by MHonArc 2.6.24.

Top of Page