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

Incorrect results of bitwise operations performed on double data types.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.4
    • Fix Version/s: None
    • Component/s: PrimProc
    • Labels:
      None

      Description

      Bitwise operations on double data type in CS do not produce the same results as InnoDB.

      Here is an example:

       
      MariaDB [test]> create table c1 (a double)engine=columnstore;
      Query OK, 0 rows affected (0.214 sec)
       
      MariaDB [test]> insert into c1 values (1.797693227e108);
      Query OK, 1 row affected (0.193 sec)
       
      MariaDB [test]> select a, a & 0xff, a | 0xff, bit_count(a) from c1;
      +-----------------+----------+---------------------+--------------+
      | a               | a & 0xff | a | 0xff            | bit_count(a) |
      +-----------------+----------+---------------------+--------------+
      | 1.797693227e108 |        0 | 9223372036854776063 |            1 |
      +-----------------+----------+---------------------+--------------+
      1 row in set (0.101 sec)
       
      MariaDB [test]> create table i1 as select * from c1;
      Query OK, 1 row affected (0.071 sec)
      Records: 1  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> select a, a & 0xff, a | 0xff, bit_count(a) from i1;
      +-----------------+----------+---------------------+--------------+
      | a               | a & 0xff | a | 0xff            | bit_count(a) |
      +-----------------+----------+---------------------+--------------+
      | 1.797693227e108 |      255 | 9223372036854775807 |           63 |
      +-----------------+----------+---------------------+--------------+
      1 row in set, 3 warnings (0.001 sec)
      
      

        Attachments

          Activity

            People

            Assignee:
            David.Hall David Hall
            Reporter:
            tntnatbry Gagan Goel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: