1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix over-optimization that could result in an unsigned double field being

set to a negative value. (Bug #7700)


sql/field_conv.cc:
  Don't treat real fields as identical when destination is unsigned and
  the source is not.
mysql-test/t/type_float.test:
  Add test for setting double unsigned to a negative value from a signed double
mysql-test/r/type_float.result:
  Add test results
This commit is contained in:
unknown
2005-01-17 16:13:56 -08:00
parent d3ad1a919e
commit dd68385435
3 changed files with 14 additions and 0 deletions

View File

@ -67,3 +67,9 @@ drop table t1;
create table t1 (f float(54)); # Should give an error
drop table if exists t1;
# Don't allow 'double unsigned' to be set to a negative value (Bug #7700)
create table t1 (d1 double, d2 double unsigned);
insert into t1 set d1 = -1.0;
update t1 set d2 = d1;
select * from t1;
drop table t1;