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.

已提問 2 年前檢視次數 278 次
1 個回答
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
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南