Don't change FLOAT(X+1,X) to FLOAT(X+2,X)
Docs/manual.texi: ChangeLog mysql-test/r/show_check.result: Updated test for SHOW COLUMNS mysql-test/t/show_check.test: Updated test for SHOW COLUMNS
This commit is contained in:
parent
8c0e447729
commit
c3703e5568
@ -46857,7 +46857,7 @@ users use this code as the rest of the code and because of this we are
|
|||||||
not yet 100% confident in this code.
|
not yet 100% confident in this code.
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* News-3.23.51::
|
* News-3.23.51:: Changes in release 3.23.51
|
||||||
* News-3.23.50:: Changes in release 3.23.50
|
* News-3.23.50:: Changes in release 3.23.50
|
||||||
* News-3.23.49:: Changes in release 3.23.49
|
* News-3.23.49:: Changes in release 3.23.49
|
||||||
* News-3.23.48:: Changes in release 3.23.48
|
* News-3.23.48:: Changes in release 3.23.48
|
||||||
@ -46915,6 +46915,10 @@ not yet 100% confident in this code.
|
|||||||
@node News-3.23.51, News-3.23.50, News-3.23.x, News-3.23.x
|
@node News-3.23.51, News-3.23.50, News-3.23.x, News-3.23.x
|
||||||
@appendixsubsec Changes in release 3.23.51
|
@appendixsubsec Changes in release 3.23.51
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@item
|
||||||
|
Fixed the @code{FLOAT(X+1,X)} is not converted to @code{FLOAT(X+2,X)}.
|
||||||
|
(This also affected @code{DECIMAL}, @code{DOUBLE} and @code{REAL} types)
|
||||||
|
@item
|
||||||
Fixed the result from @code{IF()} is case in-sensitive if the 2 and
|
Fixed the result from @code{IF()} is case in-sensitive if the 2 and
|
||||||
third arguments are case sensitive.
|
third arguments are case sensitive.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
@ -92,3 +92,19 @@ t1 CREATE TABLE `t1` (
|
|||||||
`a` int(11) NOT NULL default '0',
|
`a` int(11) NOT NULL default '0',
|
||||||
PRIMARY KEY (`a`)
|
PRIMARY KEY (`a`)
|
||||||
) TYPE=MyISAM
|
) TYPE=MyISAM
|
||||||
|
Field Type Null Key Default Extra
|
||||||
|
a decimal(9,2) YES NULL
|
||||||
|
b decimal(9,0) YES NULL
|
||||||
|
e double(9,2) YES NULL
|
||||||
|
f double(5,0) YES NULL
|
||||||
|
h float(3,2) YES NULL
|
||||||
|
i float(3,0) YES NULL
|
||||||
|
Field Type Null Key Default Extra
|
||||||
|
c decimal(10,0) YES NULL
|
||||||
|
d double YES NULL
|
||||||
|
f float YES NULL
|
||||||
|
r double YES NULL
|
||||||
|
Field Type Null Key Default Extra
|
||||||
|
c decimal(4,3) YES NULL
|
||||||
|
d double(4,3) YES NULL
|
||||||
|
f float(4,3) YES NULL
|
||||||
|
@ -73,3 +73,17 @@ drop table t1;
|
|||||||
create table t1 (a int not null, primary key (a));
|
create table t1 (a int not null, primary key (a));
|
||||||
show create table t1;
|
show create table t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
create table t1 (a decimal(9,2), b decimal (9,0), e double(9,2), f double(5,0), h float(3,2), i float(3,0));
|
||||||
|
show columns from t1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
# Check auto conversions of types
|
||||||
|
|
||||||
|
create table t1 (c decimal, d double, f float, r real);
|
||||||
|
show columns from t1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
create table t1 (c decimal(3,3), d double(3,3), f float(3,3));
|
||||||
|
show columns from t1;
|
||||||
|
drop table t1;
|
||||||
|
@ -2432,9 +2432,9 @@ bool add_field_to_list(char *field_name, enum_field_types type,
|
|||||||
uint sign_len=type_modifier & UNSIGNED_FLAG ? 0 : 1;
|
uint sign_len=type_modifier & UNSIGNED_FLAG ? 0 : 1;
|
||||||
|
|
||||||
if (new_field->length && new_field->decimals &&
|
if (new_field->length && new_field->decimals &&
|
||||||
new_field->length < new_field->decimals+2 &&
|
new_field->length < new_field->decimals+1 &&
|
||||||
new_field->decimals != NOT_FIXED_DEC)
|
new_field->decimals != NOT_FIXED_DEC)
|
||||||
new_field->length=new_field->decimals+2; /* purecov: inspected */
|
new_field->length=new_field->decimals+1; /* purecov: inspected */
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case FIELD_TYPE_TINY:
|
case FIELD_TYPE_TINY:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user