Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

fix(mysql): Set strict mode on all new db migrations. #358

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rfk
Copy link
Contributor

@rfk rfk commented May 25, 2018

We've stored enforcing strict-mode on all connections to
MySQL from the app at runtime. However, stored procedures
remember the sql_mode that was in effect at the time they
were created, and we create our stored procedures through
an out-of-band connection that doesn't force strict mode.

This change adds an explicit "enable strict mode" preamble
to new migrations, and re-creates on of the existing stored
procedures to make use of it. Once we're confident this will
work on OK in practice, we'll need to re-create all stored
procedures that might have been created without strict mode.

This is a trial-baloon PR to see if it works in CI.

@rfk rfk added the WIP label May 25, 2018
@ghost ghost assigned rfk May 25, 2018
@ghost ghost added the waffle:active label May 25, 2018
We've stored enforcing strict-mode on all connections to
MySQL from the app at runtime.  However, stored procedures
remember the sql_mode that was in effect at the time they
were created, and we create our stored procedures through
an out-of-band connection that doesn't force strict mode.

This change adds an explicit "enable strict mode" preamble
to new migrations, and re-creates on of the existing stored
procedures to make use of it.  Once we're confident this will
work on OK in practice, we'll need to re-create all stored
procedures that might have been created without strict mode.
@rfk
Copy link
Contributor Author

rfk commented Aug 17, 2018

Going to pick this up for some background hacking in the next train.

@shane-tomlinson
Copy link

This repo has been deprecated and migrated to https://github.com/mozill/fxa. Please open this PR against that repo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants