ESQL/C 5.01 Bug with SELECT and arrays used in WHERE qualification 
Author Message
 ESQL/C 5.01 Bug with SELECT and arrays used in WHERE qualification

My collegue, Bruce Munro, noticed the following effect whilst recompiling
with 5.01 under HP/UX 9.01 on HP 9000/715 :-

    $select * into $a_record from a_table where a_column=$array1[array2[0]];

is translated to

/*
 *     $select * into $a_record from a_table where a_column=$array1[array2[0]];
 */
#line 9 "ms.ec"
  {
#line 9 "ms.ec"
  static char *sqlcmdtxt[] =
#line 9 "ms.ec"
    {
#line 9 "ms.ec"
    " select * from a_table where a_column = ?",
    0
    };
#line 9 "ms.ec"
  static _SQCURSOR _SQ0 = {0};
  static struct sqlvar_struct _sqibind[] =
    {
      { 102, sizeof(array1[array20]), 0, 0, 0, 0, 0, 0, 0 },
#line 9 "ms.ec"
    };
  static struct sqlvar_struct _sqobind[] =
    {
      { 102, sizeof(a_record), 0, 0, 0, 0, 0, 0, 0 },
#line 9 "ms.ec"
    };
#line 9 "ms.ec"
  _sqibind[0].sqldata = (char *) &array1[array20]; <==== ERROR HERE
#line 9 "ms.ec"
  _sqobind[0].sqldata = (char *) &a_record;
#line 9 "ms.ec"
  _iqslct(&_SQ0, sqlcmdtxt, 1, _sqibind, 1, _sqobind, 0);
#line 9 "ms.ec"
  }

Quote:
}

The C colpiler complains because array2[0] is translated to array20 which is
an undefined variable.

Informix presently believe this is a bug and are in the process of raising
a bug number.



Sun, 30 Jun 1996 16:59:27 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. Memory Leak in ESQL/C 5.01 !

2. Beep in ESQL/C 5.01 for OS2

3. AIX/5.01 INET & ESQL/C Problems

4. SetConnect/GetConnect in ESQL/C for Windows 5.01

5. Help: Moving ESQLC 4.10 code to ESQL 5.01

6. Help: Moving ESQLC 4.10 code to ESQL 5.01

7. Clipper 5.01 array problem

8. Online STAR 5.01 bug.

9. Bug in Online 5.01?

10. Informix 5.00/5.01 bugs?

11. BDE 5.01 Causes Y2K Bug in Paradox Import

12. Clipper 5.01 bug in TBrowse:colorRect() method w/fix


 
Powered by phpBB® Forum Software