Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Cannot Reproduce
-
10.0.11
-
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
|