Commit 4b4af1c1 authored by unknown's avatar unknown
Browse files

A fix (Bug #5291: float -> string, truncation, sometimes without warning).

parent c1f29705
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -137,6 +137,8 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (c20 char);
insert into t1 values (5000.0);
Warnings:
Warning	1265	Data truncated for column 'c20' at row 1
drop table t1;
create table t1 (f float(54));
ERROR 42000: Incorrect column specifier for column 'f'
+1 −1
Original line number Diff line number Diff line
@@ -4297,7 +4297,7 @@ if (field_length < 32 && fabs(nr) < log_10[field_length]-1)
    like inserting 500.0 in char(1)
  */
  DBUG_ASSERT(field_length < 5 || length <= field_length+1);
  return store((const char *)buff, min(length, field_length), charset());
  return store((const char *) buff, length, charset());
}