[vtk-developers] Bug in vtkMySQLQuery::Execute()

pat marion pat.marion at kitware.com
Wed Jun 2 14:52:46 EDT 2010


Thanks Jeff.  Andy emailed me but didn't copy the list, so you may want to
coordinate with him.

Another note- at the very bottom of
http://dev.mysql.com/doc/refman/5.0/en/mysql-field-count.html it says
another acceptable solution is to call mysql_error() to check for an error,
instead of calling mysql_field_count().  Maybe that method has less
overhead?  I'll let you guys decide.

Pat

On Wed, Jun 2, 2010 at 2:47 PM, Jeff Baumes <jeff.baumes at kitware.com> wrote:

> Thanks for the patch. It looks reasonable to me. I can put it in my
> queue to push into VTK.
>
> BTW, the VTK_MYSQL_TEST_URL is a url to a user/database that the user
> has write access to. The URL format for MySQL databases is of the
> form: 'mysql://'[[username[':'password]'@']hostname[':'port]]'/'[dbname]
>
> Jeff
>
> On Wed, Jun 2, 2010 at 2:29 PM, pat marion <pat.marion at kitware.com> wrote:
> > Hi,
> >
> > My application was generating an sql statement that contained a subquery
> > error (the third one listed on
> > http://dev.mysql.com/doc/refman/5.0/en/subquery-errors.html.)  Executing
> the
> > statement at the mysql command line revealed the error, but
> > vtkMySQLQuery::Execute() did not catch the error, and subsequently
> crashed
> > in vtkMySQLQuery::NextRow().
> >
> > The mysql doc explains that it is possible for mysql_query() to succeed,
> but
> > mysql_store_result() returns null when it should not.  See:
> > http://dev.mysql.com/doc/refman/5.0/en/null-mysql-store-result.html
> >
> > I created a bug report and attached a patch that fixes the bug.  I think
> the
> > fix is correct, but I'm not sure how to run vtk's mysql tests (wasn't
> sure
> > how to set VTK_MYSQL_TEST_URL.)  Maybe one of the authors of this class
> > wants to take a look?  My application doesn't use vtk head, so I'm not
> > actually in a huge rush to see this bug fix pushed.
> >
> > http://public.kitware.com/Bug/view.php?id=10788
> >
> > Pat
> >
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtk-developers
> >
> >
> >
>
>
>
> --
> Jeff Baumes, Ph.D.
> Technical Lead, Kitware Inc.
> (518) 881-4932
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100602/a6e67b22/attachment.html>


More information about the vtk-developers mailing list