Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use URI path for in-memory database #2511

Merged
merged 5 commits into from
Feb 24, 2020
Merged

Use URI path for in-memory database #2511

merged 5 commits into from
Feb 24, 2020

Conversation

uklotzde
Copy link
Contributor

@uklotzde uklotzde commented Feb 22, 2020

Our connection pool does not work correctly with anonymous in-memory database connections that are used for testing. Only the database schema of the connection on the main thread will be initialized. Connections on other threads start with a fresh database and all queries are doomed to fail!

The tests succeed, but the log is spammed:

LibraryScanner - Cleaning up database...
FwdSqlQuery - Failed to prepare "DELETE FROM LibraryHashes WHERE hash <> :unequalHash AND directory_path NOT IN (SELECT directory FROM track_locations)" : QSqlError("1", "Unable to execute statement", "no such table: LibraryHashes")
DEBUG ASSERT: "query.isPrepared()" in function int {anonymous}::execCleanupQuery(FwdSqlQuery&) at src/library/scanner/libraryscanner.cpp:31
LibraryScanner - Failed to delete orphaned directory hashes
LibraryScanner - Finished database cleanup: 0 ms
src/library/dao/playlistdao.cpp 28 FAILED QUERY [ "SELECT COUNT(*) from PlaylistTracks" ] QSqlError("", "Unable to fetch row", "No query")
src/library/dao/playlistdao.cpp 34 FAILED QUERY [ "SELECT track_id, playlist_id from PlaylistTracks" ] QSqlError("", "Unable to fetch row", "No query")
LibraryScanner - Event loop starting

Fixed by using a named in-memory connection with the actual file name and an additional mode parameter.

Nevertheless I have disabled the LibraryScanner inside TrackCollectionManager during tests to avoid issues caused by concurrent database cleanup tasks that are executed by the LibraryScanner on startup unconditionally.

TODO (see code): The LibraryScanner doesn't belong in there and should be extracted and decoupled from TrackCollectionManager in the long term. #2515

@uklotzde
Copy link
Contributor Author

Out of a sudden various test started to fail in #2508 with SegFaults. After sorting out the dependencies between TrackCollectionManager and LibraryScanner and disabling the LibraryScanner during test runs those issues seem to be solved. That's the reason why this PR got bigger than expected.

@uklotzde uklotzde changed the title Use a named in-memory DB for testing Fix runtime dependencies of LibraryScanner Feb 22, 2020
Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor performance tweaks ...
Just building to test this.

@daschuer
Copy link
Member

Unfortunately the library is empty with this PR.

