Skip to content

Conversation

rob006
Copy link
Contributor

@rob006 rob006 commented Oct 27, 2018

Q A
Is bugfix? yes
New feature? no
Breaks BC? no
Tests pass? yes

MySQL 5.7.5 and later enforces a maximum length on lock names of 64 characters. Previously, no limit was enforced.

See symfony/symfony#27250

@rob006 rob006 added this to the 2.0.16 milestone Oct 27, 2018
@samdark samdark merged commit c92eb77 into yiisoft:master Oct 27, 2018
@samdark
Copy link
Member

samdark commented Oct 27, 2018

Merged. Thank you!

@rob006 rob006 deleted the mysql-lock-limit branch October 27, 2018 19:23
@rob006 rob006 added the type:bug Bug label Oct 27, 2018
@cebe
Copy link
Member

cebe commented Oct 28, 2018

Would it be safer to only hash if length is too long? Might break BC with code that syncs lock with other implementation that is not yii

@rob006
Copy link
Contributor Author

rob006 commented Oct 28, 2018

Would it be safer to only hash if length is too long?

That still would be BC break if someone uses MySQL <5.7.5 and has lock name longer than 64 characters - it will be hashed even if there is no need for it.

IMO such condition will add unnecessary complicity and inconsistency. hashLockName() is protected, if someone relies on lock name, he could always override it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants