[
https://issues.apache.org/jira/browse/TRAFODION-1267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Weiqing Xu updated TRAFODION-1267:
----------------------------------
Fix Version/s: (was: 2.1-incubating)
2.3-incubating
> LP Bug: 1463340 - java.sql.SQLException: *** ERROR[8402] A string overflow
> occurred during the evaluation of a character expression. Conversion of
> Source Type:NCHAR VARYING(REC_NCHAR_V_UNICODE,96000 BYTES,UTF8) Source Value
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TRAFODION-1267
> URL: https://issues.apache.org/jira/browse/TRAFODION-1267
> Project: Apache Trafodion
> Issue Type: Bug
> Components: client-jdbc-t2
> Reporter: YuBo
> Assignee: Weiqing Xu
> Fix For: 2.3-incubating
>
>
> Defect Description:
> When insert UCS2 charset with 32K or 200K column length, an error
> "java.sql.SQLException: *** ERROR[8402] A string overflow occurred during the
> evaluation of a character expression. Conversion of Source Type:NCHAR
> VARYING(REC_NCHAR_V_UNICODE,96000 BYTES,UTF8) Source Value" will be happened.
> Test Environment:
> codes' version: commit 1c7265ab7addcd088151904b9139337a29a52d90
> Test Steps:
> Step 1. create a table.
> 405 sql = "create table tblcolumnsize32kWithUCS2(c1 char(16000)
> character set UCS2 collate default null, c2 char(16000) character set UCS2
> collate default null)";
> Step 2. insert UCS2 sql text.
> 409 String a = "";
> 410 String b = "";
> 411
> 412 for (int i = 1; i < 16000; i++) {
> 413 //a += URLEncoder.encode("a", "UTF-16BE");
> 414 //b += URLEncoder.encode("b", "UTF-16BE");
> 415 a += new String("a".getBytes(), "UTF-16BE");
> 416 b += new String("b".getBytes(), "UTF-16BE");
> 417 }
> 418
> 419 //a += URLEncoder.encode("E", "UTF-16BE");
> 420 //b += URLEncoder.encode("E", "UTF-16BE");
> 421 a += new String("E".getBytes(), "UTF-16BE");
> 422 b += new String("E".getBytes(), "UTF-16BE");
> 423
> 424 sql = "insert into tblcolumnsize32kWithUCS2(c1, c2) values('" + a
> + "', '" + b +"')";
> 425 iRet = stmt.executeUpdate(sql);
> 426 assertEquals(1, iRet);
> in the step 2, there is an error happened when execute the line 425, here is
> the console output:
> -bash-4.1$ java -Dprop=t2prop TestBigColumnSize
> Jun 09, 2015 9:49:58 AM TestBigColumnSize <clinit>
> INFO: ============= START ALL TEST CASES =============
> ---
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in
> [jar:file:/opt/home/yubo/trafodion/sqf/sql/local_hadoop/hbase-0.98.6-cdh5.3.0/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/opt/home/yubo/trafodion/sqf/sql/local_hadoop/hadoop-2.5.0-cdh5.3.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.
> SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
> java.sql.SQLException: *** ERROR[8402] A string overflow occurred during the
> evaluation of a character expression. Conversion of Source Type:NCHAR
> VARYING(REC_NCHAR_V_UNICODE,96000 BYTES,UTF8) Source
> Value:����������������ï¿
> *** ERROR[8402] A string overflow occurred during the evaluation of a
> character expression. Conversion of Source Type:NCHAR
> VARYING(REC_NCHAR_V_UNICODE,96000 BYTES,UTF8) Source
> Value:����������������ï¿
> java.sql.SQLException: *** ERROR[8402] A string overflow occurred during the
> evaluation of a character expression. Conversion of Source Type:NCHAR
> VARYING(REC_NCHAR_V_UNICODE,96000 BYTES,UTF8) Source
> Value:����������������ï¿
> at org.trafodion.jdbc.t2.SQLMXStatement.executeDirect(Native Method)
> at
> org.trafodion.jdbc.t2.SQLMXStatement.executeUpdate(SQLMXStatement.java:461)
> at
> TestBigColumnSize.test$32KColSizeWithUCS2(TestBigColumnSize.java:425)
> at TestBigColumnSize.main(TestBigColumnSize.java:21)
> ---
> java.sql.SQLException: *** ERROR[8402] A string overflow occurred during the
> evaluation of a character expression. Conversion of Source Type:NCHAR
> VARYING(REC_NCHAR_V_UNICODE,600000 BYTES,UTF8) Source
> Value:����������������ï¿
> *** ERROR[8402] A string overflow occurred during the evaluation of a
> character expression. Conversion of Source Type:NCHAR
> VARYING(REC_NCHAR_V_UNICODE,600000 BYTES,UTF8) Source
> Value:����������������ï¿
> java.sql.SQLException: *** ERROR[8402] A string overflow occurred during the
> evaluation of a character expression. Conversion of Source Type:NCHAR
> VARYING(REC_NCHAR_V_UNICODE,600000 BYTES,UTF8) Source
> Value:����������������ï¿
> at org.trafodion.jdbc.t2.SQLMXStatement.executeDirect(Native Method)
> at
> org.trafodion.jdbc.t2.SQLMXStatement.executeUpdate(SQLMXStatement.java:461)
> at
> TestBigColumnSize.test$200KColSizeWithUCS2(TestBigColumnSize.java:210)
> at TestBigColumnSize.main(TestBigColumnSize.java:24)
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)