Improve explanation about string overflow when trying to create login with non-ascii characters and number of octets in it more than 31 [CORE4883] #5177
SQL> create or alter user "Спасопреображенский" password '123';
Statement failed, SQLSTATE = 22001
arithmetic exception, numeric overflow, or string truncation
-string right truncation
-expected length 31, actual 19
This error actually says that number of OCTETS in login multi-byte representation exceeded limit of 31.
Can this message be corrected in order not to see strange "expected length 31, actual 19" ?
AFAIK users are stored as UNICODE_FSS, so the errors shouldn't occur at all. It looks like there is a flawed check on byte length and not on character length.
Submitted by: @pavel-zotov
chcp 1251 isql -ch win1251 localhost/3333:e30
SQL> create or alter user "Спасопреображенский" password '123'; Statement failed, SQLSTATE = 22001 arithmetic exception, numeric overflow, or string truncation -string right truncation -expected length 31, actual 19
This error actually says that number of OCTETS in login multi-byte representation exceeded limit of 31. Can this message be corrected in order not to see strange "expected length 31, actual 19" ?