From 39b600960d0b0e55c255b5521c52b3cd3e0c337a Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Mon, 23 Nov 2015 18:07:27 +0000 Subject: Horrible kludge to work around MySQL bug: As of MySQL 5.6, the default character set is UTF8 (fine so far), which causes MySQL to reject ASN.1 DER stored in BLOBs (or, more likely, any operations against such columns) on the grounds that ASN.1 DER is not well-formed UTF8. svn path=/trunk/; revision=6188 --- rpki/sql.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpki/sql.py b/rpki/sql.py index 31ed40ee..d75b45b3 100644 --- a/rpki/sql.py +++ b/rpki/sql.py @@ -81,6 +81,9 @@ class session(object): self.db.autocommit(True) self.timestamp = rpki.sundial.now() + # Try this as a workaround for MySQL 5.6 UTF8 characterset braindamage + self.execute("charset = latin1") + def close(self): if self.cur: self.cur.close() -- cgit v1.2.3