Repository navigation
Fixes Bug #63916 PDO::PARAM_INT casts to 32bit int internally even on 64... - #253
Closed
srgoogleguy wants to merge 1 commit into
Closed
srgoogleguy wants to merge 1 commit into
srgoogleguy wants to merge 1 commit into
Conversation
Contributor
|
Patch + tests looks good. Does the same bug happen for ext/sqlite3? |
Contributor
Author
|
hmmm, yes it does. If I run the same reproduce test case through sqlite3 we get the same issue. query('CREATE TABLE users (id INTEGER NOT NULL, num INTEGER NOT NULL, PRIMARY KEY(id))'); $stmt = $conn->prepare('insert into users (id, num) values (:id, :num)'); $stmt->bindValue(':id', 1, SQLITE3_INTEGER); $stmt->bindValue(':num', $num, SQLITE3_INTEGER); $stmt->execute(); $stmt = $conn->query('SELECT num FROM users'); $result = $stmt->fetchArray(); printf("Expected: %d Received: %d\n", $num, $result[0]); ?>Output is: "Expected: 100004313234244 Received: 294714180" I'll have to dig into sqlite3 to see why it's not using the sqlite3_bind_int64 API functions where they're needed. I would have thought this would be the reason they are there, no? |
Contributor
|
@srgoogleguy I'm not sure as I don’t know that much about sqlite3. Would be cool if you could dig into that a little further. |
… 64bit builds in pdo_sqlite.
Contributor
Author
Contributor
|
Looks good. |
|
Comment on behalf of lstrojny at php.net: Merged into 5.4, 5.5 and master |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
...bit builds in pdo_sqlite.