Re: [BUG] double conversion with ESQL/C on Linux]
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
Roman Maurer <roman.maurer@hermes.si> wrote: >We have experienced strange casting problem when storing doubles to >smallint on Informix/Linux. Here is the ESQL/C program that >demonstrates the error. It works OK on Sinix, but stores wrong >data on Linux. > >Does anyone know where to obtain the patch for this bug? >[...snip...] > * OUR ENVIRONMENT: > * - Linux guinness 2.2.5 #4 Tue Apr 13 16:51:36 MEST 1999 i686 unknown > * (SuSE 6.1), > * - Informix DS v7_30_uc7_2, ESQL 9.14 (11/11/93, 07:43:13) > * - GCC VERSION 2.7.2.3 >[...snip...] I haven't tested under SuSE 6.1 (it means rebooting and I don't really want to do that -- I'm being lazy), but... ...under Linux 2.2.5-15smp (Redhat 6.0), the example program works without problem. The most significant difference is that I'm using ESQL/C 9.16.UC3; I'm also using egcs-2.91.66 (egcs 1.1.2 release), rather than the older GCC compiler. Being RedHat 6.0, it is using glibc 2.1.1, too. The ESQL/C 9.16 is released as ClientSDK 2.10.UC3; I'm not sure where the 9.14 version for Linux came from (let alone the date in 1993). Please try upgrading to CSDK 2.10.UC3 (or CSDK 2.30 if it is available yet; I haven't checked for a couple of weeks), and that should fix the problem. Yours, Jonathan Leffler (jleffler@informix.com) #include <witticism.h> Guardian of DBD::Informix v0.60 (v0.61_02) -- http://www.perl.com/CPAN Informix IDN for D4GL & Linux -- http://www.informix.com/idn PS: Thanks for including the test case!
Jonathan Leffler wrote to me and to comp.databases.informix: > > I haven't tested under SuSE 6.1 (it means rebooting and I don't > really want to do that -- I'm being lazy), but... > > ...under Linux 2.2.5-15smp (Redhat 6.0), the example program works > without problem. Huh, that's strange. I've tested testdb.ec on another machine with the same result (bad numbers in DB). The other machine specs are: * Linux azzuro.hermes.si 2.0.36 #1 Wed Nov 25 15:12:35 JST 1998 i686 unknown (TurboLinux release 3.0.1 (San Francisco)) * gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release), libc-2.0.7.so * Informix 7.30.UC7, nettype: onipcshm * INFORMIX-ESQL Version 9.16.UC3 So the only change from our SuSE 6.1 are first two items. > The most significant difference is that I'm using ESQL/C 9.16.UC3; > I'm also using egcs-2.91.66 (egcs 1.1.2 release), rather than the > older GCC compiler. Being RedHat 6.0, it is using glibc 2.1.1, too. > > The ESQL/C 9.16 is released as ClientSDK 2.10.UC3; I'm not sure > where the 9.14 version for Linux came from (let alone the date in > 1993). Please try upgrading to CSDK 2.10.UC3 (or CSDK 2.30 if it is > available yet; I haven't checked for a couple of weeks), and that > should fix the problem. Now I'm using ESQL/C 9.16.UC3 on both machines, but testdb.ec still inserts some wrong numbers in the database (same as before). ESQL/C was installed from informix_client_sdk_v_2_10_uc3_for_linux.zip which (when unziped and rpm-qpi-ed) reports: Name : csdk Distribution: (none) Version : 2.10.UC3 Vendor: Informix Software, Inc. Release : 1 Build Date: Wed Mar 31 22:59:24 1999 Install date: (not installed) Build Host: xinul1.mp.informix.com Group : Development/Libraries Source RPM: csdk-2.10.UC3-1.src.rpm Size : 31978810 License: See Description, below Summary : Informix-Client SDK Which is strange, because I *did* use "rpm -i" and ran installclientsdk. Esql works OK. As of 9.14 version - this was probably my error and wrong data - sorry. Apparently I checked "Sccsid" in /opt/informix/bin/esql rather than typing "esqlc -v" in command line. > PS: Thanks for including the test case! You're welcome. Thank you for replying! -- Pozdrav, Roman