Re: Re: finding inplace alters
Posted in 2011
Hi Fernando,
you mean how to determine engine's endianess using an SQL query?
There might be more elegant ways, but what about
select first 1 hexdata from sysmaster:sysrawdsk;
This would return first 16 raw bytes from root chunk, so something
starting on "00000000 0001" from big endian and "00000000 0100" from
little endian servers.
Of course this is restricted to user informix.
In case this page zero uses an old page header (pre-9.40 page), you'd get
"00000001" or "01000000" respectively. You could tell the two cases by
checking if first 8 nibbles all are zeroes.
More easily, you could:
select first 1 hexdata[1,4] from sysshmem;
This should return first shmem segments magic number 0xe0b7, as either
"e0b7" or "b7e0".
Cheers,
Andreas
From:
Fernando Nunes <domusonline@gmail.com>
To:
Andreas Legner/Germany/IBM@IBMDE
Cc:
informix-list@iiug.org
Date:
12.01.2011 03:06
Subject:
Re: Re: finding inplace alters
Andreas,
Thanks for the reply, and don't bother... You were right... A checkpoint
is needed.
So, at this moment I have something that apparently works... But needs
some refinement and further testing...
Also... I need a way to find out if the platform is little endian or big
endian.... any ideas?
Regards!