lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I am trying to use LuaSQL on Windows against Oracle at the moment and
would like to use the OCI interface.  But that currently crashes for
me, due to this:

> hi
> 
> in luasql-2.0.0, ls_oci8.c, free_column_buffers() has a line 251
> reading "case SQLT_NUM: /* NUM is an array of char */"
> resulting in a free on the char *s of union column_value.
> 
> Well, since SQLT_NUM is *not* an array of char in this
> implementation (and this file uses the union's double
> value in a couple of other places for SQLT_NUM),
> this crashes occasionally on cursor close.
> 
> This case must be moved a line up next to case SQLT_FLT,
> which does not free zilch, then everything's fine.
> 
> 
> salud
> Klaus


*** ls_oci8.c.orig	Wed Mar 23 00:55:20 2005
--- ls_oci8.c	Sat Jul 16 23:53:00 2005
***************
*** 247,254 ****
  	switch (col->type) {
  		case SQLT_INT:
  		case SQLT_FLT:
  			break;
- 		case SQLT_NUM: /* NUM is an array of char */
  		case SQLT_CHR:
  		case SQLT_STR:
  		case SQLT_VCS:
--- 247,254 ----
  	switch (col->type) {
  		case SQLT_INT:
  		case SQLT_FLT:
+ 		case SQLT_NUM: /* NUM is *NOT* an array of char */
  			break;
  		case SQLT_CHR:
  		case SQLT_STR:
  		case SQLT_VCS:


Unfortunately, my skills at OCI programming are zilch and trying to
recompile against the OCI that I found locally (v9.2) leads to loads
of Windows exceptions inside the OCI libs.  I can't figure out how to
go about trying to debug this, since the Oracle docs are atrocious and
I haven't got a clue what they are talking about most of the time.

Has anybody out here successfully recompiled the oci8.dll for LuaSQL
on Windows with the fix above?  If yes, would you be willing to send
me a copy?

Thanks,
Robby

PS I'm currently working around the problem by using COM and Oracle's
   OLE interface (which is only mildly easier to understand than OCI).