Skip to content

Fix for mysqli bugs #68114 and #68657 - #983

Closed
keyurdg wants to merge 3 commits into
php:PHP-5.5from
keyurdg:PHP-5.5
Closed

keyurdg wants to merge 3 commits into
php:PHP-5.5from
keyurdg:PHP-5.5

Conversation

@keyurdg

@keyurdg keyurdg commented Jan 6, 2015

Copy link
Copy Markdown
Contributor

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.

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()
@laruence

laruence commented Jan 6, 2015

Copy link
Copy Markdown
Member

I am not sure why it (only one function)needs a separate new file?

@keyurdg

keyurdg commented Jan 6, 2015

Copy link
Copy Markdown
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.

@keyurdg keyurdg closed this Jan 7, 2015
@keyurdg

keyurdg commented Jan 7, 2015

Copy link
Copy Markdown
Contributor Author

Merged!

@remicollet

Copy link
Copy Markdown
Member

This have be applied only in master.

But the mysqlnd.so size increase from 200K to >2M in 5.5 / 5.6.
Also need to be fixed there

@laruence

Copy link
Copy Markdown
Member

@remicollet wow, how could that be?

@keyurdg

keyurdg commented Jan 26, 2015

Copy link
Copy Markdown
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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants