no clue.  I'd try stack overflow, take out the SQLAlchemy details and just ask 
about the binary safety of MySQL dumps.


On Oct 15, 2014, at 10:11 PM, YKdvd <davidobe...@gmail.com> wrote:

> I've got a SQLAlchemy model something like this:
> 
> class MyUserl(AlchemyBase): 
> ...
>       webPrefs = Column(MutableDict.as_mutable(PickleType) )
> 
> which runs against a MySQL 5.5.31 (Debian) database table:
> 
> CREATE TABLE myUserTable (
> ...
>       `webPrefs` blob DEFAULT NULL,
> ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
> 
> This works fine - the "webPrefs" dictionary field saves, reloads, all 
> hunky-dory.  But when I use mysqldump to export this out, and import it to a 
> different MySQL setup (OSX 5.1.66), SQLAlchemy throws an error loading a user 
> record: "UnpicklingError: invalid load key".
> 
> I'm assuming the blob field is getting munged somewhere.  The export is done 
> with:
>      mysqldump  -r "dumpfile.sql" --default-character-set=utf8
> Should mysqldump be safe for the pickled-to-blob column, escaping anything 
> unsafe, or am I going to need something like the "hex-blob" option on 
> mysqldump?  The other possibility I see is that I'm getting the dump[file at 
> the OSX site through a Mercurial repository, and perhaps Mercurial isn't safe 
> for the mysqldump encoding.  I'm trying to obtain a direct binary copy of the 
> dumpfile, but it will be a day or two and I thought I'd check to see if 
> anyone can confirm whether this should in theory work.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to