Skip to content

Conversation

keyurdg
Copy link
Contributor

@keyurdg keyurdg commented Jan 6, 2015

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
Copy link
Member

laruence commented Jan 6, 2015

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

@keyurdg
Copy link
Contributor Author

keyurdg commented Jan 6, 2015

@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
Copy link
Contributor Author

keyurdg commented Jan 7, 2015

Merged!

@remicollet
Copy link
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
Member

@remicollet wow, how could that be?

@keyurdg
Copy link
Contributor Author

keyurdg commented Jan 26, 2015

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