[MDEV-29524] "-0000000000000001" changes to "-1" in view definition, so type changes from bigint to int 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.10, 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

Attachments: File v1.frm    
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:

SET SESSION debug_dbug="+d,Item_basic_value";
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
create view v1 as SELECT * FROM t1 WHERE a BETWEEN -0000000000000001 AND -1;
select * from v1;
drop view v11;
drop table t1;

Expected result:

a
Warnings:
Note	1105	bin_eq=1 a=(bigint)-1 b=(int)-1

Actual result:

a
Warnings:
Note	1105	bin_eq=1 a=(int)-1 b=(int)-1


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