Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-20272

PERCENTILE_DISC() crashes on a temporal type input

    Details

      Description

      CREATE OR REPLACE TABLE t1 (name CHAR(30), star_rating TIME);
      INSERT INTO t1 VALUES ('Lord of the Ladybirds', 5);
      INSERT INTO t1 VALUES ('Lord of the Ladybirds', 3);
      INSERT INTO t1 VALUES ('Lady of the Flies', 1);
      INSERT INTO t1 VALUES ('Lady of the Flies', 2);
      INSERT INTO t1 VALUES ('Lady of the Flies', 5);
      SELECT name, PERCENTILE_DISC(0.5)
        WITHIN GROUP (ORDER BY star_rating)
        OVER (PARTITION BY name) AS pc FROM t1;
      

      mysqld: /home/bar/maria-git/server.10.3/sql/field.h:3170: Field_datetime_with_dec::Field_datetime_with_dec(uchar*, uchar*, uchar, Field::utype, const LEX_CSTRING*, uint): Assertion `dec <= 6' failed.
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bar Alexander Barkov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: