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

2-argument CRC32 call upon Columnstore table returns a wrong value

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • 6.3.1
    • PrimProc
    • None

    Description

      preview-10.8-MDEV-27265-misc 6e615c62b8

      MariaDB [test]> create table tc (a int unsigned, b varchar(8)) engine=Columnstore;
      Query OK, 0 rows affected (0.374 sec)
       
      MariaDB [test]> insert into tc values (1,'foo');
      Query OK, 1 row affected (0.224 sec)
       
      MariaDB [test]> select a, b, crc32(a,b), crc32(a,'foo'), crc32(1,b), crc32(1,'foo') from tc;
      +------+------+------------+----------------+------------+----------------+
      | a    | b    | crc32(a,b) | crc32(a,'foo') | crc32(1,b) | crc32(1,'foo') |
      +------+------+------------+----------------+------------+----------------+
      |    1 | foo  | 2212294583 |     2212294583 | 2212294583 |     2377191190 |
      +------+------+------------+----------------+------------+----------------+
      1 row in set (0.076 sec)
      

      So, whichever argument of the function is read from the table, the result ends up to be wrong.

      With a one-argument version it seems to work all right:

      MariaDB [test]> select a, b, crc32(b), crc32('foo') from tc;
      +------+------+------------+--------------+
      | a    | b    | crc32(b)   | crc32('foo') |
      +------+------+------------+--------------+
      |    1 | foo  | 2356372769 |   2356372769 |
      +------+------+------------+--------------+
      1 row in set (0.011 sec)
      

      With a two-argument function and a more conventional engine it also works all right:

      MariaDB [test]> create table ti (a int unsigned, b varchar(8)) engine=InnoDB;
      Query OK, 0 rows affected (0.012 sec)
       
      MariaDB [test]> insert into ti values (1,'foo');
      Query OK, 1 row affected (0.002 sec)
       
      MariaDB [test]> select a, b, crc32(a,b), crc32(a,'foo'), crc32(1,b), crc32(1,'foo') from ti;
      +------+------+------------+----------------+------------+----------------+
      | a    | b    | crc32(a,b) | crc32(a,'foo') | crc32(1,b) | crc32(1,'foo') |
      +------+------+------------+----------------+------------+----------------+
      |    1 | foo  | 2377191190 |     2377191190 | 2377191190 |     2377191190 |
      +------+------+------------+----------------+------------+----------------+
      1 row in set (0.000 sec)
      

      CRC32C function is not a subject of this report, because it's rejected as unsupported by Columnstore right away:

      MariaDB [test]> select crc32c(a,b) from tc;
      ERROR 1178 (42000): The storage engine for the table doesn't support MCS-1001: Function 'crc32c' isn't supported.
      

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            elenst Elena Stepanova made changes -
            Summary 2-argument CRC32 upon Columnstore table returns a different value 2-argument CRC32 upon Columnstore table returns a wrong value
            elenst Elena Stepanova made changes -
            Summary 2-argument CRC32 upon Columnstore table returns a wrong value 2-argument CRC32 call upon Columnstore table returns a wrong value
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Roman [ drrtuy ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            elenst Elena Stepanova made changes -
            Component/s Server [ 13907 ]
            Component/s Storage Engine - ColumnStore [ 17600 ]
            Fix Version/s 10.8 [ 26121 ]
            Key MDEV-27519 MCOL-4966
            Affects Version/s N/A [ 24311 ]
            Affects Version/s N/A [ 14700 ]
            Workflow MariaDB v4 [ 161463 ] MariaDB ColumnStore workflow [ 161616 ]
            Project MariaDB Server [ 10000 ] MariaDB ColumnStore [ 10902 ]
            elenst Elena Stepanova made changes -
            Priority Critical [ 2 ] Major [ 3 ]
            drrtuy Roman made changes -
            Component/s PrimProc [ 13700 ]
            Fix Version/s 6.2.4 [ 27301 ]
            Resolution Fixed [ 1 ]
            Status In Review [ 10002 ] Closed [ 6 ]
            toddstoffel Todd Stoffel (Inactive) made changes -
            Fix Version/s 6.3.1 [ 25801 ]
            Fix Version/s 6.2.4 [ 27301 ]

            People

              drrtuy Roman
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.