RDS MySQL once procedure has an error it repeats until a new session is started even with valid values

54 Views Asked by At

I've finally put my finger on an intermittent error we receive when processing data. The error shows when we execute a stored procedure & reports "Column A cannot be null" but when we track down the record and run the procedure manually it works fine. I'm able to repeat this error using the following.

  1. Run the procedure using valid values, it succeeds
  2. Run the same procedure using an invalid value, it fails with "column A cannot be null"
  3. Re-run the same procedure using the same valid values from step 1, it fails with the same error
  4. open a new tab/session & re-run the same procedure from step 1, it now succeeds again.

I'm really scratching my head on this one & cant seem to find the correct documentation to help. We are using MySQL 5.7 on AWS RDS. It seems like the session is cashing the error and anytime the procedure is called it simply pulls the error from cash.

0

There are 0 best solutions below