#15940: use strict mode with mysql -------------------------------------+------------------------------------- Reporter: foxwhisper | Owner: nobody Type: New feature | Status: new Component: Database layer | Version: 1.3 (models, ORM) | Resolution: Severity: Normal | Triage Stage: Accepted Keywords: | Needs documentation: 1 Has patch: 0 | Patch needs improvement: 0 Needs tests: 0 | UI/UX: 0 Easy pickings: 0 | -------------------------------------+-------------------------------------
Comment (by brian): I stand corrected, it is possible to set STRICT_ALL_TABLES on a per session basis, as described in comment 6. I haven't seen any reason however why this should not be the default, used for all installs. Also, as a semi-related issue all the documents say "MySQL defaults to silently altering the data". Which doesn't match my experience. What I have observed is that mysql truncates the data and writes it, returns a warning that data is truncated, which gets translated as _mysql_exceptions.Warning, which Django treats as an error and fails. This can be incredibly confusing, especially if transactions aren't enabled. -- Ticket URL: <https://code.djangoproject.com/ticket/15940#comment:7> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.101c8b35585de5b9800b66bb5af03541%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.