ASF GitHub Bot commented on TRAFODION-2990:

GitHub user DaveBirdsall opened a pull request:


    [TRAFODION-2990] Fix CREATE TABLE LIKE having long numeric default constant

    The routine LineBreakSqlText (common/NAString.cpp) was inserting a line 
break after the decimal point in a numeric constant, making one token into two. 
The code has been changed to distinguish between a dot that separates two 
identifiers (a legitimate place to insert line breaks) and decimal points.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/DaveBirdsall/trafodion Trafodion2990

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1469
commit 582ff40280d0f99025a529914ea78533fc6e12bc
Author: Dave Birdsall <dbirdsall@...>
Date:   2018-03-12T17:59:04Z

    [TRAFODION-2990] Fix CREATE TABLE LIKE having long numeric default constant


> 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"
> 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

Reply via email to