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

LP Bug: 1452932 - Last 2 or 1 character got trucated when insert 200K or 199999 long string to a SQL table's varchar column

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 2.0-incubating
    • client-odbc-linux
    • None

    Description

      Seems there is a bug in ODBC driver. When insert a 200K long string to the varchar column, the last 2 characters will be truncated and replaced by 2 blanks. Insert of 199999 long string to the varchar column has similar issue, the last character will be truncated and replaced by 1 blank. Insert of any string <=199998 works fine.

      To reproduce:
      create a table which has varchar column, eg. create table T1(c1 varchar(200000), c2 char(200000));

      insert a 200K long string to column c1
      select * from c1 --> you will see the last 2 characters are truncated and replaced with 2 blank character

      insert a 199999 long string to column c1
      select * from c1 --> you will see the last character is truncated and replaced with 1 blank character

      Attachments

        Activity

          People

            arvind.narain Arvind Narain
            zhangjie JiepingZhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: