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.

gefragt vor 2 Jahren278 Aufrufe
1 Antwort
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
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen