[freetds] src/dblib/unittests/t0008.c

Brian Bruns brian.bruns at gmail.com
Sat Apr 16 17:22:59 EDT 2005


I guess the real question is, how does it behave on OpenClient (or
msdblib for that matter).  I assume when the test was written that it
was tested there.

Brian

On 4/16/05, James K. Lowden <jklowden at schemamania.org> wrote:
> "Craig A. Berry" <craigberry at mac.com> wrote:
> > I would guess the normal method of exit is up above where it says:
> >
> >                         free_bread_crumb();
> >                         return (last_read == 48) ? 0 : 1;
> >
> > Why it doesn't hit that now I don't know.
> 
> I think the test is broken.  That shouldn't surprise me, because it passed
> when buffering was broken.  But let me push it around with you, if I may.
> 
> The test hasn't changed much since v 1.1, 3 1/2 years ago:
> 
> rows_to_add = 50;
> ...
>         for (i = 1; i < rows_to_add; i++) {
> ...
>                 if (i % 25 == 0) {
>                         dbclrbuf(dbproc, 25);
>                 }
>                 if (REG_ROW != dbnextrow(dbproc)) {
> ...                     [... "normal exit" ...]
>         }
> ...
>         return 1;
> 
> It will retrieve only 49 of the 50 rows selected.  dbnextrow() will always
> return REG_ROW, because it never exhausts the resultset.  Am I missing
> something?
> 
> I'm tempted to remove this test, because t0002 does a more thorough job.
> But for now I'm going to commit what I've got.
> 
> Regards,
> 
> --jkl
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>



More information about the FreeTDS mailing list