Re: Re: finding inplace alters
Posted in 2011
Here's a little test program based on how I do it in my ul.ec utility: #if !defined LITTLE_ENDIAN # define LITTLE_ENDIAN 1234 #endif int EndianNess; int DetermineEndianNess() { int testint = 0x04030201, ii, result = 0, mult=1000; char *p = (char *)&testint; for ( ii=0; ii < 4; ii++) { result += mult * p[ii]; mult /= 10; } return result; } int main() { EndianNess = DetermineEndianNess(); printf( "LITTLE_ENDIAN=%d. EndianNess = %d.\\n", LITTLE_ENDIAN, EndianNess ); if (EndianNess == LITTLE_ENDIAN) { printf( "LITTLE_ENDIAN\\n" ); } else /* BIG_ENDIAN */ { printf("BIG_ENDIAN\\n" ); } return 0; } Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Tue, Jan 11, 2011 at 9:06 PM, Fernando Nunes <domusonline@gmail.com>wrote: > 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! > > On Tue, Jan 11, 2011 at 8:29 AM, Andreas Legner <andreas.legner@de.ibm.com > > wrote: > >> >> Morning Fernando, >> >> I'd assume so (will check once I find time). The counters should be >> updated for every single row/page being lifted to the latest version. >> If you're taking the counters from the (secondary) partition pages, you'd >> probably need to checkpoint first to get the in-memory partition >> informations flushed to partition pages (and to disk, though this part >> probably isn't what you need). >> >> HTH, >> Andreas >> >> >> From: >> Fernando Nunes <domusonline@gmail.com> >> To: >> Andreas Legner/Germany/IBM@IBMDE >> Cc: informix-list@iiug.org Date: 11.01.2011 01:55 Subject: Re: Re: >> finding inplace alters >> ------------------------------ >> >> >> >> >> >> On Mon, Dec 20, 2010 at 5:41 PM, Andreas Legner <* >> andreas.legner@de.ibm.com* <andreas.legner@de.ibm.com>> wrote: >> I could offer a tool called 'onion' that, among other things, can provide >> the desired informations directly from versions' page >> counters on (secondary) partition pages, so no data and other pages need >> to be scanned and you can get what you want in a second >> or two. The engine will not sense a bit since the tool is reading >> directly from disks. >> >> Nothing official, designed for support purposes, but usually serving its >> purpose... >> >> Let me know if you need it (platform required since it is a binary). >> >> Andreas >> >> >> Hello Andreas... >> Are you sure the counters are updated after a dummy update? >> I get to the point where I get that info from SQL, but unless I'm doing >> something completely wrong, the counters did not change..... >> >> Regards >> >> >> -- >> Fernando Nunes >> Portugal >> * >> **http://informix-technology.blogspot.com*<http://informix-technology.blogspot.com/> >> My email works... but I don't check it frequently... >> >> > > > -- > Fernando Nunes > Portugal > > http://informix-technology.blogspot.com > My email works... but I don't check it frequently... > > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list > >