[mythtv] Ticket #3061: MSqlQuery.size() removal for libmythtv

usleepless at gmail.com usleepless at gmail.com
Fri Feb 9 12:10:09 UTC 2007


On 2/9/07, usleepless at gmail.com <usleepless at gmail.com> wrote:
> On 2/9/07, MythTV <mythtv at cvs.mythtv.org> wrote:
> > #3061: MSqlQuery.size() removal for libmythtv
> > -----------------------+----------------------------------------------------
> >  Reporter:  anonymous  |        Owner:  ijr
> >      Type:  patch      |       Status:  new
> >  Priority:  minor      |    Milestone:  unknown
> > Component:  mythtv     |      Version:  head
> >  Severity:  medium     |   Resolution:
> > -----------------------+----------------------------------------------------
> > Comment (by david at hardeman.nu):
> >
> >  Replying to [comment:5 luitjens]:
> >  > This patch has worked just fine.  Tonight I recorded 9 programs in 2
> >  hours while watching another recorded program with zero problems.  I have
> >  also updated the patch to the latest head and removed a couple more
> >  .size() calls and replaced some of them with .numRowsAffected().  usleep
> >  is this function compatible for you?
> >
> >  Ok, I did a quick review of the patch:
> >
> >   * I couldn't find any numRowsAffected calls in the patch.
> >   * There are still a lot of redundant isActive() calls left
> >   * The .size() removal has been taken too far. For instance, code like
> >  this is just plain ugly:
> >
> >  {{{
> >  -        int qsize = query.size();
> >  +        while(query.next())
> >  +            qsize++
> >  }}}

in hindsight, it is ugly. this one should be reverted. it were quite a
few patches, but this one is no good, i agree.

there are a few other cases in which i am counting in an already
existing loop. that should be ok me thinks.

regards,

usleep


More information about the mythtv-dev mailing list