mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/work/mysql-4.0
This commit is contained in:
commit
69ea14158b
3 changed files with 14 additions and 2 deletions
|
@ -363,3 +363,9 @@ CREATE TABLE t1 (a_dec DECIMAL(-2,1));
|
||||||
Too big column length for column 'a_dec' (max = 255). Use BLOB instead
|
Too big column length for column 'a_dec' (max = 255). Use BLOB instead
|
||||||
CREATE TABLE t1 (a_dec DECIMAL(-1,1));
|
CREATE TABLE t1 (a_dec DECIMAL(-1,1));
|
||||||
Too big column length for column 'a_dec' (max = 255). Use BLOB instead
|
Too big column length for column 'a_dec' (max = 255). Use BLOB instead
|
||||||
|
create table t1(a decimal(10,4));
|
||||||
|
insert into t1 values ("+0000100000000");
|
||||||
|
select * from t1;
|
||||||
|
a
|
||||||
|
9999999.9999
|
||||||
|
drop table t1;
|
||||||
|
|
|
@ -240,3 +240,9 @@ CREATE TABLE t1 (a_dec DECIMAL(-1,0));
|
||||||
CREATE TABLE t1 (a_dec DECIMAL(-2,1));
|
CREATE TABLE t1 (a_dec DECIMAL(-2,1));
|
||||||
--error 1074
|
--error 1074
|
||||||
CREATE TABLE t1 (a_dec DECIMAL(-1,1));
|
CREATE TABLE t1 (a_dec DECIMAL(-1,1));
|
||||||
|
|
||||||
|
# Zero prepend overflow bug
|
||||||
|
create table t1(a decimal(10,4));
|
||||||
|
insert into t1 values ("+0000100000000");
|
||||||
|
select * from t1;
|
||||||
|
drop table t1;
|
||||||
|
|
|
@ -632,7 +632,7 @@ void Field_decimal::store(const char *from,uint len)
|
||||||
if (zerofill)
|
if (zerofill)
|
||||||
{
|
{
|
||||||
left_wall=to-1;
|
left_wall=to-1;
|
||||||
while (pos != left_wall) // Fill with zeros
|
while (pos > left_wall) // Fill with zeros
|
||||||
*pos--='0';
|
*pos--='0';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -640,7 +640,7 @@ void Field_decimal::store(const char *from,uint len)
|
||||||
left_wall=to+(sign_char != 0)-1;
|
left_wall=to+(sign_char != 0)-1;
|
||||||
if (!expo_sign_char) // If exponent was specified, ignore prezeros
|
if (!expo_sign_char) // If exponent was specified, ignore prezeros
|
||||||
{
|
{
|
||||||
for (;pos != left_wall && pre_zeros_from !=pre_zeros_end;
|
for (;pos > left_wall && pre_zeros_from !=pre_zeros_end;
|
||||||
pre_zeros_from++)
|
pre_zeros_from++)
|
||||||
*pos--= '0';
|
*pos--= '0';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue