[MDEV-29525] CAST in view definition returns string instead of NULL on warning and gives incorrect round Created: 2022-09-13  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.11
Fix Version/s: 10.4, 10.5, 10.6, 10.11

Type: Bug Priority: Major
Reporter: Lena Startseva Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: view-protocol

Issue Links:
PartOf
is part of MDEV-27691 make working view-protocol Open
Relates
relates to MDEV-28651 quote(NULL) returns incorrect result ... Closed

 Description   

Test:

create view v1 as SELECT CAST('9999-12-31 23:59:59.123456' AS INTERVAL DAY_SECOND(6)) AS a, CAST('00:00:00.99' AS INTERVAL DAY_SECOND(6)) as b;
select * from v1;
drop view v1;

Expected result:

a	b
NULL	00:00:00.990000
Warnings:
Warning	1292	Incorrect INTERVAL DAY TO SECOND value: '9999-12-31 23:59:59.123456'

Actual result:

a	b
9999-12-31 23:59:59.1234	00:00:00.99
Warnings:
Warning	1292	Truncated incorrect CHAR(24) value: '9999-12-31 23:59:59.123456'

Not sure that in view and in select warning must be the same


Generated at Thu Feb 08 10:09:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.