Warning [Main]: QObject::moveToThread: Cannot move objects with a parent
Critical [Main]: DEBUG ASSERT: "!s_pInstance" in function static void GlobalTrackCache::createInstance(GlobalTrackCacheSaver*, deleteTrackFn_t) at /home/daniel/workspace/qt5mixxx/src/track/globaltrackcache.cpp:200
Warning [Main]: /home/daniel/workspace/qt5mixxx/src/library/basetrackcache.cpp 304 FAILED QUERY [ "SELECT id,played,timesplayed,album_artist,album,artist,title,year,rating,genre,composer,grouping,tracknumber,key,key_id,bpm,bpm_lock,duration,bitrate,replaygain,filetype,datetime_added,location,fs_deleted,comment,mixxx_deleted,color,coverart_source,coverart_type,coverart_location,coverart_hash FROM library_cache_view" ] QSqlError("", "Unable to fetch row", "No query")
Warning [Main]: /home/daniel/workspace/qt5mixxx/src/library/basetrackcache.cpp 558 FAILED QUERY [ "SELECT id FROM library_cache_view WHERE (datetime_added > datetime('now', '-7 days')) AND id in (965,986,44,987,984,985,988,39,978,979,976,58,977,59,982,983,62,981,63,60,61,50,51,48,49,54,55,53,10,11,8,9,14,15,12,3,1,6,4,5,27,24,25,30,16,17,22,23,20,21,98,99,97,74,75,72,73,78,79,77,66,67,64,65,70,71,69,88,94,970,971,968,83,974,80,975,972,973,87,962,84,963,85,960,961,967) ORDER BY lower(artist) COLLATE mixxxLexicographicalCollationFunc ASC, lower(title) COLLATE mixxxLexicographicalCollationFunc ASC, CASE key_id WHEN NULL THEN 0 WHEN 0 THEN 0 WHEN 1 THEN 1 WHEN 2 THEN 15 WHEN 3 THEN 5 WHEN 4 THEN 19 WHEN 5 THEN 9 WHEN 6 THEN 23 WHEN 7 THEN 13 WHEN 8 THEN 3 WHEN 9 THEN 17 WHEN 10 THEN 7 WHEN 11 THEN 21 WHEN 12 THEN 11 WHEN 13 THEN 20 WHEN 14 THEN 10 WHEN 15 THEN 24 WHEN 16 THEN 14 WHEN 17 THEN 4 WHEN 18 THEN 18 WHEN 19 THEN 8 WHEN 20 THEN 22 WHEN 21 THEN 12 WHEN 22 THEN 2 WHEN 23 THEN 16 WHEN 24 THEN 6 END COLLATE mixxxLexicographicalCollationFunc ASC" ] QSqlError("", "Unable to fetch row", "No query")
Warning [Main]: /home/daniel/workspace/qt5mixxx/src/library/basetrackcache.cpp 558 FAILED QUERY [ "SELECT id FROM library_cache_view WHERE (datetime_added > datetime('now', '-7 days')) AND id in (965,986,44,987,984,985,988,39,978,979,976,58,977,59,982,983,62,981,63,60,61,50,51,48,49,54,55,53,10,11,8,9,14,15,12,3,1,6,4,5,27,24,25,30,16,17,22,23,20,21,98,99,97,74,75,72,73,78,79,77,66,67,64,65,70,71,69,88,94,970,971,968,83,974,80,975,972,973,87,962,84,963,85,960,961,967) ORDER BY lower(artist) COLLATE mixxxLexicographicalCollationFunc ASC, lower(title) COLLATE mixxxLexicographicalCollationFunc ASC, CASE key_id WHEN NULL THEN 0 WHEN 0 THEN 0 WHEN 1 THEN 1 WHEN 2 THEN 15 WHEN 3 THEN 5 WHEN 4 THEN 19 WHEN 5 THEN 9 WHEN 6 THEN 23 WHEN 7 THEN 13 WHEN 8 THEN 3 WHEN 9 THEN 17 WHEN 10 THEN 7 WHEN 11 THEN 21 WHEN 12 THEN 11 WHEN 13 THEN 20 WHEN 14 THEN 10 WHEN 15 THEN 24 WHEN 16 THEN 14 WHEN 17 THEN 4 WHEN 18 THEN 18 WHEN 19 THEN 8 WHEN 20 THEN 22 WHEN 21 THEN 12 WHEN 22 THEN 2 WHEN 23 THEN 16 WHEN 24 THEN 6 END COLLATE mixxxLexicographicalCollationFunc ASC" ] QSqlError("", "Unable to fetch row", "No query")
Warning [Main]: /home/daniel/workspace/qt5mixxx/src/library/basetrackcache.cpp 558 FAILED QUERY [ "SELECT id FROM library_cache_view WHERE id in (965,986,44,987,984,985,988,39,978,979,976,58,977,59,982,983,62,981,63,60,61,50,51,48,49,54,55,53,10,11,8,9,14,15,12,3,1,6,4,5,27,24,25,30,16,17,22,23,20,21,98,99,97,74,75,72,73,78,79,77,66,67,64,65,70,71,69,88,94,970,971,968,83,974,80,975,972,973,87,962,84,963,85,960,961,967) ORDER BY duration COLLATE mixxxLexicographicalCollationFunc ASC, bpm COLLATE mixxxLexicographicalCollationFunc ASC, lower(title) COLLATE mixxxLexicographicalCollationFunc ASC" ] QSqlError("", "Unable to fetch row", "No query")
Warning [Controller]: USB permissions problem (or device error.) Your account needs write access to USB HID controllers.
Warning [Main]: /home/daniel/workspace/qt5mixxx/src/library/basetrackcache.cpp 558 FAILED QUERY [ "SELECT id FROM library_cache_view WHERE id in (965,986,44,987,984,985,39,978,979,58,982,59,983,981,62,63,60,61,50,51,48,49,54,55,53,10,11,9,14,15,12,3,1,6,4,5,27,24,25,30,16,17,22,23,20,21,98,99,97,74,75,72,73,78,79,77,66,67,64,65,70,71,69,94,968,83,80,975,972,973,962,84,963,967) " ] QSqlError("", "Unable to fetch row", "No query")
Warning [Main]: /home/daniel/workspace/qt5mixxx/src/library/basetrackcache.cpp 558 FAILED QUERY [ "SELECT id FROM library_cache_view WHERE id in (965,986,44,987,984,985,988,39,978,979,976,58,977,59,982,983,62,981,63,60,61,50,51,48,49,54,55,53,10,11,8,9,14,15,12,3,1,6,4,5,27,24,25,30,16,17,22,23,20,21,98,99,97,74,75,72,73,78,79,77,66,67,64,65,70,71,69,88,94,970,971,968,83,974,80,975,972,973,87,962,84,963,85,960,961,967) ORDER BY duration COLLATE mixxxLexicographicalCollationFunc ASC, bpm COLLATE mixxxLexicographicalCollationFunc ASC, lower(title) COLLATE mixxxLexicographicalCollationFunc ASC" ] QSqlError("", "Unable to fetch row", "No query")
Warning [Main]: /home/daniel/workspace/qt5mixxx/src/library/basetrackcache.cpp 558 FAILED QUERY [ "SELECT id FROM library_cache_view WHERE id in (415,412,413,402,403,400,401,406,407,404,405,362,363,360,361,366,367,364,365,354,355,352,353,358,359,356,357,378,379,376,377,382,383,380,381,370,371,368,369,374,375,372,373,330,331,328,329,334,335,332,333,322,323,320,321,326,327,324,325,346,347,344,345,350,351,348,349,338,339,336,337,342,343,340,341,298,299,296,297,302,303,300,301,290,291,288,289,294,295,292,293,314,315,312,313,318,319,316,317,306,307,304,305,310,311,308,309,266,267,264,265,270,271,268,269,258,259,256,257,262,263,260,261,282,283,280,281,286,287,284,285,274,275,272,273,278,279,276,277,234,235,232,233,238,239,236,237,226,227,224,225,230,231,228,229,250,251,248,249,254,255,252,253,242,243,240,241,246,247,244,245,202,203,200,201,206,207,204,205,194,195,192,193,198,199,196,197,218,219,216,217,222,223,220,221,210,211,208,209,214,215,212,213,170,171,168,169,174,175,172,173,162,163,160,161,166,167,164,165,186,187,184,185,190,191,188,189,178,179,176,177,182,183,180,181,138,139,136,137,142,143,140,141,130,131,128,129,134,135,132,133,154,155,152,153,158,159,156,157,146,147,144,145,150,151,148,149,106,107,104,105,110,111,108,109,102,103,100,101,122,123,120,121,126,127,124,125,114,115,112,113,118,119,116,117,76,68,91,89,92,93,86,46,47,45,56,13,7,18,969,980,938,939,936,937,942,943,940,941,930,931,928,929,934,935,932,933,954,955,952,953,958,959,956,957,946,947,944,945,950,951,948,949,906,907,904,905,910,911,908,909,898,899,896,897,902,903,900,901,922,923,920,921,926,927,924,925,914,915,912,913,918,919,916,917,874,875,872,873,878,879,876,877,866,867,864,865,870,871,868,869,890,891,888,889,894,895,892,893,882,883,880,881,886,887,884,885,842,843,840,841,846,847,844,845,834,835,832,833,838,839,836,837,858,859,856,857,862,863,860,861,850,851,848,849,854,855,852,853,810,811,808,809,814,815,812,813,802,803,800,801,806,807,804,805,826,827,824,825,830,831,828,829,818,819,816,817,822,823,820,821,778,779,776,777,782,783,780,781,770,771,768,769,774,775,772,773,794,795,792,793,798,799,796,797,786,787,784,785,790,791,788,789,746,747,744,745,750,751,748,749,738,739,736,737,742,743,740,741,762,763,760,761,766,767,764,765,754,755,752,753,758,759,756,757,714,715,712,713,718,719,716,717,706,707,704,705,710,711,708,709,730,731,728,729,734,735,732,733,722,723,720,721,726,727,724,725,682,683,680,681,686,687,684,685,674,675,672,673,678,679,676,677,698,699,696,697,702,703,700,701,690,691,688,689,694,695,692,693,650,651,648,649,654,655,652,653,642,643,640,641,646,647,644,645,666,667,664,665,670,671,668,669,658,659,656,657,662,663,660,661,618,619,616,617,622,623,620,621,610,611,608,609,614,615,612,613,634,635,632,633,638,639,636,637,626,627,624,625,630,631,628,629,586,587,584,585,590,591,588,589,578,579,576,577,582,583,580,581,602,603,600,601,606,607,604,605,594,595,592,593,598,599,596,597,554,555,552,553,558,559,556,557,546,547,544,545,550,551,548,549,570,571,568,569,574,575,572,573,562,563,560,561,566,567,564,565,522,523,520,521,526,527,524,525,514,515,512,513,518,519,516,517,538,539,536,537,542,543,540,541,530,531,528,529,534,535,532,533,490,491,488,489,494,495,492,493,482,483,480,481,486,487,484,485,506,507,504,505,510,511,508,509,498,499,496,497,502,503,500,501,458,459,456,457,462,463,460,461,450,451,448,449,454,455,452,453,474,475,472,473,478,479,476,477,466,467,464,465,470,471,468,469,426,427,424,425,430,431,428,429,418,419,416,417,422,423,420,421,442,443,440,441,446,447,444,445,434,435,432,433,438,439,436,437,394,395,392,393,398,399,396,397,386,387,384,385,390,391,388,389,410,411,408,409,414) " ] QSqlError("", "Unable to fetch row", "No query")
Warning [Main]: /home/daniel/workspace/qt5mixxx/src/library/basetrackcache.cpp 558 FAILED QUERY [ "SELECT id FROM library_cache_view WHERE id in (415,412,413,402,403,400,401,406,407,404,405,362,363,360,361,366,367,364,365,354,355,352,353,358,359,356,357,378,379,376,377,382,383,380,381,370,371,368,369,374,375,372,373,330,331,328,329,334,335,332,333,322,323,320,321,326,327,324,325,346,347,344,345,350,351,348,349,338,339,336,337,342,343,340,341,298,299,296,297,302,303,300,301,290,291,288,289,294,295,292,293,314,315,312,313,318,319,316,317,306,307,304,305,310,311,308,309,266,267,264,265,270,271,268,269,258,259,256,257,262,263,260,261,282,283,280,281,286,287,284,285,274,275,272,273,278,279,276,277,234,235,232,233,238,239,236,237,226,227,224,225,230,231,228,229,250,251,248,249,254,255,252,253,242,243,240,241,246,247,244,245,202,203,200,201,206,207,204,205,194,195,192,193,198,199,196,197,218,219,216,217,222,223,220,221,210,211,208,209,214,215,212,213,170,171,168,169,174,175,172,173,162,163,160,161,166,167,164,165,186,187,184,185,190,191,188,189,178,179,176,177,182,183,180,181,138,139,136,137,142,143,140,141,130,131,128,129,134,135,132,133,154,155,152,153,158,159,156,157,146,147,144,145,150,151,148,149,106,107,104,105,110,111,108,109,102,103,100,101,122,123,120,121,126,127,124,125,114,115,112,113,118,119,116,117,76,68,91,89,92,93,86,46,47,45,56,13,7,18,969,980,938,939,936,937,942,943,940,941,930,931,928,929,934,935,932,933,954,955,952,953,958,959,956,957,946,947,944,945,950,951,948,949,906,907,904,905,910,911,908,909,898,899,896,897,902,903,900,901,922,923,920,921,926,927,924,925,914,915,912,913,918,919,916,917,874,875,872,873,878,879,876,877,866,867,864,865,870,871,868,869,890,891,888,889,894,895,892,893,882,883,880,881,886,887,884,885,842,843,840,841,846,847,844,845,834,835,832,833,838,839,836,837,858,859,856,857,862,863,860,861,850,851,848,849,854,855,852,853,810,811,808,809,814,815,812,813,802,803,800,801,806,807,804,805,826,827,824,825,830,831,828,829,818,819,816,817,822,823,820,821,778,779,776,777,782,783,780,781,770,771,768,769,774,775,772,773,794,795,792,793,798,799,796,797,786,787,784,785,790,791,788,789,746,747,744,745,750,751,748,749,738,739,736,737,742,743,740,741,762,763,760,761,766,767,764,765,754,755,752,753,758,759,756,757,714,715,712,713,718,719,716,717,706,707,704,705,710,711,708,709,730,731,728,729,734,735,732,733,722,723,720,721,726,727,724,725,682,683,680,681,686,687,684,685,674,675,672,673,678,679,676,677,698,699,696,697,702,703,700,701,690,691,688,689,694,695,692,693,650,651,648,649,654,655,652,653,642,643,640,641,646,647,644,645,666,667,664,665,670,671,668,669,658,659,656,657,662,663,660,661,618,619,616,617,622,623,620,621,610,611,608,609,614,615,612,613,634,635,632,633,638,639,636,637,626,627,624,625,630,631,628,629,586,587,584,585,590,591,588,589,578,579,576,577,582,583,580,581,602,603,600,601,606,607,604,605,594,595,592,593,598,599,596,597,554,555,552,553,558,559,556,557,546,547,544,545,550,551,548,549,570,571,568,569,574,575,572,573,562,563,560,561,566,567,564,565,522,523,520,521,526,527,524,525,514,515,512,513,518,519,516,517,538,539,536,537,542,543,540,541,530,531,528,529,534,535,532,533,490,491,488,489,494,495,492,493,482,483,480,481,486,487,484,485,506,507,504,505,510,511,508,509,498,499,496,497,502,503,500,501,458,459,456,457,462,463,460,461,450,451,448,449,454,455,452,453,474,475,472,473,478,479,476,477,466,467,464,465,470,471,468,469,426,427,424,425,430,431,428,429,418,419,416,417,422,423,420,421,442,443,440,441,446,447,444,445,434,435,432,433,438,439,436,437,394,395,392,393,398,399,396,397,386,387,384,385,390,391,388,389,410,411,408,409,414) " ] QSqlError("", "Unable to fetch row", "No query")
Warning [Main]: /home/daniel/workspace/qt5mixxx/src/library/basetrackcache.cpp 558 FAILED QUERY [ "SELECT id FROM library_cache_view WHERE id in (965,986,44,987,984,985,988,39,978,979,976,58,977,59,982,983,62,981,63,60,61,50,51,48,49,54,55,53,10,11,8,9,14,15,12,3,1,6,4,5,27,24,25,30,16,17,22,23,20,21,98,99,97,74,75,72,73,78,79,77,66,67,64,65,70,71,69,88,94,970,971,968,83,974,80,975,972,973,87,962,84,963,85,960,961,967) ORDER BY duration COLLATE mixxxLexicographicalCollationFunc ASC, bpm COLLATE mixxxLexicographicalCollationFunc ASC, lower(title) COLLATE mixxxLexicographicalCollationFunc ASC" ] QSqlError("", "Unable to fetch row", "No query")
Warning [LibraryScanner 1]: QSqlDatabasePrivate::removeDatabase: connection 'MIXXX-2' is still in use, all queries will cease to work.

}
params.filePath = QString(QStringLiteral("file://%1")).arg(filePath);
params.filePath = kUriPrefix + absFilePath;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want here:
params.filePath += absFilePath;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈 Fixed

