Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix output length error and output buffer. #1255

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

Merged
merged 2 commits into from
May 28, 2023
Merged

Fix output length error and output buffer. #1255

merged 2 commits into from
May 28, 2023

Conversation

jgebal
Copy link
Member

@jgebal jgebal commented May 28, 2023

When dealing with multibyte strings, the substring limit of 4000 chars is not correct. We need to apply a limit of 4000 bytes to both VARCHAR2 and to CLOB data types. This means we need to have a function to calculate lenght of CLOB in bytes. This is now added and all the conversions/trimming/string-splitting is done using the string length in bytes

Additionally, a different approach (with sequences) was introduced into output buffers to avoid the sometime occurring PK violation on the output buffer tables. The new approach may add a but overhead on reading from / saving into buffer, but will definitely address the threat of PK errors.

Resolves #1254
Resolves #1128

When dealing with multibyte strings, the substring limit of 4000 **chars** is not correct.
We need to apply a limit of 4000 **bytes** to both VARCHAR2 and to CLOB data types.
This means we need to have a function to calculate lenght of CLOB in bytes.
This is now added and all the conversions/trimming/string-splitting is done using the string length in **bytes**

Additionally, a different approach (with sequences) was introduced into output buffers to avoid the sometime occurring PK violation on the output buffer tables.
The new approach may add a but overhead on reading from / saving into buffer, but will definitely address the threat of PK errors.

Resolves #1254
Resolves #1128
Replaced all regexp ranges with posix representations to avoid NLS_SORT impact on regex behavior.
@jgebal jgebal self-assigned this May 28, 2023
@jgebal jgebal added the bugfix label May 28, 2023
@jgebal jgebal added this to the v3.1.14 milestone May 28, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 28, 2023

Unit Test Results

       1 files         2 suites   5m 39s ⏱️
1 053 tests 1 049 ✔️ 4 💤 0
1 057 runs  1 049 ✔️ 8 💤 0

Results for commit b70ee1e.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented May 28, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.12 🎉

Comparison is base (020150f) 94.67% compared to head (b70ee1e) 94.80%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1255      +/-   ##
===========================================
+ Coverage    94.67%   94.80%   +0.12%     
===========================================
  Files          111      111              
  Lines         5374     5372       -2     
  Branches        33       34       +1     
===========================================
+ Hits          5088     5093       +5     
+ Misses         278      271       -7     
  Partials         8        8              
Flag Coverage Δ
11XE 94.43% <100.00%> (+0.23%) ⬆️
12.1EE 94.43% <100.00%> (+0.15%) ⬆️
18XE 94.61% <100.00%> (+0.11%) ⬆️
21XE 94.78% <100.00%> (+0.11%) ⬆️
23free 94.42% <100.00%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...urce/core/output_buffers/ut_output_buffer_base.tpb 76.36% <ø> (-0.43%) ⬇️
...urce/core/output_buffers/ut_output_bulk_buffer.tpb 88.67% <ø> (+1.17%) ⬆️
...ore/output_buffers/ut_output_clob_table_buffer.tpb 95.23% <100.00%> (-0.51%) ⬇️
...rce/core/output_buffers/ut_output_table_buffer.tpb 94.00% <100.00%> (+10.36%) ⬆️
source/core/ut_utils.pkb 94.66% <100.00%> (+0.15%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@jgebal jgebal merged commit fa3b3b0 into develop May 28, 2023
@jgebal jgebal deleted the bugfix/fix_1254 branch May 28, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant