lua-users home
lua-l archive

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


Hi,

On Tue, Feb 17, 2009 at 9:43 AM, Neil Richardson <nrich@ii.net> wrote:
> Website: http://code.google.com/p/luadbi/
> Wiki: http://code.google.com/p/luadbi/w/list
>
> LuaDBI is a database interface library for Lua. It is designed to provide a
> RDBMS agnostic API for handling database operations. LuaDBI also provides
> support for prepared statement handles, placeholders and bind parameters for
> all database operations.
>
> Currently LuaDBI supports DB2, Oracle, MySQL, PostgreSQL and SQLite
> databases with native database drivers.
>
> This in an initial alpha release - all features should work as specified but
> there may be bugs still inside. All bug reports are greatly appreciated.

Great! I looked at oracle and postgresql drivers. I found a few bugs.

Oracle:
- bind parameters
   If a sql statement changes a bind value, the return value of
lua_tostring() also
   changed. It makes lua string smash.
- memory leaks at least three lines.

Postgresql:
- Prepared statements are not deallocated. It makes resource leaks in
the database
  server's process.
    http://www.postgresql.org/docs/8.3/static/libpq-exec.html#AEN30965
    http://www.postgresql.org/docs/8.3/static/sql-deallocate.html
- Prepared statement are not alway good for performance.
  Look at my post to ruby-dbi. This is not a bug. It depends on your choice.
    http://rubyforge.org/pipermail/ruby-dbi-users/2008-September/000034.html

I can make a patch for Oracle at the next weekend or the weekend after next.
But sorry, I won't make a patch for postgresql.

I have a question.
- Do you have plan to support out bind parameters.