Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-2990

CREATE TABLE LIKE fails with long numeric default value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3
    • 2.3
    • sql-cmp
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              dbirdsall Dave Birdsall
              dbirdsall Dave Birdsall
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: