Fix for mysqli bugs #68114 and #68657#983
Closed
keyurdg wants to merge 3 commits intophp:PHP-5.5from
keyurdg:PHP-5.5
Closed
Fix for mysqli bugs #68114 and #68657#983keyurdg wants to merge 3 commits intophp:PHP-5.5from keyurdg:PHP-5.5
keyurdg wants to merge 3 commits intophp:PHP-5.5from
keyurdg:PHP-5.5
Conversation
and #68657 (Reading 4 byte floats with Mysqli and libmysqlclient has rounding errors). The patch removes support for Decimal floating point numbers and now defaults to using similar logic as what libmysqlclient does: convert a 4 byte floating point number into a string, and then the string into a double. The quirks of MySQL are maintained as seen in Field_Float::val_str()
Member
|
I am not sure why it (only one function)needs a separate new file? |
Contributor
Author
|
@laruence I could just make it a static inline function in a header file and move it to ext/msysqlnd if that's preferable. I put it into a separate file just as a personal style preference. |
a header file.
Contributor
Author
|
Merged! |
Member
|
This have be applied only in master. But the mysqlnd.so size increase from 200K to >2M in 5.5 / 5.6. |
Member
|
@remicollet wow, how could that be? |
Contributor
Author
|
For some reason the commits in the PHP-5.5 and 5.6 branches didn't get pushed to origin. I pushed them in and now things should be back to normal. Thanks! |
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.
I put the float_to_double() method into ext/standard but if there's a better location, please let me know and I'll fix it up.
With this patch, floating point values from PDO+libmysqlclient match mysqli's values both with mysqlnd and libmysqlclient.