The character limit depends on the character set. For example if you use latin1 then the largest column you can index is varchar(767), but if you use utf8 then the limit is varchar(255).
In sessions.py, the attribute session_id of class SqlAlchemySessionInterface is set to 256, however, when my database collection is set to utf8, it may cause a problen like this:
1071, 'Specified key was too long; max key length is 767 bytes'
The character limit depends on the character set. For example if you use
latin1
then the largest column you can index isvarchar(767)
, but if you useutf8
then the limit isvarchar(255)
.In
sessions.py
, the attributesession_id
of classSqlAlchemySessionInterface
is set to256
, however, when my database collection is set toutf8
, it may cause a problen like this:And I change it to
255
, the problem is solved.