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

Fix right truncation issue #1408

Merged
merged 5 commits into from
Sep 13, 2022
Merged

Fix right truncation issue #1408

merged 5 commits into from
Sep 13, 2022

Conversation

absci
Copy link
Contributor

@absci absci commented Aug 30, 2022

No description provided.

@codecov
Copy link

codecov bot commented Aug 30, 2022

Codecov Report

Merging #1408 (6828586) into dev (109b8bc) will decrease coverage by 0.02%.
The diff coverage is n/a.

❗ Current head 6828586 differs from pull request most recent head 9dd14f4. Consider uploading reports for the commit 9dd14f4 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1408      +/-   ##
==========================================
- Coverage   83.61%   83.59%   -0.03%     
==========================================
  Files          22       22              
  Lines        7853     7849       -4     
==========================================
- Hits         6566     6561       -5     
- Misses       1287     1288       +1     
Impacted Files Coverage Δ
...s16/x86/php-8.0.19-src/ext/pdo_sqlsrv/pdo_stmt.cpp
...x86/php-8.0.19-src/ext/sqlsrv/shared/core_sqlsrv.h
...6/php-8.0.19-src/ext/sqlsrv/shared/core_stream.cpp
...phpdev/vs16/x86/php-8.0.19-src/ext/sqlsrv/init.cpp
...php-8.0.19-src/ext/pdo_sqlsrv/shared/core_stmt.cpp
...php-8.0.19-src/ext/pdo_sqlsrv/shared/core_util.cpp
...php-8.0.19-src/ext/pdo_sqlsrv/php_pdo_sqlsrv_int.h
...-8.0.19-src/ext/pdo_sqlsrv/shared/core_results.cpp
...s16/x86/php-8.0.19-src/ext/pdo_sqlsrv/pdo_init.cpp
...phpdev/vs16/x86/php-8.0.19-src/ext/sqlsrv/util.cpp
... and 34 more

@talkinnl
Copy link
Contributor

talkinnl commented Sep 6, 2022

Feel free to adopt the tests of #1404 inside this PR. Might raise codecov and also proves that the fix works. :)

Regresssion tests: Use the same Statement to insert a row with short strings first, and longer strings second.

- Issue also happens with VARCHAR( >=4002 ). Not just Max or NVARCHAR
- Issues 1391, 1393 (and possibly 1371 ?) might all have the same root cause.
@absci
Copy link
Contributor Author

absci commented Sep 6, 2022

Feel free to adopt the tests of #1404 inside this PR. Might raise codecov and also proves that the fix works. :)

I have pulled your unit test to this PR. Seems the fix is working but somehow the test throws a Warning: Array to string conversion in /home/vsts/work/1/s/test/functional/pdo_sqlsrv/pdo_1391_string_truncation_after_short_string.php on line 56

@talkinnl
Copy link
Contributor

talkinnl commented Sep 7, 2022

@absci : My bad, fetchAll() should've been fetch()

@talkinnl
Copy link
Contributor

talkinnl commented Sep 7, 2022

I've updated my branch and PR. But it just comes down to replacing 'fetchAll()' by 'fetch()'.

@absci
Copy link
Contributor Author

absci commented Sep 7, 2022

I've updated my branch and PR. But it just comes down to replacing 'fetchAll()' by 'fetch()'.

Thanks, all tests passed now.

Copy link
Contributor

@v-mabarw v-mabarw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please separate the additional trigger into another PR.

@talkinnl
Copy link
Contributor

@absci and reviewers: Thanks for the quick review and merge! 🥇

May I ask if you've got a date set for the next fix version? Sorry if I come across a bit pushy, but I'm just excited to be a able to update a huge Doctrine project to PHP 8.1. :)

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