#2635: [patch] Updates for MySQL backend
--------------------------------------------------+-------------------------
Reporter: Andy Dustman <[EMAIL PROTECTED]> | Owner:
mtredinnick
Status: new | Component:
Database wrapper
Version: SVN | Resolution:
Keywords: | Stage:
Design decision needed
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
--------------------------------------------------+-------------------------
Changes (by Andy Dustman <[EMAIL PROTECTED]>):
* needs_better_patch: 1 => 0
Comment:
What's new with this patch:
* Adds support for DATABASE_OPTIONS setting.
* Doesn't try to change the character set.
* Doesn't try to set the sql_mode.
* Doesn't try to return data as unicode
With the addition of DATABASE_OPTIONS support, you are able to set
charset, sql_mode, and use_unicode in the settings file. You can also use
read_default_file to set connection options.
I've tested this with MySQL-5.0 but there's nothing here that should break
on earlier versions. It passes the Django unit tests, but beware: Settings
in DATABASE_OPTIONS override those in DATABASE_*, so the tests will use
the database specified by DATABASE_OPTIONS, and **not** the the test
database it creates (django_test_db). This is probably true for any
backend that uses DATABASE_OPTIONS.
If you do set charset, you may want to set use_unicode=False. use_unicode
is set to True if you set charset. Currently the unit tests for models do
not pass if you have use_unicode=True, but they all look like comparison
tests.
I am also working on some MySQL notes for Django.
You could probably remove the test for MySQLdb-1.2.1 or newer.
--
Ticket URL: <http://code.djangoproject.com/ticket/2635#comment:10>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---