MantisBT - VTK | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0013705 | VTK | (No Category) | public | 2012-12-05 17:22 | 2013-07-22 20:57 |
Reporter | Patrick Emond | ||||
Assigned To | Dave DeMarle | ||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | 6.1.0 | |||
Project | TBD | ||||
Type | incorrect functionality | ||||
Summary | 0013705: vtkMySQLQuery incorrectly returning non NULL values in certain circumstances | ||||
Description | When querying a table which has columns which may be null this class returns non-null values when it shouldn't. For instance, for the table: CREATE TABLE myTable ( myIntValue int DEFAULT NULL, myFloatValue float DEFAULT NULL ) columns myIntValue and myFloatValue may be set to null, but when reading these values using vtkMySQLQuery the values 0 and 0.0 are returned instead of NULL. The reason is found in vtkMySQLQuery::DataValue Specifically, in the switch statement there are several return statements which do the following: return vtkVariant(base.ToInt()); When the value is NULL the variable "base" is correctly set to an un-initialized state. Calling ToInt() returns 0 even if it is not a valid number (NULL), so instead this line should read: return base.IsValid() ? vtkVariant(base.ToInt()) : base; The same could be applied for long, floats and doubles. | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2012-12-05 17:22 | Patrick Emond | New Issue | |||
2013-06-25 14:00 | Dave DeMarle | Note Added: 0031059 | |||
2013-06-26 10:39 | Patrick Emond | Note Added: 0031084 | |||
2013-06-26 10:43 | Dave DeMarle | Note Added: 0031085 | |||
2013-07-22 20:56 | Dave DeMarle | Assigned To | => Dave DeMarle | ||
2013-07-22 20:56 | Dave DeMarle | Status | backlog => todo | ||
2013-07-22 20:57 | Dave DeMarle | Status | todo => active development | ||
2013-07-22 20:57 | Dave DeMarle | Status | active development => closed | ||
2013-07-22 20:57 | Dave DeMarle | Resolution | open => fixed | ||
2013-07-22 20:57 | Dave DeMarle | Fixed in Version | => 6.1.0 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|