@uklotzde
Copy link
Contributor Author

Merged #2513 into this PR to prevent merge conflicts.

@uklotzde
Copy link
Contributor Author

Hopefully all done and fixed now. Those many open branches and PRs are hard to manage.

@daschuer
Copy link
Member

Unfortunately my library is still empty after merging this branch.

This is the Log output:

Warning [Main]: /home/daniel/workspace/qt5mixxx/src/library/basetrackcache.cpp 273 FAILED QUERY [ "SELECT id,played,timesplayed,album_artist,album,artist,title,year,rating,genre,composer,grouping,tracknumber,key,key_id,bpm,bpm_lock,duration,bitrate,replaygain,filetype,datetime_added,location,fs_deleted,comment,mixxx_deleted,color,coverart_source,coverart_type,coverart_location,coverart_hash FROM library_cache_view" ] QSqlError("", "Unable to fetch row", "No query")
Warning [Main]: /home/daniel/workspace/qt5mixxx/src/library/basetrackcache.cpp 527 FAILED QUERY [ "SELECT id FROM library_cache_view WHERE (datetime_added > datetime('now', '-7 days')) AND id in (63,62,61,60,51,50,49,48,55,54,53,11,10,9,8,15,14,12,3,1,6,5,4,27,25,24,30,17,16,23,22,21,20,99,98,97,971,970,968,975,974,973,972,963,962,961,960,967,965,987,986,985,984,75,74,73,988,72,979,79,978,78,977,77,976,983,67,982,66,981,65,64,71,70,69,88,94,83,80,87,85,84,44,39,59,58) ORDER BY lower(artist) COLLATE mixxxLexicographicalCollationFunc ASC, lower(title) COLLATE mixxxLexicographicalCollationFunc ASC, CASE key_id WHEN NULL THEN 0 WHEN 0 THEN 0 WHEN 1 THEN 1 WHEN 2 THEN 15 WHEN 3 THEN 5 WHEN 4 THEN 19 WHEN 5 THEN 9 WHEN 6 THEN 23 WHEN 7 THEN 13 WHEN 8 THEN 3 WHEN 9 THEN 17 WHEN 10 THEN 7 WHEN 11 THEN 21 WHEN 12 THEN 11 WHEN 13 THEN 20 WHEN 14 THEN 10 WHEN 15 THEN 24 WHEN 16 THEN 14 WHEN 17 THEN 4 WHEN 18 THEN 18 WHEN 19 THEN 8 WHEN 20 THEN 22 WHEN 21 THEN 12 WHEN 22 THEN 2 WHEN 23 THEN 16 WHEN 24 THEN 6 END COLLATE mixxxLexicographicalCollationFunc ASC" ] QSqlError("", "Unable to fetch row", "No query")
Warning [Main]: /home/daniel/workspace/qt5mixxx/src/library/basetrackcache.cpp 527 FAILED QUERY [ "SELECT id FROM library_cache_view WHERE (datetime_added > datetime('now', '-7 days')) AND id in (63,62,61,60,51,50,49,48,55,54,53,11,10,9,8,15,14,12,3,1,6,5,4,27,25,24,30,17,16,23,22,21,20,99,98,97,971,970,968,975,974,973,972,963,962,961,960,967,965,987,986,985,984,75,74,73,988,72,979,79,978,78,977,77,976,983,67,982,66,981,65,64,71,70,69,88,94,83,80,87,85,84,44,39,59,58) ORDER BY lower(artist) COLLATE mixxxLexicographicalCollationFunc ASC, lower(title) COLLATE mixxxLexicographicalCollationFunc ASC, CASE key_id WHEN NULL THEN 0 WHEN 0 THEN 0 WHEN 1 THEN 1 WHEN 2 THEN 15 WHEN 3 THEN 5 WHEN 4 THEN 19 WHEN 5 THEN 9 WHEN 6 THEN 23 WHEN 7 THEN 13 WHEN 8 THEN 3 WHEN 9 THEN 17 WHEN 10 THEN 7 WHEN 11 THEN 21 WHEN 12 THEN 11 WHEN 13 THEN 20 WHEN 14 THEN 10 WHEN 15 THEN 24 WHEN 16 THEN 14 WHEN 17 THEN 4 WHEN 18 THEN 18 WHEN 19 THEN 8 WHEN 20 THEN 22 WHEN 21 THEN 12 WHEN 22 THEN 2 WHEN 23 THEN 16 WHEN 24 THEN 6 END COLLATE mixxxLexicographicalCollationFunc ASC" ] QSqlError("", "Unable to fetch row", "No query")
Warning [Main]: /home/daniel/workspace/qt5mixxx/src/library/basetrackcache.cpp 527 FAILED QUERY [ "SELECT id FROM library_cache_view WHERE id in (63,62,61,60,51,50,49,48,55,54,53,11,10,9,8,15,14,12,3,1,6,5,4,27,25,24,30,17,16,23,22,21,20,99,98,97,971,970,968,975,974,973,972,963,962,961,960,967,965,987,986,985,984,75,74,73,988,72,979,79,978,78,977,77,976,983,67,982,66,981,65,64,71,70,69,88,94,83,80,87,85,84,44,39,59,58) ORDER BY duration COLLATE mixxxLexicographicalCollationFunc ASC, bpm COLLATE mixxxLexicographicalCollationFunc ASC, lower(title) COLLATE mixxxLexicographicalCollationFunc ASC" ] QSqlError("", "Unable to fetch row", "No query")
Warning [Controller]: USB permissions problem (or device error.) Your account needs write access to USB HID controllers.
Warning [LibraryScanner 1]: QSqlDatabasePrivate::removeDatabase: connection 'MIXXX-2' is still in use, all queries will cease to work.

@uklotzde
Copy link
Contributor Author

@daschuer I have absolutely no idea why this doesn't work for you. My plan is to split this PR into two separate parts: URI + everything else.

@uklotzde uklotzde changed the title Fix runtime dependencies of LibraryScanner [WiP] Use URI path for in-memory database Feb 24, 2020
@uklotzde
Copy link
Contributor Author

@daschuer Please test if #2515 works for you. We need to address the SQLite URI issues separately.

@uklotzde uklotzde changed the title [WiP] Use URI path for in-memory database Use URI path for in-memory database Feb 24, 2020
@uklotzde
Copy link
Contributor Author

Rebased the URI in-memory database commits on master. The changes turned out to be completly independent of the LibraryScanner refactoring in #2515 . Both PRs solve the testing issues in a different way, both are justified.

@daschuer
Copy link
Member

I am sorry for you re extra efforts because of my DB migration issue.

This one looks and works still good.

@daschuer daschuer merged commit bd8aa08 into mixxxdj:master Feb 24, 2020
@uklotzde uklotzde deleted the inmemorydb branch February 24, 2020 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants