Bug #43669 Falcon returns diff. no of digits than other engines with MIN() for YEAR values
Submitted: 16 Mar 2009 9:16 Modified: 19 Nov 2013 18:19
Reporter: Nidhi Shrotriya Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server: Data Types Severity:S3 (Non-critical)
Version:6.0.11 OS:Any
Assigned to: CPU Architecture:Any
Tags: data types

[16 Mar 2009 9:16] Nidhi Shrotriya
Description:
SELECT * FROM t3;
c1      c2      c3      c4
00      00      1998-12-26      1998-12-26 11:30:45
00      00      1998-12-29      1998-12-29 11:30:45
00      00      2008-01-06      2008-01-07 00:00:00
00      10      1998-12-17      1998-12-17 11:30:45
01      01      1998-12-28      1998-12-28 11:30:45
01      01      1998-12-31      1998-12-31 11:30:45
05      NULL    NULL    NULL
09      09      2009-01-29      2009-01-29 00:00:00
20      20      1998-12-16      1998-12-16 11:30:45
20      30      1998-12-16      1998-12-16 11:30:45
40      20      1998-12-15      1998-12-15 11:30:45
40      40      1998-12-15      1998-12-15 11:30:45
55      55      1998-12-26      1998-12-26 11:30:45
60      60      1998-12-14      1998-12-14 11:30:45
69      69      1998-12-13      1998-12-13 11:30:45
70      70      1998-12-12      1998-12-12 11:30:45
90      90      1998-12-11      1998-12-11 11:30:45
99      98      1998-12-10      1998-12-10 11:30:45
99      99      1998-12-27      1998-12-27 11:30:45
99      99      1998-12-30      1998-12-30 11:30:45

With other engines:
--------------------------
SELECT c1,MIN(c2) FROM t3 GROUP BY c1;
c1      MIN(c2)
00      0
00      0
00      0
01      1
01      1
05      NULL
09      9
20      20
40      20
55      55
60      60
69      69
70      70
90      90
99      98
99      99

With Falcon:
---------------
SELECT c1,MIN(c2) FROM t3 GROUP BY c1;
c1      MIN(c2)
00      00
00      00
00      00
01      01
01      01
05      NULL
09      09
20      20
40      20
55      55
60      60
69      69
70      70
90      90
99      98
99      99

With Year(4):
-------------
Diff. with other engines.
 SELECT c1,MIN(c2) FROM t3 GROUP BY c1;
 c1	MIN(c2)
-0000	0
+0000	0000
 1901	1901
 1970	1970
 1990	1990

How to repeat:
Please find attached the test case file.
[16 Mar 2009 9:17] Nidhi Shrotriya
Test Case

Attachment: insert_year_bug_falcon_43669.test (application/octet-stream, text), 2.36 KiB.

[16 Mar 2009 10:27] Sveta Smirnova
Thank you for the report.

Verified as described.

Workaround: use one of format functions.
[28 Apr 2009 15:12] Lars-Erik Bjørk
This seems to be very much related to bug#43668. If we remove the index from the table, the result will be the same for MyISAM as for Falcon. It seems that the output format depends on the access method used. I will look more closely into this tomorrow.
[29 Apr 2009 8:13] Lars-Erik Bjørk
When no index is present, both MyISAM and InnoDB has the same output format as Falcon. Falcon has the same output format both when an index is present and not, as the index is not used by the server. I am tempted to say that this is not a Falcon bug, but probably a server bug, if a bug at all.
[19 Nov 2013 14:34] Manyi Lu
Posted by developer:
 
Falcon is no longer a supported engine.