Skip to Content.
Sympa Menu

freetds - Re: [freetds] Procedure or function has too many arguments specified

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Procedure or function has too many arguments specified
  • Date: Wed, 05 Nov 2008 07:45:41 +0100

Il giorno mar, 04/11/2008 alle 20.48 -0800, Man Min Yan ha scritto:
> Hi Frediano,
>
> You're right, tds_free_dynamic doesn't seem to be right. It's not removing
> the items from the tds->dyns list properly. Also, my previous patch is not
> right as it would throw away any previously prepared statement. Here's my
> 2nd go at fixing this problem.
>
> I've also tried to identify where the prepares were happening, and it seems
> to be a freetds problem. Here's the call stack:
> main()
> perl_run()
> Perl_runops_standard()
> Perl_pp_entersub()
> XS_DBI_dispatch()
> XS_DBD__ODBC__st_execute()
> odbc_st_execute()
> SQLExecute() from libodbc.so.1
> SQLExecute() at odbc.c:3343
> _SQLExecute() at odbc.c:3142
> tds_submit_prepare() at query.c:1007
>
> The code in _SQLExecute is actually un-preparing the statement,
> re-preparing it, then executing it every time it is called.
>
> Rgds,
> Man Min
>

Mmmm... currently there are 3 issues:
- generated ids can create duplication leading to dynamic reuse, perhaps
we should throw error on same id and generate betters ids. TODO: test in
libTDS to check no duplication on generated ids
- on reused dynamic I had cur_dyn set but no dynamic on list... that is
a huge memory problem! TODO: test in odbc to remove the problem
- odbc prepare too much, in this case due to rebinding. TODO: cache
argument and query in libTDS to avoid this case.

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page