-
Notifications
You must be signed in to change notification settings - Fork 2.5k
A bug fix for the Types.LONGLONG number range #1376
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
Closed
Closed
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9b7d355
A bug fix for the Types.LONGLONG number range
Dinwy c012136
Update RowDataPacket.js
Dinwy 8d68cdb
A bug fix for the Types.LONGLONG number range
Dinwy 2b160b9
A bug fix for the Types.LONGLONG number range
Dinwy 21d8bad
add tests
Dinwy 0345aeb
Merge branch 'master' of https://github.com/Dinwy/node-mysql
Dinwy b55d927
Delete test0.js
Dinwy b8ece31
Fix bigint out of range problem
Dinwy 7588c28
Fix bigint out of range problem
Dinwy fc77df8
Fixed bigint out of range problem
Dinwy 3032796
Fixed bigint out of range problem
Dinwy bd1ce80
Merge pull request #1 from Dinwy/iss1371
Dinwy 4273828
Fix #1371 bigint error
Dinwy d31b186
Merge pull request #2 from Dinwy/iss1371
Dinwy fb1d14d
Fix #1371 bigint error
Dinwy ff37d5d
Merge pull request #3 from Dinwy/iss1371
Dinwy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
var assert = require('assert'); | ||
var common = require('../../common'); | ||
|
||
var table = 'bigint_test'; | ||
|
||
common.getTestConnection({supportBigNumbers: true}, function (err, connection) { | ||
assert.ifError(err); | ||
|
||
common.useTestDb(connection); | ||
|
||
connection.query([ | ||
'CREATE TEMPORARY TABLE ?? (', | ||
'`id` int(11) unsigned NOT NULL AUTO_INCREMENT,', | ||
'`big` bigint,', | ||
'PRIMARY KEY (`id`)', | ||
') ENGINE=InnoDB DEFAULT CHARSET=utf8' | ||
].join('\n'), [table], assert.ifError); | ||
|
||
connection.query('INSERT INTO ?? SET ?', [table, {big: '9223372036854775807'}]); | ||
connection.query('INSERT INTO ?? SET ?', [table, {big: '-9223372036854775807'}]); | ||
connection.query('INSERT INTO ?? SET ?', [table, {big: '1111111111111111111'}]); | ||
connection.query('INSERT INTO ?? SET ?', [table, {big: '-1111111111111111111'}]); | ||
connection.query('INSERT INTO ?? SET ?', [table, {big: '9007199254740993'}]); | ||
connection.query('INSERT INTO ?? SET ?', [table, {big: '-9007199254740993'}]); | ||
|
||
connection.query('SELECT * FROM ??', [table], function (err, rows) { | ||
assert.ifError(err); | ||
assert.equal(rows.length, 6); | ||
assert.strictEqual(rows[0].big, '9223372036854775807'); | ||
assert.strictEqual(rows[1].big, '-9223372036854775807'); | ||
assert.strictEqual(rows[2].big, '1111111111111111111'); | ||
assert.strictEqual(rows[3].big, '-1111111111111111111'); | ||
assert.strictEqual(rows[4].big, '9007199254740993'); | ||
assert.strictEqual(rows[5].big, '-9007199254740993'); | ||
connection.end(assert.ifError); | ||
}); | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needless whitespace change. This file should probably remain untouched in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How could I miss this. Thanks.