Bug Report
IvorySQL Version
master at c3529ba4789ee220caefc858e58bbe6f1563ad14
Current Behavior
numtodsinterval error message (contrib/ivorysql_ora/src/builtin_functions/datetime_datatype_functions.c:1557): NUMTODSINTERVAL(1, 'xxx') reports "illegal argument for function numtoyminterval" — a copy-paste from the sibling function (line 1489 has the correct message).
ora_ascii returns the first byte of a multibyte character (character_datatype_functions.c:2379-2385, 2434): in a UTF-8 database, ASCII('日') (via sys.ascii(sys.oravarcharchar)) returns 230 (the leading byte) instead of the code point 26085. The core ascii() in oracle_compat.c:950 already decodes the code point correctly; the two are inconsistent. Empty string handling (NULL, matching Oracle) must be preserved.
Expected behavior/code
- "illegal argument for function numtodsinterval"
- For the string cases, keep the empty-string NULL behavior and otherwise delegate to the core
ascii() (with an extern declaration)
Bug Report
IvorySQL Version
masteratc3529ba4789ee220caefc858e58bbe6f1563ad14Current Behavior
numtodsintervalerror message (contrib/ivorysql_ora/src/builtin_functions/datetime_datatype_functions.c:1557):NUMTODSINTERVAL(1, 'xxx')reports "illegal argument for function numtoyminterval" — a copy-paste from the sibling function (line 1489 has the correct message).ora_asciireturns the first byte of a multibyte character (character_datatype_functions.c:2379-2385, 2434): in a UTF-8 database,ASCII('日')(viasys.ascii(sys.oravarcharchar)) returns 230 (the leading byte) instead of the code point 26085. The coreascii()inoracle_compat.c:950already decodes the code point correctly; the two are inconsistent. Empty string handling (NULL, matching Oracle) must be preserved.Expected behavior/code
ascii()(with anexterndeclaration)