[vtk-developers] Possible bug in vtkMySQLQuery class
pat marion
pat.marion at kitware.com
Wed Jun 23 20:00:40 EDT 2010
After this is figured out, someone let me know and I'll resolve the bug the
prompted the commit-
http://www.vtk.org/Bug/view.php?id=10788
Pat
On Wed, Jun 23, 2010 at 7:39 PM, David Thompson <dcthomp at sandia.gov> wrote:
> Matthew Wong wrote:
>
>> In the vtkMySQLQuery.cxx file, in the Execute() function, after the
>> following line:
>> int result = mysql_query(db, this->Query);
>> there is a check to see if the result == 0. If the result == 0, then
>> there is a comment in the code that says "The query probably succeeded". If
>> the result is not 0, there is a comment in the code that says " //
>> result != 0; the query succeeded"
>>
>> However, according to
>> http://dev.mysql.com/doc/refman/5.0/en/mysql-query.html the return value
>> is:
>> "Zero if the statement was successful. Nonzero if an error occurred. "
>> I was wondering what motivation for the "the query succeeded" comment was,
>> and it looks incorrect according to the dev.mysql.com documentation.
>>
>
> Matthew didn't mention it, but the reason we found this was because we ran
> into a case where in fact result != 0 and the query had failed. Is there
> some reason that the change you made on June 4:
>
> http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=6992568a4cb9243a305f1efd383b4fab4c45ae88
> affected both branches of the conditional instead of just the branch with
> result == 0?
>
>
> Thanks,
> David
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100623/2797f507/attachment.html>
More information about the vtk-developers
mailing list