Skip to content
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

Extend output buffer sizes with SQL decimals or numerics #775

Merged
merged 1 commit into from
May 18, 2018
Merged

Extend output buffer sizes with SQL decimals or numerics #775

merged 1 commit into from
May 18, 2018

Conversation

yitam
Copy link
Contributor

@yitam yitam commented May 17, 2018

When the sql type is strictly defined (e.g. decimal(1,0)), the column size is only 1. Since decimals and numerics are treated as strings, the initial values of the output params with trailing zeros are dropped in convert_to_string() as well.

Thus the output buffer sizes are not enough for negative numbers (with a negative sign) and/or decimals.

See the similar issue #705


This change is Reviewable

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 73.185% when pulling 64e2241 on yitam:vso2913 into 196fe49 on Microsoft:dev.

@codecov-io
Copy link

Codecov Report

Merging #775 into dev will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #775      +/-   ##
==========================================
+ Coverage   78.92%   78.96%   +0.03%     
==========================================
  Files          25       25              
  Lines        7213     7215       +2     
==========================================
+ Hits         5693     5697       +4     
+ Misses       1520     1518       -2
Impacted Files Coverage Δ
...php-7.1.17-src/ext/pdo_sqlsrv/shared/core_stmt.cpp 66.34% <0%> (+0.03%) ⬆️
...x86/php-7.1.17-src/ext/sqlsrv/shared/core_stmt.cpp 83.44% <0%> (+0.23%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 196fe49...64e2241. Read the comment docs.

@yitam yitam requested a review from david-puglielli May 17, 2018 20:57
@yitam yitam merged commit 84f0168 into microsoft:dev May 18, 2018
@yitam yitam deleted the vso2913 branch May 18, 2018 14:50
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.

4 participants