Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

DELETE not working on artist table and maybe other tables #47

Open
Paxxil opened this issue Sep 17, 2012 · 1 comment
Open

DELETE not working on artist table and maybe other tables #47

Paxxil opened this issue Sep 17, 2012 · 1 comment
Milestone

Comments

@Paxxil
Copy link

Paxxil commented Sep 17, 2012

I noticed that statistics from musicbrainz and my database is not equal, so I investigated and found out, that replication updates don't delete the artists.....

I think the issue is in NULL fields in WHERE clause ... if it is empty it means NULL but i think it passes empty string instead, so query gets no results....

23485645 | 56167 | nz"."artist | d | 183711504 | NULL | "id"='53240' "name"='824319' "sort_name"='824319' "type"='2' "country"= "gender"=

I don't know why all this stuff is needed in WHERE clause... ID would be enough.

EDIT:
Just checked it is the same with table "release"

@Paxxil
Copy link
Author

Paxxil commented Sep 19, 2012

Problem is that mysql uses 'field IS NULL' and not 'field = NULL' in WHERE clauses.
It is bug in this script because it uses 'field = NULL' for all SQL queries, but it should only be for SET and 'field IS NULL' for WHERE

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant