[ https://forge.continuent.org/jira/browse/CAROB-52?page=all ]
     
Zsolt Simon closed CAROB-52:
----------------------------

    Resolution: Fixed

Commited the fix to the CVS

> SQLTimestampDeserializer() buggy
> --------------------------------
>
>          Key: CAROB-52
>          URL: https://forge.continuent.org/jira/browse/CAROB-52
>      Project: Carob
>         Type: Bug
>   Components: C++ API
>     Reporter: Zsolt Simon
>     Assignee: Zsolt Simon

>
>
> I didn't tried it, but at a first glance the function: 
> SQLTimestampDeserializer() is not working.
> Let me explain why...
> the code is:
> ...
>   time = ((time/1000)*1000);
>   int32_t nanos = (int)((time%1000) * 1000000);
> ***** since time was already divided by 1000 and multiplied by it, the 
> time%1000 will result always in 0.
> ...
>   input>>nanos;
> ***** here nanos will always be rewritten
>   res.as_long = time;
>   res.as_int = nanos;
> ***** because res is a union structure res.as_long and res.as_int will point 
> to the same location => they will overwrite eachother.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


_______________________________________________
Carob mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob

Reply via email to