View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008715 | MMW v4 | DB/FileMonitor | public | 2011-11-17 13:04 | 2012-01-15 22:11 |
Reporter | Ludek | Assigned To | |||
Priority | urgent | Severity | minor | Reproducibility | unable to reproduce |
Status | closed | Resolution | won't fix | ||
Product Version | 4.0 | ||||
Target Version | 4.0.1 | ||||
Summary | 0008715: With some databases the "Last Played Z...A" is incorrect | ||||
Description | One user sent me his database and when creating an autoplaylist with sort order Last Played Z...A, the order is incorrect. The strange thing is the same autoplaylist criteria works fine in my database. See attached screenshot. | ||||
Additional Information | http://www.mediamonkey.com/forum/viewtopic.php?f=7&t=61876&p=318818 | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Fixed in build | |||||
|
I analyzed the DB and when putting following SQL into SQLViewer script: SELECT LastTimePlayed FROM Songs ORDER BY LastTimePlayed DESC then the first 142 values decrease from 40861,831381863 to 40836,8914583333 and the 143rd value is 40863.382355926 and then it again decreases. i.e. the problem is clearly on the DB layer that it doesn't consider 40,1 and 40.1 as equal values when sorting. Another question is how could the values with the comma get to his DB, with my DB all values have the dot as decimal separator. Maybe a script? |
|
It seems that this could happen on some combination of use locale configuration (just my guess). In order to avoid it I think that we should make sure that all floating point numbers are sent to DB using SQL parameters, not directly in SQL. I.e. something like: 'UPDATE Songs SET TrackModified=? WHERE ID=?'. As for a fix for the existing DBs, we should make sure that the Full DB Maintenance copies floating point values in a consistent manner. |
|
Reminder sent to: Just tested full DB maintenance - Optimize database (complete), but it doesn't fix the decimal separator for affected tracks, i.e. the comma is not converted to the dot. Based on the code revision I haven't found how MM could write the comma decimal separator, it seems to always use dot. @Stephen: Could you ask the user which scripts he uses and attach the forum link here? |
|
I sent him a PM, and forum link is attached above. |
|
This is the iTunes plugin that seems to cause the comma values: http://www.mediamonkey.com/forum/viewtopic.php?f=2&t=45713&st=0&sk=t&sd=a&start=9999 |
|
I notified the author via e-mail. Setting this as resolved, since we can't fix ourselves. |
|
Is there some SQL statement that the user could use to fix the current values in last played, to change from comma to period for the decimal marker? |
|
Confirmed 1465 |