Bug in Amazon Aurora MySQL

0

This code on amazon aurora is producing rows where before it did not and I would like to know why

SELECT c._id AS Id FROM CustomersCustomersRMAs c WHERE ((c.Business = ?) AND (c.Customer = ?) AND ((c.ExpirationDate IS NULL) OR ((c.ExpirationDate IS NOT NULL) AND (c.ExpirationDate >= ?))) AND (((IF(((SELECT SUM(cr.Quantity) FROM CustomersCustomersRMAsItems cr WHERE (cr.RMA = c._id)) IS NULL), 0, (SELECT SUM(cr.Quantity) FROM CustomersCustomersRMAsItems cr WHERE (cr.RMA = c._id)))) - (IF(((SELECT SUM(cr.Quantity) FROM CustomersCustomersReceivingItems cr LEFT JOIN CustomersCustomersRMAsItems ccr ON (cr.RMA = ccr._id) WHERE (ccr.RMA = c._id)) IS NULL), 0, (SELECT SUM(cr.Quantity) FROM CustomersCustomersReceivingItems cr LEFT JOIN CustomersCustomersRMAsItems ccr ON (cr.RMA = ccr._id) WHERE (ccr.RMA = c._id))))) > 0)) ORDER BY c.EffectiveDate DESC

  • Hi.
    What kind of environment is "before" you say?
    If the versions of MySQL match, I don't think Aurora will change the query results.

asked 2 years ago271 views
1 Answer
0

Have you got this query under version control so you can be 100% certain nothing in it has changed? Could you have changed a join strategy, perhaps?

Could data have been added to a table that you are joining to that previously was empty?

AWS
guy
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions