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

truncate(x, d) function does not handle negative values for d for unsigned int types

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • Icebox
    • PrimProc
    • None

    Description

      When d < 0, truncate(x, d) function has no effect on unsigned int family data types (tinyint, smallint, int, bigint).

      Here is an example:

      MariaDB [mcs]> create table t1(a bigint unsigned)engine=columnstore;
      Query OK, 0 rows affected (0.293 sec)
       
      MariaDB [mcs]> insert into t1 value (18446744073709551613);
      Query OK, 1 row affected (0.252 sec)
       
      MariaDB [mcs]> select truncate(a, -19) from t1;
      +----------------------+
      | truncate(a, -19)     |
      +----------------------+
      | 18446744073709551613 |
      +----------------------+
      1 row in set (0.107 sec)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            tntnatbry Gagan Goel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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