Fix MySQL support
As per issue #25 these changes allow the use of MySQL as backend.
Looks nice. However postgres' varchar limit is 10485760. Not that this would be required. But 128 chars seems a bit restrictive. Are there any limits in mysql that would prevent - say - 2048 or even 4096 characters?
Maximum seems to be 65535 for MySQL >5.0.3.
I have to admit I didn't know how large this had to be and 128 seemed to work, I figured just specifying something really large might waste space somewhere so I guess 2048 or 4096 shouldn't be a problem.
It seems there's some other limit I'm running into, I'm getting an error [1] on initdb when using 1024, 2048 or 4096.
I've updated the values to 512 and initdb works, I've created 2 backups and restored them, all seems fine. My other cluster is still using 128 since march without any (known) issues, the new cluster will be using 512 like in this pull request, unless I run into issues with this.
[1]
sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1071, 'Specified key was too long; max key length is 3072 bytes') [SQL: '\nCREATE TABLE tags (\n\tversion_uid VARCHAR(36) NOT NULL, \n\tname VARCHAR(4096) NOT NULL, \n\tPRIMARY KEY (version_uid, name), \n\tFOREIGN KEY(version_uid) REFERENCES versions (uid)\n)\n\n'] (Background on this error at: http://sqlalche.me/e/e3q8) INFO: Backy failed.
[s]iirc, mysql varchar limit is 255 with utf8. 767 bytes indexing[/s] never mind, i was wrong. 65535 bytes. so depending on character encoding different character lengths.
I would love to see this change merged -- is there anything I can do to move it along?
Also running with this file hand-modified in a few places. Would be good to get it merged
Pushed a fix. Could you try again with the master branch?