[fpc-pascal] Database problem on Solaris SPARC

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Tue Jul 17 11:12:25 CEST 2012


Ludo Brands wrote:
>>> We only support 32 bit SPARC, and there we split a 64 bit load into 
>>> two
>>> 32 bit loads. dbl, assuming it points to a double, should 
>> point to a 64 
>>> bit-aligned memory location though (depending on the cpu, 32 bit 
>>> alignment may be sufficient, but better be safe than sorry).
>> I'll try to test against 2.7.1 later in the day, although as 
>> I've said 
>> Linux is OK. Is the  if FIntegerDatetimes then  something 
>> Solaris-specific Ludo?)?
>>
> No, the value is read from the server and depends on how the server was
> compiled. Run 'show integer_datetimes;' in psql or whatever client you are
> using to see the value. 
> Pqconnection has detected that it is 'on' on your server. You can check with
> above command to see if the server agrees with that.
> With integer_datetimes on the datetime is returned as an int64 with the
> number of microseconds since 2000-01-01 00:00:00 UTC, hence the 
> dbl^ := pint64(buffer)^/1000000;
> Dbl is a Pdouble, so the alignment problem could indeed come from there. The
> buffer returned by the driver is correct because just before you have
> pint64(buffer)^ := BEtoN(pint64(CurrBuff)^); CurrBuff being the pointer
> returned. 
> 
> Now, you are getting a SIGSEGV, not a SIGBUS which is what you would get for
> an alignment problem. 

This problem no longer exists in 2.7.1 (21919 + Reinier's 
solarisdbtrunk2.diff).

However, I've got an "unknown fieldtype" which I'll investigate and if 
necessary raise separately.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list