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.

posta 2 anni fa278 visualizzazioni
1 Risposta
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
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande