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

Columnstore query returns incorrect value instead of expected out-of-range error

    XMLWordPrintable

Details

    • 2023-11

    Description

      create schema coltest; use coltest;
      drop table if exists test_mult;
      create table test_mult (
      indemnity_paid int(11),
      n_clms tinyint(3) unsigned
      ) engine=columnstore;
      insert into test_mult (indemnity_paid, n_clms) values (-10, 1);
      select indemnity_paid, n_clms, indemnity_paid * n_clms from test_mult;
      +----------------+--------+-------------------------+
      | indemnity_paid | n_clms | indemnity_paid * n_clms |
      +----------------+--------+-------------------------+
      |            -10 |      1 |    18446744073709551606 |
      +----------------+--------+-------------------------+
      

      The multiplication produces an incorrect value.
      For the same table defined engine=innodb, the multiplication produces an expected out-of-range error:

      alter table test_mult engine=innodb;
      select indemnity_paid, n_clms, indemnity_paid * n_clms from test_mult;
      ERROR 1690 (22003): BIGINT UNSIGNED value is out of range in '`coltest`.`test_mult`.`indemnity_paid` * `coltest`.`test_mult`.`n_clms`'
      

      Attachments

        Activity

          People

            sergey.zefirov Sergey Zefirov
            edward Edward Stoever
            Roman Roman
            Kirill Perov Kirill Perov (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            8 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.