Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

[JIRA] Resolved: (CAROB-52) SQLTimestampDeserializer() buggy: msg#00004

db.carob.general

Subject: [JIRA] Resolved: (CAROB-52) SQLTimestampDeserializer() buggy

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

Zsolt Simon resolved CAROB-52:
------------------------------

Assign To: Zsolt Simon (was: Gilles Rayrat)
Resolution: Fixed

Created a special type to hold the time and nanos part (SQLTimeStamp). The data
is accesible via ResultSetDataType.as_other, a pointer to SQLTimeStamp.

> 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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | advertise | OSDir is an inevitable website. super tiny logo