Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hashing workaround for unique indexes #389

Merged
merged 12 commits into from Aug 22, 2018
Merged

Conversation

xh3n1
Copy link
Member

@xh3n1 xh3n1 commented Aug 14, 2018

  • create unique indexes on url_hash/regexhash values on new initialisations. Use char type to store hash values.
  • make sure to store hash values of URL& Regex fields and URL &regex itself. (apply changes to queries for new entries)
  • calculate and store hash for all the rows on upgrade. (before creating indexes)
  • create columns for hash values and unique indexes on url_hash/ regexhash values on upgrade.

Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
@xh3n1
Copy link
Member Author

xh3n1 commented Aug 21, 2018

Regarding linktrack table: It doesn't make sense to change the field size and index because it's a legacy table which is not used anymore to add new entries. See uncommented query:

/* $req = Sql_Query(sprintf('insert ignore into %s (messageid,userid,forwardid)

and : https://github.com/phpList/phplist3/blob/master/public_html/lists/lt.php#L137-L145

@xh3n1 xh3n1 requested a review from michield August 21, 2018 14:05
@michield michield merged commit 56c0394 into release-3.3.4 Aug 22, 2018
@xh3n1 xh3n1 deleted the hash-workaround branch September 6, 2018 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants