On 16-05-2022 16:50, Mark Rotteveel wrote:
I was running some tests against Firebird-5.0.0.494-0_x64 (latest snapshot, from last Saturday), and I notice that I get incorrect string right truncation errors with CHAR/VARCHAR.

I currently cannot dive deeper into it, but as a datapoint, the error does not occur with Firebird-5.0.0.488-0_x64.

Based solely on the commit message, maybe this commit is at fault? https://github.com/FirebirdSQL/firebird/commit/dd18a3b11b28c3ed8126a6f54b829989954bfa03

The Jaybird test that triggers this is org.firebirdsql.jdbc.TestFBPreparedStatementUTF8, specifically tests:

- connectionUtf8_insertMultiByte_inWin1252_char_1_win1252_succeeds (fails with "expected length 1, actual 2") - connectionUtf8_insertMultiByte_notInWin1252_char_1_win1252_fails (fails with "expected length 1, actual 2", should fail with "Cannot transliterate character between character sets") - connectionUtf8_insertMultipleInWin1252_char_5_win1252_succeeds (fails with "expected length 5, actual 8") - connectionUtf8_insertMultipleInWin1252_varchar_5_win1252_succeeds (fails with "expected length 5, actual 8") - connectionUtf8_insertMultipleInWin1252_lessThanMax_varchar_5_win1252_succeeds (fails with "expected length 5, actual 6") -connectionUtf8_insertMultiByte_char_1_utf8_succeeds (fails with "expected length 1, actual 2") - connectionUtf8_insertMultiple_char_5_utf8_succeeds (fails with "expected length 5, actual 8") - connectionUtf8_insertMultiple_varchar_5_utf8_succeeds (fails with "expected length 5, actual 8") - connectionUtf8_insertMultiple_lessThanMax_varchar_5_utf8_succeeds (fails with "expected length 5, actual 6")

For CHAR, it seems to count 1 more character, for VARCHAR 2-3 more characters.

Mark
--
Mark Rotteveel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to