Bug 133918 - Duplicate entry database errors
Summary: Duplicate entry database errors
Status: RESOLVED INTENTIONAL
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-11 16:59 UTC by richlv
Modified: 2008-06-25 10:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description richlv 2006-09-11 16:59:33 UTC
Version:           svn 582974 (using KDE KDE 3.5.4)
Installed from:    Slackware Packages
OS:                Linux

different people now and then get "duplicate entry" sql errors. these mostly have been observed with mysql, but i am not completely sure this is db-specific in all cases.

error messages look like :

amarok:     [CollectionDB] MYSQL INSERT FAILED: Duplicate entry './data/m/B/billy bragg/The Internationale/07 - my youngest son c' for key 1
amarok: FAILED INSERT: INSERT INTO embed_temp ( url, deviceid, hash, description ) VALUES ( './data/m/B/billy bragg/The Inter▒' );nale/07 - my youngest son came home.mp3', 8, '76e3b7ebb779aee261f704d5e2997c42', 'ĀPNG
amarok:     [CollectionDB] MYSQL INSERT FAILED: Duplicate entry './data/m/F/Five Iron Frenzy/The End Is Here/The End Is Here Disk' for key 1
amarok: FAILED INSERT: INSERT INTO embed_temp ( url, deviceid, hash, description ) VALUES ( './data/m/F/Five Iron Frenzy/The End Is Here/The End Is Here Disk 1/01 - Cannonball.mp3', 8, '36c2112be6bde2188b46682aa414e138', 'Audiogenie fuegte Bild ein' );

these errors always happen with particular files upon collection rescan. the directories or filenames do not seem to contain any special characters in the places they are cut.
i have observed this with both mysql 4 and 5.

first error even looks like a problem with album art insertion into db, others refer to music files.
Comment 1 Peter C. Ndikuwera 2006-09-13 13:09:16 UTC
It's not the most elegant way of doing it, but the database structure was changed recently (1.4.1 or thereabouts) such that you can only have 1 embedded image per file. 

(Technically, a unique index was created on the embed table)

This "error" only occurs when the collection scanner tries to insert a subsequent embedded image into the table.
Comment 2 Maximilian Kossick 2006-09-13 13:19:12 UTC
Hm, we assumed that you can only have one embedded image per file. So you can have more than one? In that case I can change the index back to a normal one. But should we insert more than one embedded image per file? We have to make sure that we are always showing the same image.
Comment 3 Peter C. Ndikuwera 2006-09-13 13:43:25 UTC
Some of my files have multiple images (cover image & back cover image). Previously, I would never know which one was going to be displayed in the context browser - is there a way to tell which was the first image inserted and display that one? If not, then I don't mind the unique index. :-)
Comment 4 richlv 2006-09-13 13:50:37 UTC
oh. in case unique index stays in place, it would be nice if the error was parsed and a meaningful error message would be output to the console.

thanks for the info, i had wondered about these errors for some time :)
Comment 5 Thomas Kamps 2008-06-15 13:18:06 UTC
i testet with duplikatet audio-files in my collection. No problems with 1.4.9.1 and 2.0-svn
Comment 6 Lydia Pintscher 2008-06-15 13:49:55 UTC
Marking as fixed based on Thomas' comment.
Comment 7 richlv 2008-06-25 10:53:15 UTC
note that the problem was not about duplicate files, but multiple embedded images producing confusing error messages.
as far as i know, the problem is still not fixed, so most likely it should be set to wontfix (which i unfortunately can't do myself).
Comment 8 Seb Ruiz 2008-06-25 10:59:44 UTC
ok rich