Bug #22171 Can't use decimal data type index with more than 19 digits
Submitted: 9 Sep 2006 10:17 Modified: 18 Nov 2006 13:45
Reporter: Georg Richter Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:5.2 OS:Any (all)
Assigned to: CPU Architecture:Any

[9 Sep 2006 10:17] Georg Richter
Description:
 I can't create a DECIMAL column with precision > 19.

In fact there are failures with smaller columns, but
there are other bug reports for those failures. The
only concern here is that the creation is impossible.

How to repeat:
mysql> create table t1 (s1 decimal(20)) engine=falcon;
ERROR 1005 (HY000): Can't create table 'test.t1' (errno: 156)
[16 Nov 2006 8:07] Calvin Sun
The table create works now. But it fails to match value when index exists. The new test case is:

mysql> CREATE TABLE t1 ( a decimal(20), KEY (a));
Query OK, 0 rows affected (0.05 sec)

mysql> INSERT INTO t1 VALUES (12345678901234567890);
Query OK, 1 row affected (0.00 sec)

mysql> SELECT * FROM t1 WHERE a = 12345678901234567890;
Empty set (0.00 sec)
[17 Nov 2006 21:27] Jim Starkey
Code to handle "decimal" keys got lost during a code
reorganization.
[18 Nov 2006 13:45] Hakan Küçükyılmaz
Fixed now.

Tested on Linux 32-bit, change set 1.2362.1.1, 2006-11-17.

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

falcon_bug_213                 [ pass ]            850
-------------------------------------------------------
Stopping All Servers
All 1 tests were successful.
The servers were restarted 1 times
Spent 0.85 seconds actually executing testcases

Regards, Hakan