Loading mysql-test/r/type_float.result +7 −0 Original line number Diff line number Diff line Loading @@ -120,3 +120,10 @@ drop table t1; create table t1 (f float(54)); Incorrect column specifier for column 'f' drop table if exists t1; create table t1 (d1 double, d2 double unsigned); insert into t1 set d1 = -1.0; update t1 set d2 = d1; select * from t1; d1 d2 -1 0 drop table t1; mysql-test/t/type_float.test +6 −0 Original line number Diff line number Diff line Loading @@ -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; sql/field_conv.cc +1 −0 Original line number Diff line number Diff line Loading @@ -537,6 +537,7 @@ void field_conv(Field *to,Field *from) if (to->real_type() == from->real_type()) { if (to->pack_length() == from->pack_length() && !(to->flags & UNSIGNED_FLAG && !(from->flags & UNSIGNED_FLAG)) && to->real_type() != FIELD_TYPE_ENUM && to->real_type() != FIELD_TYPE_SET && to->table->db_low_byte_first == from->table->db_low_byte_first) Loading Loading
mysql-test/r/type_float.result +7 −0 Original line number Diff line number Diff line Loading @@ -120,3 +120,10 @@ drop table t1; create table t1 (f float(54)); Incorrect column specifier for column 'f' drop table if exists t1; create table t1 (d1 double, d2 double unsigned); insert into t1 set d1 = -1.0; update t1 set d2 = d1; select * from t1; d1 d2 -1 0 drop table t1;
mysql-test/t/type_float.test +6 −0 Original line number Diff line number Diff line Loading @@ -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;
sql/field_conv.cc +1 −0 Original line number Diff line number Diff line Loading @@ -537,6 +537,7 @@ void field_conv(Field *to,Field *from) if (to->real_type() == from->real_type()) { if (to->pack_length() == from->pack_length() && !(to->flags & UNSIGNED_FLAG && !(from->flags & UNSIGNED_FLAG)) && to->real_type() != FIELD_TYPE_ENUM && to->real_type() != FIELD_TYPE_SET && to->table->db_low_byte_first == from->table->db_low_byte_first) Loading