[MDEV-14596] Crash in INTERVAL(ROW(..),ROW(..)) Created: 2017-12-06  Updated: 2017-12-08  Resolved: 2017-12-08

Status: Closed
Project: MariaDB Server
Component/s: Data types
Affects Version/s: 5.5, 10.0, 10.1, 10.2, 10.3
Fix Version/s: 5.5.59, 10.0.34, 10.1.30, 10.2.12, 10.3.3

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

Issue Links:
Relates
relates to MDEV-14228 MariaDB crashes with function Closed

 Description   

This query crashes the server:

SELECT INTERVAL(ROW(1,1),ROW(1,2));



 Comments   
Comment by Alexander Barkov [ 2017-12-07 ]

A related problem:

This script erroneously return a result, it should return an error instead,
as it mixes ROW and scalar expressions in the INTERVAL function:

SET sql_mode=DEFAULT;
DELIMITER $$
BEGIN NOT ATOMIC
  DECLARE v ROW(a INT);
  SELECT INTERVAL(v,'a','b');
END $$
DELIMITER ;

+---------------------+
| INTERVAL(v,'a','b') |
+---------------------+
|                  -1 |
+---------------------+

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