-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Larger Long/BIGINT values mangled when passed from server to client #12
Comments
FYI - logged as https://issues.voltdb.com/browse/ENG-5545 John On Tue, Feb 18, 2014 at 11:57 PM, Juraj Vitko notifications@github.comwrote:
_E: *jpiekos@voltdb.com |
Cut/paste error, the ticket is https://issues.voltdb.com/browse/ENG-5893 On Wed, Feb 19, 2014 at 8:51 AM, John Piekos jpiekos@voltdb.com wrote:
_E: *jpiekos@voltdb.com |
John, any news on how is the fix progressing, or ETA? Thanks much.. |
Hi Juraj, We haven't scheduled work on this ticket yet. I'll let you know when it John On Thu, Feb 27, 2014 at 12:50 PM, Juraj Vitko notifications@github.comwrote:
_E: *jpiekos@voltdb.com |
John, I have looked at it and it seems like changing Parser.prototype.readLong = function() {
return this.readLongBytes()[0];
}; to Parser.prototype.readLong = function() {
return this.readLongBytes().intValue();
}; in lib/parser.js:84 does the trick. |
Thanks @youurayy , your trick works perfectly!!!! I think this is an important change. Could you please commit this change? |
Hi @youurayy . After some tests, I found out when the value is 2518472322, your solution make the value negative. parseInt(this.readLongBytes().toString()) seems to be a better solution for me so far |
Okay, this is quite severe and a show-stopper for us. Resolution would be appreciated.
It only happens with a larger Long values, e.g.
2000000000L
. Smaller values are fine, e.g498498L
, but this makes it even more dangerous.Tested on Mac OS X and Linux, VoltDB 3.7.0.4-0 enterprise. Node.js v0.10.15 (Mac) and v0.10.24 (Linux).
Minimal test case follows.
Test.java
catalog.sql
test.js
(@jpiekos - John, I'm still intent on sending you that proposal, just haven't had time by now.)
The text was updated successfully, but these errors were encountered: