Start a new topic
Solved

Artists: track count may be wrong

Two folders, in each folder is one track from the same artist - but in different capitalization.


1. Create a new database

2. Add only folder_1

3. When the first track has been added to the database, add folder_2

4. Restart Neon

---> The artist view and artist details show only one track.


This does not happen, when the capitalization is the same.

This does also not happen, when both folders are added in one go.


Here's the resulting database with the two files to test this case: https://owncloud.matzerath-online.net/index.php/s/Yzp8a3N7WCmVujx


This seem to happen because of some setting in your MySQL config file (not sure which).


I have tested:

1) If it could be reproduced with a Compact database (no)

2) If it could be reproduced with a new MariaDB created on my machine (no)

3) By importing your database onto my system, then cleaning it and readding the files (still 2 tracks shown)


I suspect that you might have some case-sensitive collation setting or such.

Here's (a part) of my settings:

 

[mysqld]
datadir=C:/Program Files/MariaDB 10.1/data
port=3306
sql_mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
default_storage_engine=innodb
innodb_buffer_pool_size=2048M
innodb_log_file_size = 500M
innodb_log_buffer_size = 800M;
max_allowed_packet = 64M
wait_timeout = 7000
character-set-server=utf8
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
[client]
port=3306

 

Odd, my settings are quite the same (your buffers are way bigger than mine).

Here's partially what I get, when the first track is added:
		   59 Query	UPDATE tblArtists SET IsNew = NULL
		   59 Query	SELECT artist_id, ArtistName FROM tblArtists
		   59 Query	SELECT tblArtists.Artist_ID, tblArtists.ArtistName, tblArtists.ArtistSortorder, 0, Max(tblDetail.artistsortorder) AS MaxOfartistsortorder, Min(tblDetail.totalartists) AS MinOftotalartists, Count(tblDetail.Detail_ID) AS CountOfDetail_ID, Avg(tblRating.Rating) AS AvgOfRating, Max(tblDetail.totalartists) AS MinOftotalartists1, tblArtists.ArtistPicturePath FROM (tblDetail INNER JOIN (tblArtists INNER JOIN tblArtist_x_Detail ON tblArtists.Artist_ID = tblArtist_x_Detail.Artist_ID) ON tblDetail.Detail_ID = tblArtist_x_Detail.Detail_ID) INNER JOIN tblRating ON tblDetail.Detail_ID = tblRating.Detail_ID WHERE (tblRating.User_ID = 1) AND (tblArtists.Artist_ID IN (1)) GROUP BY tblArtists.Artist_ID, tblArtists.ArtistName, tblArtists.ArtistSortorder, tblArtists.ArtistPicturePath
		   59 Query	UPDATE tblArtists SET ArtistName='test artist', ArtistSortorder='test artist', TotalItems=1 WHERE Artist_ID=1
		   59 Query	UPDATE tblArtistRating SET Rating=0 WHERE User_Id=1 AND Artist_ID=1
		   59 Query	INSERT INTO tblArtistRating (Artist_Id,User_id,Rating) VALUES (1, 1, 0)
		   59 Query	SELECT Path FROM tblAddPaths

 Here's the same part, when the second track is added:

		   59 Query	UPDATE tblArtists SET IsNew = NULL
		   59 Query	SELECT artist_id, ArtistName FROM tblArtists
		   59 Query	SELECT tblArtists.Artist_ID, tblArtists.ArtistName, tblArtists.ArtistSortorder, 0, Max(tblDetail.artistsortorder) AS MaxOfartistsortorder, Min(tblDetail.totalartists) AS MinOftotalartists, Count(tblDetail.Detail_ID) AS CountOfDetail_ID, Avg(tblRating.Rating) AS AvgOfRating, Max(tblDetail.totalartists) AS MinOftotalartists1, tblArtists.ArtistPicturePath FROM (tblDetail INNER JOIN (tblArtists INNER JOIN tblArtist_x_Detail ON tblArtists.Artist_ID = tblArtist_x_Detail.Artist_ID) ON tblDetail.Detail_ID = tblArtist_x_Detail.Detail_ID) INNER JOIN tblRating ON tblDetail.Detail_ID = tblRating.Detail_ID WHERE (tblRating.User_ID = 1) AND (tblArtists.Artist_ID IN (1)) GROUP BY tblArtists.Artist_ID, tblArtists.ArtistName, tblArtists.ArtistSortorder, tblArtists.ArtistPicturePath
160714 11:25:51	   59 Query	SELECT Path FROM tblAddPaths

  As you can see, there's something missing in the second part:

		   59 Query	UPDATE tblArtists SET ArtistName='test artist', ArtistSortorder='test artist', TotalItems=1 WHERE Artist_ID=1
		   59 Query	UPDATE tblArtistRating SET Rating=0 WHERE User_Id=1 AND Artist_ID=1
		   59 Query	INSERT INTO tblArtistRating (Artist_Id,User_id,Rating) VALUES (1, 1, 0)
So, for some reason there's an update to tblartists missing...

I tested this on a clean machine and got the same results as my prior (totalitems = 2), so sorry, still no luck in reproducing it.

I assume you cannot reproduce it with any other database type neither?

> I assume you cannot reproduce it with any other database type neither?
Yes, I can... :-(
At least with CompactSQL I get the same result.

Here's a video, so you can see the exact steps I made: https://owncloud.matzerath-online.net/index.php/s/0Ua8D3TVEGCMCII

Thanks for the video. I added the parent folder with the two sub-folders in batch, which probably made it work.

I will test this further tomorrow.

 Fixed. Thank you.

Login or Signup to post a comment