Yuan Liu created TRAFODION-2669: ----------------------------------- Summary: Error message of 8402 cause misunderstanding Key: TRAFODION-2669 URL: https://issues.apache.org/jira/browse/TRAFODION-2669 Project: Apache Trafodion Issue Type: Improvement Components: sql-general Affects Versions: any Reporter: Yuan Liu Fix For: any
When insert a value longer than the column data type, the error message caused misunderstanding. Why 21 bytes can not be inserted into 24 bytes? SQL>showddl test_utf8; CREATE TABLE TRAFODION.SEABASE.TEST_UTF8 ( A VARCHAR(6 CHARS) CHARACTER SET UTF8 COLLATE DEFAULT DEFAULT NULL NOT SERIALIZED ) ATTRIBUTES ALIGNED FORMAT ; --- SQL operation complete. SQL>insert into test_utf8 values('我我我我我我'); --- 1 row(s) inserted. SQL>insert into test_utf8 values('我我我我我我我'); *** ERROR[8402] A string overflow occurred during the evaluation of a character expression. Conversion of Source Type:VARCHAR(REC_BYTE_V_ASCII,{color:red}21 BYTES,UTF8{color}) Source Value:我我我我我我我 to Target Type:VARCHAR(REC_BYTE_V_ASCII,{color:red}24 BYTES,UTF8{color}). [2017-06-27 15:44:45] -- This message was sent by Atlassian JIRA (v6.4.14#64029)