[ https://issues.apache.org/jira/browse/TRAFODION-2990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16395522#comment-16395522 ]
David Wayne Birdsall commented on TRAFODION-2990: ------------------------------------------------- Actually, the issue is one layer down from that. The outputColumnLine routine calls LineBreakSqlText (common/NAString.cpp). That routine is mistaking the decimal point as a dot separating two identifiers, and inserting a line break after it. The fix seems to be to teach LineBreakSqlText about decimal points and avoid inserting dots after those. > CREATE TABLE LIKE fails with long numeric default value > ------------------------------------------------------- > > Key: TRAFODION-2990 > URL: https://issues.apache.org/jira/browse/TRAFODION-2990 > Project: Apache Trafodion > Issue Type: Bug > Components: sql-cmp > Affects Versions: 2.3 > Reporter: David Wayne Birdsall > Assignee: David Wayne Birdsall > Priority: Major > > The following script reproduces the problem: > drop table if exists t1 cascade; > drop table if exists new_t1 cascade; > create table t1 ( > val int, > c1 numeric(128,127) default > 1.01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 > ); > insert into t1(val) values (1); > select * from t1; > create table new_t1 like t1; > When run, the CREATE TABLE LIKE statement fails as follows: > >>create table new_t1 like t1; > *** ERROR[15001] A syntax error occurred at or before: > create table TRAFODION.SEABASE.NEW_T1 ( "VAL" > INT DEFAULT NULL NOT SERIALIZED , "C1" NUMERIC(12 > 8, 127) DEFAULT > 1. > > 0123456789012345678901234567890123456789012345678901234567890123456789012 > 3456789012345678901234567890123456789 > ^ (299 characters from start of SQL > statement) > *** ERROR[8822] The statement was not prepared. > --- SQL operation failed with errors. -- This message was sent by Atlassian JIRA (v7.6.3#76005)