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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인