Bug #26468 Falcon: can't find zero in a numeric(19) column
Submitted: 18 Feb 2007 0:15 Modified: 20 Apr 2007 14:44
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S2 (Serious)
Version:5.2.4-falcon-alpha-debug OS:Linux (SUSE 10.0 / 64-bit)
Assigned to: Jim Starkey CPU Architecture:Any

[18 Feb 2007 0:15] Peter Gulutzan
Description:
I create a table with a NUMERIC(19) column.
I insert 0.
The insert "works", although I see -0 when I select from the table.
I search for column = 0.
Nothing is found.

How to repeat:
mysql> create table t26 (s1 numeric(19)) engine=falcon;
Query OK, 0 rows affected (0.00 sec)

mysql> insert into t26 values (0);
Query OK, 1 row affected (0.00 sec)

mysql> select * from t26 where s1 = 0;
Empty set (0.01 sec)
[18 Feb 2007 2:11] Hakan Küçükyılmaz
Verified as described. Added test case falcon_bug_26468.test and pushed into mysql-5.1-falcon tree.

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

falcon_bug_26468               [ fail ]

Errors are (from /home/hakan/work/mysql/mysql-5.1-falcon/mysql-test/var/log/mysqltest-time) :
mysqltest: Result content mismatch
(the last lines may be the most important ones)
Below are the diffs between actual and expected results:
-------------------------------------------------------
*** r/falcon_bug_26468.result   2007-02-18 05:08:22.000000000 +0300
--- r/falcon_bug_26468.reject   2007-02-18 05:08:26.000000000 +0300
***************
*** 5,9 ****
  INSERT INTO t1 VALUES (0);
  SELECT count(*) FROM t1 WHERE a = 0;
  count(*)
! 1
  DROP TABLE t1;
--- 5,9 ----
  INSERT INTO t1 VALUES (0);
  SELECT count(*) FROM t1 WHERE a = 0;
  count(*)
! 0
  DROP TABLE t1;
-------------------------------------------------------
Please follow the instructions outlined at
http://www.mysql.com/doc/en/Reporting_mysqltest_bugs.html
to find the reason to this problem and how to report this.

Regards,

Hakan
[18 Apr 2007 20:26] Jim Starkey
A BitInt of zero got compressed to zero bytes, which confused
the decompression.
[18 Apr 2007 20:36] Hakan Küçükyılmaz
falcon_bug_26468 passes now:

Starting Tests in the 'main' suite

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

falcon_bug_26468               [ pass ]            258
-------------------------------------------------------
Stopping All Servers
All 1 tests were successful.
The servers where restarted 1 times
Spent 0.258 seconds actually executing testcases
[20 Apr 2007 14:44] MC Brown
A note has been added to the 5.2.4 changelog.
[10 Jul 2007 19:09] MC Brown
This bug report entry has been moved to the 6.0.0 Falcon changelog.