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

pat marion pat.marion at kitware.com
Wed Jun 2 14:29:22 EDT 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100602/a2b66a0d/attachment.html>


More information about the vtk-developers mailing list