Karen Tracey wrote: > On Tue, Mar 24, 2009 at 8:15 PM, Michael Glassford <glassfo...@gmail.com > <mailto:glassfo...@gmail.com>> wrote: > > Django can be patched to do this automatically. There may be a better > way to do it, but I've figured out that in db/backends/mysql/base.py, > inside the DatabaseWrapper._cursor function, adding the line > "cursor.execute('SET sql_auto_is_null=0;')" immediately after the > "cursor = CursorWrapper(self.connection.cursor())" line will do it. > Should I submit a patch or is this just something that's not going to be > fixed? > > > That is the workaround/fix identified when this behavior was first > discovered: > > http://groups.google.com/group/django-developers/browse_thread/thread/d4180b8addf5e970 > > But the decision was made to not add this overhead to the start of every > connection. If you read the last paragraph you'll note it wasn't an > emphatic "no, never shall we do this" type of decision but I don't know > that anything has come to light to change the decision here, other than > a couple of people have noticed the oddness. The other I recall > recently is here: > > http://code.djangoproject.com/ticket/10339 > > which was closed wontfix. > > Personally, I don't think adding the set_auto_is_null=0 to every > connection is worth it. Adding a note to the doc somewhere might be > useful, though I'm not sure how many would actually read and find that > explanation when they stumble over this behavior. > > Karen
Thanks for the links. They proved very helpful, and I hadn't found them in my previous search. Mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---