Latest source build from main (commit bee21d8912c839d647cebf15a15ab006b2980995)
Steps to reproduce:
---
I have been unable to reproduce this since the initial occurrence, but these are the steps I took:
1. Ensure that Mixxx is set up with multiple music directories as part of the library.
2. Open Mixxx, navigate to Preferences.
3. Remove one of the music directories
4. Choose option to delete track metadata.
Expected behaviour:
---
Directory is deleted without fanfare, and without assertions failing.
Actual behaviour:
---
A critical debug assertion is raised:
```
critical [Main] FwdSqlQuery - Failed to prepare "UPDATE library SET timesplayed=q.timesplayed,last_played_at=q.last_played_at FROM(SELECT PlaylistTracks.track_id as id,COUNT(PlaylistTracks.track_id) as timesplayed,MAX(PlaylistTracks.pl_datetime_added) as last_played_at FROM PlaylistTracks JOIN Playlists ON PlaylistTracks.playlist_id=Playlists.id WHERE Playlists.hidden=2 GROUP BY PlaylistTracks.track_id) q WHERE library.id=q.id AND library.id IN (3391)" : QSqlError("1", "Unable to execute statement", "near \"FROM\": syntax error")
critical [Main] DEBUG ASSERT: "!query.hasError()" in function bool TrackDAO::updatePlayCounterFromPlayedHistory(const QSet<TrackId> &) const at /home/smidge/Development/Audio/Mixxx/mixxx-github/src/library/dao/trackdao.cpp:2248
```
The SQL, when formatted better, looks like this:
```sql
UPDATE library
SET timesplayed=q.timesplayed,
last_played_at=q.last_played_at
FROM (
SELECT PlaylistTracks.track_id as id, COUNT(PlaylistTracks.track_id) as timesplayed, MAX(PlaylistTracks.pl_datetime_added) as last_played_at
FROM PlaylistTracks
JOIN Playlists ON PlaylistTracks.playlist_id=Playlists.id
WHERE Playlists.hidden=2
GROUP BY PlaylistTracks.track_id) q
WHERE library.id=q.id
AND library.id IN (3391)
```
Affected version(s):
---
Latest source build from main (commit bee21d8912c839d 647cebf15a15ab0 06b2980995)
Steps to reproduce:
---
I have been unable to reproduce this since the initial occurrence, but these are the steps I took:
1. Ensure that Mixxx is set up with multiple music directories as part of the library.
2. Open Mixxx, navigate to Preferences.
3. Remove one of the music directories
4. Choose option to delete track metadata.
Expected behaviour:
---
Directory is deleted without fanfare, and without assertions failing.
Actual behaviour:
---
A critical debug assertion is raised:
``` q.timesplayed, last_played_ at=q.last_ played_ at FROM(SELECT PlaylistTracks. track_id as id,COUNT( PlaylistTracks. track_id) as timesplayed, MAX(PlaylistTra cks.pl_ datetime_ added) as last_played_at FROM PlaylistTracks JOIN Playlists ON PlaylistTracks. playlist_ id=Playlists. id WHERE Playlists.hidden=2 GROUP BY PlaylistTracks. track_id) q WHERE library.id=q.id AND library.id IN (3391)" : QSqlError("1", "Unable to execute statement", "near \"FROM\": syntax error") :updatePlayCoun terFromPlayedHi story(const QSet<TrackId> &) const at /home/smidge/ Development/ Audio/Mixxx/ mixxx-github/ src/library/ dao/trackdao. cpp:2248
critical [Main] FwdSqlQuery - Failed to prepare "UPDATE library SET timesplayed=
critical [Main] DEBUG ASSERT: "!query.hasError()" in function bool TrackDAO:
```
The SQL, when formatted better, looks like this:
```sql q.timesplayed, played_ at=q.last_ played_ at track_id as id,
COUNT( PlaylistTracks. track_id) as timesplayed,
MAX( PlaylistTracks. pl_datetime_ added) as last_played_at playlist_ id=Playlists. id track_id) q
UPDATE library
SET timesplayed=
last_
FROM (
SELECT PlaylistTracks.
FROM PlaylistTracks
JOIN Playlists ON PlaylistTracks.
WHERE Playlists.hidden=2
GROUP BY PlaylistTracks.
WHERE library.id=q.id
AND library.id IN (3391)
```