Silent UNSIGNED - SIGNED conversion with STRICT mode

Bug #1700652 reported by Sveta Smirnova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Won't Fix
Medium
Unassigned
5.6
Triaged
Medium
Unassigned
5.7
Triaged
Medium
Unassigned

Bug Description

Description:
With STRICT mode if stored routine called with unsigned int argument and tries to use it update signed column in a table update succeeds and no warning issued.

How to repeat:
set sql_mode='strict_all_tables';

Warnings:
Warning 3135 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.

create table t1(f1 int) engine=innodb;

delimiter |
create procedure p1(v1 int unsigned)
begin
insert into t1 values(v1);
end
|
delimiter ;

call p1(2280017636);

select * from t1;
f1
-2014949660

drop procedure p1;
drop table t1;

tags: added: upstream
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1809

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.