[Devel] one more (possible) improovments of mysql module

Henning Westerholt henning.westerholt at 1und1.de
Thu Jun 14 16:53:04 CEST 2007


On Mittwoch, 13. Juni 2007, Victor Gamov wrote:
> > So i don't think that we could get rid of this function at the moment.
> >
> > But how do you changed the interface of the store_result function?
>
> No. I remove store_result and use only fetch_result.
> But it was mistake about interface changes, sorry.
> I change all store_result calls (two times only in dbase.c) to
> fetch_result with third parameter nrows=0.
>
> As I found in fetch_result  code it counts number of rows returned by DB
> and fetch only nrows. If nrows=0
> it will return all rows fetched from DB
>
> at line 368-369 (mysql/dbase.c):
>
> if(nrows>0 && nrows<n)
>                  n = nrows;

Hi Victor,

yes, these functions does the same thing in this case. But fetch_result does 
more operations (e.g. row counting) then store_result, so this would be 
decrease the performance of the server. The store_result function is executed 
from many modules.

Henning



More information about the Devel mailing list