{"action":"created","issue":{"url":"https://api.github.com/repos/piwik/piwik/issues/9395","labels_url":"https://api.github.com/repos/piwik/piwik/issues/9395/labels{/name}","comments_url":"https://api.github.com/repos/piwik/piwik/issues/9395/comments","events_url":"https://api.github.com/repos/piwik/piwik/issues/9395/events","html_url":"https://github.com/piwik/piwik/issues/9395","id":122351176,"number":9395,"title":"Feedback to #9382 (DB lock name should be less than 64 characters for MySQL compatibility)","user":{"login":"Joey3000","id":3662335,"avatar_url":"https://avatars.githubusercontent.com/u/3662335?v=3","gravatar_id":"","url":"https://api.github.com/users/Joey3000","html_url":"https://github.com/Joey3000","followers_url":"https://api.github.com/users/Joey3000/followers","following_url":"https://api.github.com/users/Joey3000/following{/other_user}","gists_url":"https://api.github.com/users/Joey3000/gists{/gist_id}","starred_url":"https://api.github.com/users/Joey3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joey3000/subscriptions","organizations_url":"https://api.github.com/users/Joey3000/orgs","repos_url":"https://api.github.com/users/Joey3000/repos","events_url":"https://api.github.com/users/Joey3000/events{/privacy}","received_events_url":"https://api.github.com/users/Joey3000/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-15T19:46:26Z","updated_at":"2015-12-15T22:49:52Z","closed_at":"2015-12-15T22:49:52Z","body":"This is intended as a review of https://github.com/piwik/piwik/pull/9382, as it is already merged.\r\n\r\n1. https://github.com/piwik/piwik/pull/9382/files#diff-f0dc4d4d133f84005fcebc1e10f155c0R289: If `$archiveId` is in decimal representation, [dechex()](https://secure.php.net/manual/en/function.dechex.php) could be used to make it shorter by converting it to hexadecimal.\r\n\r\n2. https://github.com/piwik/piwik/pull/9382/files#diff-f0dc4d4d133f84005fcebc1e10f155c0R285 and the line after that:\r\n  a. How was the \"magic number\" 23 calculated? (A comment explaining that value could be added to clarify.)\r\n  b. It seems to NOT use the entire 64-character length. Currently, the maximum length is:\r\n  ```\r\n  strlen($dbLockName) = strlen(\"rmPrevArchiveStatus\") + strlen(\".\") + strlen($tableWithoutLeadingPrefix) + strlen(\".\") + strlen(dechex($archiveId)) =\r\n                      =           19                  +    1        +                23                  +    1        +        16 (conservatively, PHP_INT_SIZE on 64 bit: 8 bytes * 2 chars/byte) =\r\n                      = 60\r\n  ```"},"comment":{"url":"https://api.github.com/repos/piwik/piwik/issues/comments/164923699","html_url":"https://github.com/piwik/piwik/issues/9395#issuecomment-164923699","issue_url":"https://api.github.com/repos/piwik/piwik/issues/9395","id":164923699,"user":{"login":"Joey3000","id":3662335,"avatar_url":"https://avatars.githubusercontent.com/u/3662335?v=3","gravatar_id":"","url":"https://api.github.com/users/Joey3000","html_url":"https://github.com/Joey3000","followers_url":"https://api.github.com/users/Joey3000/followers","following_url":"https://api.github.com/users/Joey3000/following{/other_user}","gists_url":"https://api.github.com/users/Joey3000/gists{/gist_id}","starred_url":"https://api.github.com/users/Joey3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joey3000/subscriptions","organizations_url":"https://api.github.com/users/Joey3000/orgs","repos_url":"https://api.github.com/users/Joey3000/repos","events_url":"https://api.github.com/users/Joey3000/events{/privacy}","received_events_url":"https://api.github.com/users/Joey3000/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T22:49:52Z","updated_at":"2015-12-15T22:49:52Z","body":"Ok, thanks for clarification!"}}