Issue Details (XML | Word | Printable)

Key: CORE-4360
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Pavel Zotov
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

SELECT from derived table which contains GROUP BY on field with literal value returns wrong result

Created: 09/Mar/14 05:58 AM   Updated: 23/Sep/15 12:40 PM
Component/s: Engine
Affects Version/s: 3.0 Alpha 2
Fix Version/s: 3.0 Beta 1

Issue Links:
Relate
 

QA Status: Done successfully


 Description  « Hide
LI-T3.0.0.30889

Sample 1.
########
SQL> select c from( select 'a' c from rdb$database group by 'a' );

C
======


SQL>

(record with letter 'a' does not appear)

Sample 2.
########
SQL> select c from( select 123 c from rdb$database group by 1 );

           C
============
           0

(why ZERO ??)

Sample 3.
########
SQL> select c from( select current_timestamp c from rdb$database group by 1 );

                        C
=========================
1858-11-17 00:00:00.0000

(this date is known as Modified Julian Day, but it is NOT 'begin of epoch' in FB; so, why it is here ?)


PS. Results in LI-V2.5.3.26744 looks OK:

SQL> select c from( select 'a' c from rdb$database group by 'a' );

C
======
a

SQL> select c from( select 123 c from rdb$database group by 1 );

           C
============
         123

SQL> select c from( select current_timestamp c from rdb$database group by 1 );

                        C
=========================
2014-03-09 09:46:42.0180


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.