[MDEV-20272] PERCENTILE_DISC() crashes on a temporal type input Created: 2019-08-07  Updated: 2019-08-07  Resolved: 2019-08-07

Status: Closed
Project: MariaDB Server
Component/s: Data types, Optimizer - Window functions
Affects Version/s: 10.3, 10.4, 10.5
Fix Version/s: 10.3.18, 10.4.8

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MDEV-20273 Add class Item_sum_min_max Closed
Relates
relates to MDEV-20278 PERCENTILE_DISC() returns a wrong dat... Closed
relates to MDEV-20280 PERCENTILE_DISC() rejects temporal an... Closed

 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.


Generated at Thu Feb 08 08:58:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.