bamaer opened a new pull request, #8446: URL: https://github.com/apache/hop/pull/8446
… JDBC calls the driver expects Writing to an Oracle `NVARCHAR2`, `NCHAR` or `NCLOB` through `setString` converts the value to the **database** character set on the way in, destroying anything that character set cannot represent. Batches mixing short and long values could also raise `ORA-01461`. Each Oracle string is now bound with the call its column needs — `setNString` for national character columns, `setNCharacterStream` / `setCharacterStream` for LOBs, `setString` otherwise, with `setFormOfUse` applied first. This is an `IValueBinding` declared through Oracle's own type rules, so `Database.setValue` is unchanged and no other dialect is affected. Reads are untouched by design. The binding needs to know the column type, which a row on its way into a table does not carry, so `enrichInsertRowMeta` reads it from the target table once per prepared statement. That is what the new `IDatabase` default method is for; every other dialect ignores it. **Why the suite gains a second database:** on a Unicode database `setString` converts losslessly and the fault does not occur, so `0010` needs a non-Unicode one to reproduce it. `0009` runs the same pipelines against the existing container as a regression guard. Verified: against `WE8MSWIN1252` the tests fail without this fix and pass with it; against AL32UTF8 they pass either way. **Verification** - Oracle integration suite 10/10; `0010` fails on unpatched `main` with `ORA-20091` - 18 new unit tests; `core` (1405), Oracle, Generic, Table Output and Synchronize After Merge all green - Confirmed in production at a customer site on Oracle 19c ------------------------ Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Run `mvn clean install apache-rat:check` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [x] If you have a group of commits related to the same change, please squash your commits into one and force push your branch using `git rebase -i`. - [x] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) you have to acknowledge this by using the following check-box. - [x] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
