Skip to Content.
Sympa Menu

freetds - RE: conversion status

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Brian Bruns" <camber AT ais.org>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: RE: conversion status
  • Date: Fri, 30 Aug 2002 13:25:14 -0400


> > From: ZIGLIO Frediano [mailto:Frediano.Ziglio AT vodafoneomnitel.it]
> > Sent: August 30, 2002 11:50 AM
> >
> > Wow so in your machine sizeof(TDS_INT8) == 4 ??
>
> Um, er, yes? Actually, in config.cache:
>
> ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long='8'}
>
> but in fact there's no long long or atoll() on that machine.
>
er, the AC_SIZEOF(long) should catch it. Consider this a bug.



> > I was thinking conversion from int -> binary. Should be just
> > a memcpy or should we swap bytes (like bigendian->littleendian) ?
>
> Don't know. Would have to experiment and/or listen to Brian.

Oh dear, whatever you do, don't listen to me....

WWSD? - What Would Sybase Do? (I saw a hilarious bumper sticker the
other day....WWSD, What Would Scooby Doo?). Um, I'm wondering if this is
going to translate for our european friends....we'll see.

Anyway, best thing would be to build an unittest.and see what Sybase/MS
does does with the data.

> MS documentation says binary & image store "a string of bits". I know what
> that means in theory, but not in (their) practice.
>
> 1> create table #i(i varbinary(20))
> 2> insert #i values ( 0x100 )
> 3> insert #i values ( 0x11223344 )
> 4> select * from #i
> 5> go
> i
> ------------------------------------------
> 0x01
> 0x11223344
>
> 1> select cast(i as int) from #i
> 2> go
>
> -----------
> 1
> 287454020
>
> $printf "%x\n" 287454020
> 11223344
>
> I don't know about you, maestro, but where I come from I'll trade you 1 for
> 0x100 any day of the week. I would have expected the first row to be 256.
>
> Regards,
>
> --jkl
>




Archive powered by MHonArc 2.6.24.

Top of Page