===================================== RELEASE NOTES FOR INFORMIX-ESQL/C 9.14.UC1 PRODUCT RELEASE DATE: 09 Feb 1998 ===================================== TABLE OF CONTENTS I. MAJOR NEW FEATURES IN INFORMIX-ESQL/C II. FIXED CUSTOMER-REPORTED PROBLEMS III. KNOWN PRODUCT DEFICIENCIES I. MAJOR NEW FEATURES IN INFORMIX-ESQL/C II. FIXED CUSTOMER-REPORTED PROBLEMS PTS # Description ----- ----------- 42369 If you put #line 10 between EXEC SQL BEGIN DECLARE SECTION and EXEC SQL END SECTION you'll gett -33051 syntax error on #. 74362 Using decdiv in Sun and HP returns correct results. If you use deccvdbl we get different values in Sun (correct answer) and HP (incorrect answer). 83642 There is a problem in executing dynamically a stored procedure. If you simply prepare the 'exec procedure ...' there is no problem. However, if you use the system descriptor area to get the return values, this results in the truncation of last byte. 84480 When a varchar host variable has a value of an empty string the value is being stored binarily as a null value. This occurrs on the insert operation. III. KNOWN PRODUCT DEFICIENCIES 1. Varchar Host Variables ---------------------- A NULL varchar host variable and an empty varchar host variable have the same representation: '\0'. For fetching into a varchar host variable, an indicator variable must be used to distinguish between the two. If the value is '\0' and the indicator variable is -1, then the hose variable is a NULL varchar. If the value is '\0' and the indicator variable is not -1, then the host variable is an empty varchar. The risnull() function cannot tell the difference between an empty varchar host variable and a NULL host variable. When inserting NULL and empty strings using the varchar host variable, ESQL/C will always insert a NULL. This is a bug. EXAMPLE: ======== $varchar vchar[10]; vchar[0] = '\0'; /* Insert a NULL, this works */ indicator = -1 $insert into tab values (:vchar :indicator); /* Attempt to insert a empty string, this actually inserts * a NULL which is a bug. */ indicator = 0; $insert into tab values (:vchar :indicator); Work around user must insert using a "" to insert an empty string: $insert into tab values (""); 2. Use of Untyped Collection Host Variable with Stored Procedures -------------------------------------------------------------- There is a known problem using untyped collection host variable with stored procedure against the 9.12 and prior releases of Informix Dynamic Server. When inserting an untyped collection host variable which value is the return value of a stored procedure, error -9628 will be raised. Note that this is applicable ONLY when the esql application is run against Informix Dynamic Server release 9.12 or earlier (in all platforms). The problem is fixed in Informix Dynamic Server release 9.13 or later. EXAMPLE: ======== $collection untyped; $execute function spl() into :untyped; (where spl() returns a collection) $insert into mytab values (:untyped); Work around is to use typed or named collection host variables. 3. Use of LVARCHAR pointers and Client Collections ----------------------------------------------- There is a known problem with UPDATE or INSERT of client collections or rows when using an lvarchar pointer host variable and the lvarchar APIs. However, SELECT/FETCH work correctly with client collections and rows. Note that the lvarchar pointer and the lvarchar APIs work correctly for all other statements that do not pertain to client collections and rows. EXAMPLE OF UPDATE : =================== exec sql begin declare section; lvarchar *lvar; row (lv lvarchar(20)) r1; exec sql end declare section; exec sql allocate row :r1; ifx_var_flag (&lvar, 0); /* User does allocation */ ifx_var_alloc(&lvar, 20); ifx_var_setdata(&lvar, "xxxxx", 6); exec sql update table (:r1) set lv = :lvar; /* doesn't work */ The work around is to use lvarchar arrays for the time being. EXAMPLE OF WORKAROUND FOR ABOVE PROBLEM: ======================================== exec sql begin declare section; row (lv lvarchar(20)) r1; lvarchar lvar[20]; lvarchar lvarret[20]; exec sql end declare section; exec sql allocate row :r1; strcpy(lvar, "xxxxx"); exec sql update table(:r1) set lv = :lvar; exec sql select * into :lvarret from table(:r1); printf("data is %s\n", lvarret); EXAMPLE OF SELECT WITH LVARCHAR API AND ROW HOST VARIABLES: ========================================================== exec sql begin declare section; row r1; lvarchar *lvar; char *s; exec sql end declare section; exec sql allocate row :r1; exec sql create database xx; exec sql create row type dbrow(r1 lvarchar); exec sql create table tabrow(col dbrow); exec sql insert into tabrow values (row("abcdef")::dbrow); exec sql select * into :r1 from tabrow; ifx_var_flag(&lvar, 1); /* Have SQLI do the allocation */ /** * This WILL WORK without any problems */ exec sql select * into :lvar from table(:r1); s = (char *) ifx_var_getdata(&lvar); printf("data is %s\n",s);