[MDEV-6460] Wrong result with derived_merge=on Created: 2014-07-18  Updated: 2015-02-19  Resolved: 2015-02-19

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 10.0.11
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: VAROQUI Stephane Assignee: Sergei Petrunia
Resolution: Cannot Reproduce Votes: 0
Labels: None


 Description   

Running following query against 10.0.11-MariaDB-1~quantal-log mariadb.org binary distribution return wrong result inside the status column

Running the same query on MySQL 5.5.29-0ubuntu0.12.04.2-log (Ubuntu)
return a correct result
It was reported that derived_merge=off or adding limit 1000000 in the subquery produce the correct result in MariaDB

CC raw information here
https://gist.github.com/asgrim/f86664266d4e6fb211e2

SELECT lifeleadleadid, 
       status, 
       statusname 
FROM   (SELECT life_leads.id                                     AS 
               lifeLeadLeadId, 
               Concat(lead_activity_types.name, ' - ', 
               Date_format( 
               lead_activity_history.activity_date, '%d/%m/%Y')) AS status, 
               lead_activity_types.name                          AS statusName 
        FROM   eleanor.life_leads AS life_leads 
               JOIN eleanor.lead_activity_history AS lead_activity_history 
                 ON ( lead_activity_history.product_lead_id = life_leads.id ) 
               JOIN eleanor.lead_activity_types AS lead_activity_types 
                 ON ( lead_activity_types.id = 
                      lead_activity_history.activity_type_id ) 
        WHERE  lead_activity_history.active = 1 
               AND life_leads.id IN ( 526176 ) 
        ORDER  BY lead_activity_history.activity_date DESC, 
                  lead_activity_history.activity_type_id DESC) AS status_table 
WHERE  statusname IN ( 'CANCELLATION_FLAGGED', 'CANCELLATION_RESOLVED', 
                       'CANCELLATION_RESOLVED_SPOKE' 
                              , 
                                            'CANCELLATION_RESOLVED_NOT_SPOKE', 
                       'CANCELLATION_RESOLVED_CONFIRMED', 
                       'CANCELLATION_RESOLVED_SAVED' 
                            ) 
GROUP  BY lifeleadleadid 



 Comments   
Comment by Sergei Petrunia [ 2014-07-18 ]

Added formatting tags.

Comment by Sergei Petrunia [ 2015-02-19 ]

Looked at the available information and have no idea what this could be. Closing as "Cannot reproduce". Please re-open if there is a repeatable testcase or an idea about the cause of the problem.

Generated at Thu Feb 08 07:12:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.