[vtk-developers] Possible bug in vtkMySQLQuery class

Wong, Matthew H mhwong at sandia.gov
Wed Jun 23 19:24:27 EDT 2010


Hi Andy,

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.

Thanks,

Matthew Wong


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100623/1e99988d/attachment.html>


More information about the vtk-developers mailing list