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 support for non-ASCII characters in Oracle CLOBs #1184

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Nov 19, 2024

  1. Move table creator helpers to the start of Oracle test

    No real changes, just make it possible to use these helpers in the unit
    test to be added.
    
    This commit is best viewed using Git --color-moved option.
    vadz committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    d089386 View commit details
    Browse the repository at this point in the history
  2. Make procedure_creator_base helper more flexible and rename it

    This will allow to use it for creating functions as well as procedures
    (and also procedures with a name other than "soci_test" if this is ever
    needed).
    vadz committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    2b9afba View commit details
    Browse the repository at this point in the history
  3. Read entire Oracle CLOB and not just its length in characters

    We need to read the entire contents of the CLOB in Oracle backend and
    not just the number of bytes corresponding to its length in characters
    as returned by OCILobGetLength() because this may (and will) be strictly
    less than its full size in bytes for any encoding using multiple bytes
    per character, such as the de facto standard UTF-8.
    
    Also make reading CLOBs more efficient by doing what Oracle
    documentation suggests and using the LOB chunk size for reading.
    
    Finally, add a unit test checking that using non-ASCII strings in UTF-8
    (which had to be enabled for the CI) with CLOBs does work.
    
    This commit is best viewed ignoring whitespace-only changes.
    vadz committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    5e9f200 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2024

  1. Remove unused offset from OCILobRead() calls

    On "streaming mode" the offset is ignored, except for the first call, so
    don't bother updating it.
    
    Also restructure the code in a slightly simpler way.
    vadz committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    ba202d0 View commit details
    Browse the repository at this point in the history
  2. Avoid extra copy of the data in oracle::read_from_lob()

    Read directly into the provided string instead of reading into a
    temporary buffer and then copying into the string.
    vadz committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    0db5797 View commit details
    Browse the repository at this point in the history