-
Notifications
You must be signed in to change notification settings - Fork 374
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
Client Buffered Queries Break FLOAT columns #71
Comments
An update on this. Not only it is returning NULL terminated strings (which could somehow be more or less worked around) but the precission of the result is all messed up, decimal places are being eaten away. This does not happen when client buffered queries are disabled. |
This issue is still present on the PHP7 version of the driver. Using client buffered queries competely breaks the usage of floats. This is directly related to #41 (that was closed who knows why). Can you make type binding behave in the same way wether you use client buffered queries or not? Thanks. |
@david-garcia-garcia We believe this issue was fixed with our latest release here: https://github.com/Azure/msphpsql/releases/tag/4.1.0. Please help us validate. Feel free to open the issue if you need to. |
Works! Just note that the repro script fatals where before it was not (but I understand that trying to stuff a float inside an int has to crash somewhere). Maybe instead of a fatal an exception will be more developer friendly. |
BTW this is the fatal: Buffer length must be able to find a long in sqlsrv_buffered_result_set::double_to_long |
Hi @david-garcia-garcia : the fatal error can not be reproduced using your sample script. Please confirm with the latest release. |
I'm reviving this from issue:
#40
Prefetch statements are returning NULL terminated strings. Indeed, type mapping is messed up to such a point that it is imposible to retrieve a float field from the database when using prefetch.
If you try to retrieve a FLOAT column using client buffered queries, you get a null terminated string, but even worse, there is no way to fix this by calling bindColumn() on the statement.
See sample script:
http://pastebin.com/RUsLBe3J
Disabling CLIENT BUFFERED queries "fixes" the issue. That's like buying an all road car and saying "only using this car in the city fixes the issue" :)
This issue is completely breaking Drupal's locking system when running on MSSQL, basically making it prompt to deadlocks and unusable on high concurrent scenarios. And no, I cannot disable CLIENT BUFFERED queries because it will break the whole integration.
The text was updated successfully, but these errors were encountered: