lua-users home
lua-l archive

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



Hi everyone :

I'm trying LuaSQL 2.1.0 on AIX 5.2 . Lua 5.1.2 is installed using the "make aix install" option .
Our database is DB2 8.2 so I compile the odbc part like this :

-----------------------------------------------------------------------------
luasql.so : ls_odbc.o luasql.o
 xlc $^ -G -bexpall -L$(LUADIR)/lib -L$(DB2DIR)/lib -llua -ldb2 -o $@

ls_odbc.o : ls_odbc.c
 xlc -qlanglvl=extc99 -I$(LUADIR)/include  -I$(DB2DIR)/include -c $^

luasql.o : luasql.c
 xlc -qlanglvl=extc99 -I$(LUADIR)/include -c $^
-----------------------------------------------------------------------------

(The include part of ls_odbc.c is tailored specifically for DB2 )

Then I excute the following code which is exactly like LuaSQL sample code :

-----------------------------------------------------------------------------
require "luasql.odbc"

env = assert (luasql.odbc())
con = assert (env:connect("###" , "####" , "####"))

cur = assert (con:execute"SELECT  * from PEOPLE")
row = cur:fetch ({} , "a")

while row do
  print( row.ID , row.NAME )
  row = cur:fetch (row , "a")
end

cur:close()
con:close()
env:close()
-----------------------------------------------------------------------------

The printed result is as expected . But at the end of excution it produce an error  :

Illegal instruction(coredump)

The formatted coredump file is listed below :

-----------------------------------------------------------------------------
Illegal instruction (illegal opcode) in . at 0x0 ($t1)
warning: Unable to access address 0x0 from core
 thread  state-k     wchan    state-u    k-tid   mode held scope function
>$t1     run                  running  11854051     k   no   pro

1 threads

=== Thread 1 ===

warning: Unable to access address 0xfffffffffffffffc from core
warning: Unable to access address 0xfffffffffffffffc from core
warning: Unable to access address 0xfffffffffffffffc from core
warning: Unable to access address 0xfffffffffffffffc from core
.() at 0x0
cuexit.exit(??) at 0xd023b794

--- thread stack size info for thread 1 ----

Maximum stack size = 33551008 (0x1fff2a0)
Current stack size = 96 (0x60), Current stack available = 33550912 (0x1fff240)
-----------------------------------------------------------------------------

Can anybody help ? Thanks in advance .


--
http://bloomingw.spaces.live.com/