Bug #27962 Falcon: lost post-decimal digits
Submitted: 19 Apr 2007 19:42 Modified: 26 Apr 2007 11:01
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.0-alpha-debug OS:Linux (SUSE 10 64-bit)
Assigned to: Jim Starkey CPU Architecture:Any

[19 Apr 2007 19:42] Peter Gulutzan
Description:
I create a Falcon table with a 19-digit column.
I insert 0.1 and 0.01.
I select.
The post-decimal digit '1' is shifted or gone.

ChangeSet@1.2623, 2007-04-19

How to repeat:
mysql> create table ta (s1 decimal(19,10)) engine=falcon;
Query OK, 0 rows affected (0.01 sec)

mysql> insert into ta values (0.1),(0.01);
Query OK, 2 rows affected (0.00 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> select * from ta;
+--------------+
| s1           |
+--------------+
| 0.0000000001 |
| 0.0000000000 |
+--------------+
2 rows in set (0.01 sec)

mysql> create table tb (s1 decimal(19,10)) engine=innodb;
Query OK, 0 rows affected (0.00 sec)

mysql> insert into tb values (0.1),(0.01);
Query OK, 2 rows affected (0.01 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> select * from tb;
+--------------+
| s1           |
+--------------+
| 0.1000000000 |
| 0.0100000000 |
+--------------+
2 rows in set (0.00 sec)
[19 Apr 2007 20:10] MySQL Verification Team
Thank you for the bug report. Verified as described on FC 6 32-bit.
[19 Apr 2007 20:40] Hakan Küçükyılmaz
Added test case falcon_bug_27962.test.

Related to Bug#26469.

Best regards,

Hakan
[20 Apr 2007 18:45] Hakan Küçükyılmaz
Test passes now:

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

falcon_bug_27962               [ pass ]            225
-------------------------------------------------------
Stopping All Servers
All 1 tests were successful.
The servers where restarted 1 times
Spent 0.225 seconds actually executing testcases

For Documenter:

Falcon alpha has restriction for decimal for up to decimal(18,9).

+			if (newDecimal->precision > 18 && newDecimal->dec > 9)
+				{
+				errorText = "columns with greater than 18 digits precision and greater than 9 digits of fraction are not supported";
+				
+				return HA_ERR_UNSUPPORTED;
+				}
+
[26 Apr 2007 11:01] MC Brown
A note has been added to the 6.0.0 changelog.