Loading mysql-test/r/type_decimal.result +9 −0 Original line number Diff line number Diff line Loading @@ -811,5 +811,14 @@ insert into t1 values (-0.123456,0.123456); select group_concat(f1),group_concat(f2) from t1; group_concat(f1) group_concat(f2) -0.123456 0.123456 create table t1 ( ua_id decimal(22,0) not null, ua_invited_by_id decimal(22,0) default NULL, primary key(ua_id) ); insert into t1 values (123, NULL), (456, NULL); this must not produce error 1048: select * from t1 where ua_invited_by_id not in (select ua_id from t1); ua_id ua_invited_by_id drop table t1; End of 5.0 tests sql/item.cc +1 −1 Original line number Diff line number Diff line Loading @@ -4551,7 +4551,7 @@ int Item::save_in_field(Field *field, bool no_conversions) my_decimal decimal_value; my_decimal *value= val_decimal(&decimal_value); if (null_value) return set_field_to_null(field); return set_field_to_null_with_conversions(field, no_conversions); field->set_notnull(); error=field->store_decimal(value); } Loading Loading
mysql-test/r/type_decimal.result +9 −0 Original line number Diff line number Diff line Loading @@ -811,5 +811,14 @@ insert into t1 values (-0.123456,0.123456); select group_concat(f1),group_concat(f2) from t1; group_concat(f1) group_concat(f2) -0.123456 0.123456 create table t1 ( ua_id decimal(22,0) not null, ua_invited_by_id decimal(22,0) default NULL, primary key(ua_id) ); insert into t1 values (123, NULL), (456, NULL); this must not produce error 1048: select * from t1 where ua_invited_by_id not in (select ua_id from t1); ua_id ua_invited_by_id drop table t1; End of 5.0 tests
sql/item.cc +1 −1 Original line number Diff line number Diff line Loading @@ -4551,7 +4551,7 @@ int Item::save_in_field(Field *field, bool no_conversions) my_decimal decimal_value; my_decimal *value= val_decimal(&decimal_value); if (null_value) return set_field_to_null(field); return set_field_to_null_with_conversions(field, no_conversions); field->set_notnull(); error=field->store_decimal(value); } Loading