Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4116

working_dml/subupd003.sql bad results

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.2, 1.2
    • Fix Version/s: 1.5.3
    • Component/s: DMLProc
    • Labels:
      None
    • Sprint:
      2020-7

      Description

      In working_dml/misc/subupd003.sql, we find the following query:

      set autocommit=0;
      UPDATE sub1 SET c2 = (SELECT SUM(sub2.c3) FROM sub2 where sub1.c1=sub2.c1);

      // And to see what happened:
      select * from sub1;
      rollback;

      In Columnstore 1.5 when run from clent, we get:
      ERROR 1264 (22003): CAL0002: IDB-2025: Data truncated for column 'c2'

      In columnstore 1.2 and in 1.5 when run in the test suite, we get:
      ---------------------------------+

      c1 c2 c3 s1 s2 s3

      ---------------------------------+

      1 -2147483646 1 1 1 1
      2 -2147483646 2 2 2 2
      3 -2 3 3 3 3
      4 -2 1 1 1 1
      5 -2 99 99 99 99
      6 -2147483646 NULL NULL NULL NULL

      ---------------------------------+

      This is incorrect. The correct answer is (gleaned from a reference innodb):
      --------------------------+

      c1 c2 c3 s1 s2 s3

      --------------------------+

      1 6 1 1 1 1
      2 9 2 2 2 2
      3 NULL 3 3 3 3
      4 NULL 1 1 1 1
      5 NULL 99 99 99 99
      6 2 NULL NULL NULL NULL

      --------------------------+

        Attachments

          Activity

            People

            Assignee:
            dleeyh Daniel Lee
            Reporter:
            David.Hall David Hall
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: