#29882: UDFs are not dumped to the clone MySQL test db
-------------------------------------+-------------------------------------
Reporter: thomazzo | Owner: thomazzo
Type: Uncategorized | Status: closed
Component: Database layer | Version: 2.1
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Adam (Chainz) Johnson):
Dan, I think you missed a step here... @thomazzo is talking about when
Django clones test database for parallel runs, which is done at the start
of test runs by `setup_databases`:
https://github.com/django/django/blob/master/django/test/utils.py#L176 .
This calls through to backend specific functions, which Django has for
MySQL here:
https://github.com/django/django/blob/9a88c6dd6aa84a1b35e585faa0058a0996cc7ed7/django/db/backends/mysql/creation.py#L31
I think the request is really around passing `--routines` to `mysqldump`
in `_clone_db`. I think this is a good idea and probably just needs one
line in that function.
Dan, you could make a test case from your example repo by using the
`CREATE FUNCTION` statement in a `RunSQL` in a migration.
--
Ticket URL: <https://code.djangoproject.com/ticket/29882#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.a427b65295069cac934bc5d76509587d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.