aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-10-25 00:38:20 +0000
committerRob Austein <sra@hactrn.net>2015-10-25 00:38:20 +0000
commitafdeab028259c9cbab6112fe005a1e78c135fe43 (patch)
tree531a9e894dac962c872eb841a8098926b878a2de
parent0c17de892ac39f8252af38c8aca83939d1ea1858 (diff)
Force MySQL characterset to Latin1 to suppress constant whining about
incorrectly coded UTF-8 in BLOB fields holding ASN.1 DER data. This is wrong in so many ways that I don't even know where to start, but, bottom line, forcing Latin1 here is just making MySQL 5.6+ revert to the behavior in MySQL 5.5. This is just a workaround. The real solution is probably to switch to an SQL engine that's not quite such a kludge tower. svn path=/branches/tk705/; revision=6146
-rw-r--r--rpki/django_settings/irdb.py3
-rw-r--r--rpki/django_settings/pubd.py3
-rw-r--r--rpki/django_settings/rpkid.py3
3 files changed, 6 insertions, 3 deletions
diff --git a/rpki/django_settings/irdb.py b/rpki/django_settings/irdb.py
index 11e7417a..56ed92ff 100644
--- a/rpki/django_settings/irdb.py
+++ b/rpki/django_settings/irdb.py
@@ -32,7 +32,8 @@ DATABASES = dict(
default = dict(ENGINE = "django.db.backends.mysql",
NAME = cfg.get("sql-database", section = "irdbd"),
USER = cfg.get("sql-username", section = "irdbd"),
- PASSWORD = cfg.get("sql-password", section = "irdbd")))
+ PASSWORD = cfg.get("sql-password", section = "irdbd"),
+ OPTIONS = dict(charset = "latin1")))
# Apps.
diff --git a/rpki/django_settings/pubd.py b/rpki/django_settings/pubd.py
index 7ae533e7..8539b8e5 100644
--- a/rpki/django_settings/pubd.py
+++ b/rpki/django_settings/pubd.py
@@ -30,7 +30,8 @@ DATABASES = dict(
default = dict(ENGINE = "django.db.backends.mysql",
NAME = cfg.get("sql-database", section = "pubd"),
USER = cfg.get("sql-username", section = "pubd"),
- PASSWORD = cfg.get("sql-password", section = "pubd")))
+ PASSWORD = cfg.get("sql-password", section = "pubd"),
+ OPTIONS = dict(charset = "latin1")))
# Apps.
diff --git a/rpki/django_settings/rpkid.py b/rpki/django_settings/rpkid.py
index a2aa9401..1c302b2e 100644
--- a/rpki/django_settings/rpkid.py
+++ b/rpki/django_settings/rpkid.py
@@ -30,7 +30,8 @@ DATABASES = dict(
default = dict(ENGINE = "django.db.backends.mysql",
NAME = cfg.get("sql-database", section = "rpkid"),
USER = cfg.get("sql-username", section = "rpkid"),
- PASSWORD = cfg.get("sql-password", section = "rpkid")))
+ PASSWORD = cfg.get("sql-password", section = "rpkid"),
+ OPTIONS = dict(charset = "latin1")))
# Apps.