pallets-eco / flask-session

Server side session extension for Flask
https://flask-session.readthedocs.io
BSD 3-Clause "New" or "Revised" License
507 stars 238 forks source link

Unique key length bug-fix for SQLAlchemy + unicode #33

Closed moskitos80 closed 8 months ago

moskitos80 commented 8 years ago

When using SQLAlchemy and Unicode fields having unique length of 256 we get a unique index length of 256 * 3 = 768 bytes, and 767 are allowed! This causes an error: "sqlalchemy.exc.ProgrammingError: (mysql.connector.errors.ProgrammingError) 1071 (42000): Specified key was too long; max key length is 767 bytes"

While the length of the 255 is quite enough to store uuid4 - hashes.

Lxstr commented 8 months ago

Has now been fixed