Re: Endian issue, BYTE columns and INFORMIX
Posted in 2000
On 12 Dec 2000, Mark Oberfield wrote: >>>>>> "JL" == Jonathan Leffler <jleffler@informix.com> writes: > >Please see below: > > JL> How many of the loc_t fields do you set (and which > JL> ones)? When I do it, I use: > > blob-> loc_loctype = LOCMEMORY; loc_size = 0; loc_bufsize = -1; > blob-> loc_buffer = (char *)0; loc_indicator = 0; loc_oflags = 0; > ... > >> Given that we're able to fetch and store ordinary data types > >> just fine, it appears that server-client software recognizes > >> the difference in byte ordering between the two or uses some > >> kind of XDR format but doesn't extend to BYTE or TEXT columns? Can DB-Access show you the data in the column? >First, a correction in my original posting on this topic. I have >IDS Version 7.30.UC2 on HP-UX 10.20, not 7.31 as stated earlier. > >Table schema for stdtextproducts: > >Column name Type Nulls > >site char(4) no >cccid char(3) no >nnnid char(3) no >xxxid char(3) no >product text no > > >Test program "gettext" on Linux box: I ran this without trouble on RedHat 6.2 (kernel 2.2.14-5smp, glibc 2.1.3) with IDS 9.21 and CSDK 2.40 both on the Linux box. I added a line to print the text blob, and it gave the correct answer. I don't have a database on an HP-UX box that I can conveniently use. Have you tried the program running solely on Linux? Does it still crash? If it doesn't crash against a Linux database but does against the HP one, there is a bug somewhere. If it fails against the Linux database, then we'll need >[...program omitted...] >Compiled with Client SDK 2.40 for Linux > >% gettext >Memory fault (core dumped > >[...gdb session omitted...] >Then we tried SQLCMD which was built on the Linux box: > >% sqlcmd -d fxatext >SQL[1]: select product from stdtextproducts; >SQL -403: The size of a received row disagrees with the expected size. >Memory fault (core dumped) Ouch. >We downloaded Client SDK 2.40 for Linux. Is this appropriate for the >server we have? Should be fine. I'll double check SQLCMD 57 on my Linux box soon, but maybe not this week. -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!"