1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

bugfix and test case

This commit is contained in:
serg@serg.mylan
2004-10-30 18:31:35 +02:00
parent 1f7aa03e42
commit 5c8155955b

View File

@ -206,7 +206,7 @@ int decimal2string(decimal *from, char *to, int *to_len)
DBUG_ASSERT(*to_len > 2+from->sign);
/* removing leading zeroes */
i=intg % DIG_PER_DEC1;
i=((intg-1) % DIG_PER_DEC1)+1;
while (intg > 0 && *buf0 == 0)
{
intg-=i;
@ -1874,6 +1874,7 @@ main()
printf("==== do_add ====\n");
test_da(".00012345000098765" ,"123.45");
test_da(".1" ,".45");
test_da("1234500009876.5" ,".00012345000098765");
test_da("9999909999999.5" ,".555");
test_da("99999999" ,"1");