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

Conversation

Projects
None yet
2 participants
@xh3n1
Member

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.
hashing workaround on structure page
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>

xh3n1 added some commits Aug 14, 2018

Create hash columns and unique indexes on upgrade
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
fix syntax
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
calculate hash values using md5
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
Change binary size to 16
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
remove linktrack
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
apply md5 to regex new entries
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
update queries for url new entries
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
apply changes to sendmaillib
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
change datatype and add where clause
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
apply changes to structure
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
fix typos
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
@xh3n1

This comment has been minimized.

Show comment
Hide comment
@xh3n1

xh3n1 Aug 21, 2018

Member

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

Member

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 Aug 21, 2018

@michield michield merged commit 56c0394 into release-3.3.4 Aug 22, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@xh3n1 xh3n1 deleted the hash-workaround branch Sep 6, 2018

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