v19 LibreELEC Testbuilds for x86_64 (Kodi 19.0)
(2020-06-17, 17:39)Milhouse Wrote:
(2020-06-16, 12:27)wimb0 Wrote: Since build #0527 my Music library is not working anymore. (Movie library is fine)
Main menu says "Library Empty", opening it makes Kodi crash.
Same when opening files section only > Kodi crash.
I'm using a MariaDB on another server for my libraries.

In build #0519 it's working fine.

text:

2020-06-16 12:17:09.272 T:1765 DEBUG <general>: Initialize, updating databases...
2020-06-16 12:17:09.272 T:1765 INFO <general>: Running database version Addons27
2020-06-16 12:17:09.272 T:1765 INFO <general>: Running database version ViewModes6
2020-06-16 12:17:09.273 T:1765 INFO <general>: Running database version Textures13
2020-06-16 12:17:09.274 T:1765 INFO <general>: WakeOnAccess [192.168.1.4] trigged by accessing : MySQL : MyMusic77
2020-06-16 12:17:09.275 T:1765 INFO <general>: WakeOnAccess success exit, server already running
2020-06-16 12:17:09.276 T:1765 INFO <general>: MYSQL: Connected to version 10.4.13-MariaDB-1:10.4.13+maria~bionic-log
2020-06-16 12:17:09.278 T:1765 INFO <general>: Attempting to update the database MyMusic77 from version 75 to 77
2020-06-16 12:17:09.278 T:1765 DEBUG <general>: Mysql Start transaction
2020-06-16 12:17:09.279 T:1765 ERROR <general>: SQL: Can't determine list of routines to drop.
2020-06-16 12:17:09.279 T:1765 ERROR <general>: Exception updating database MyMusic77 from version 75 to 77
2020-06-16 12:17:09.279 T:1765 ERROR <general>: Error updating database MyMusic77 from version 75 to 77
2020-06-16 12:17:09.280 T:1765 DEBUG <general>: Mysql rollback transaction
2020-06-16 12:17:09.281 T:1765 INFO <general>: Old database found - updating from version 76 to 77
2020-06-16 12:17:09.282 T:1765 ERROR <general>: SQL: Can't create database for copy: 'MyMusic76' (1007)
2020-06-16 12:17:09.282 T:1765 ERROR <general>: Unable to copy old database MyMusic76 to new version MyMusic77
2020-06-16 12:17:09.284 T:1765 INFO <general>: Running database version MyVideos117
2020-06-16 12:17:09.285 T:1765 INFO <general>: Running database version TV36
2020-06-16 12:17:09.285 T:1765 INFO <general>: Running database version Epg13
2020-06-16 12:17:09.285 T:1765 DEBUG <general>: Initialize, updating databases... DONE

It looks like the database migration from MyMusic75 to MyMusic76 is failing for some reason - can you drop MyMusic77 and also MyMusic76 (if they exist), turn on debugging then upload a debug log after attempting another migration from MyMusic75 to MyMusic76?

Are you sure this issue started with #0527? Both #0527 and also #0519 are using MyMusic75, so #0527 should be your last working build (assuming there's nothing wrong with your MyMusic75 database, of course).

Build #0601 introduced MyMusic76 with PR17838, and build #0609 introduced MyMusic77 with PR17990, so probably best to test with #0601 until MyMusic76 has been migrated successfully.

The error you are seeing is in this piece of code: https://github.com/xbmc/xbmc/blob/941afd...t.cpp#L451 added by PR17838, which might suggest a permission problem of some kind in the MariaDB server, or possibly even a compatibility issue as the new code may not be compatible with MariaDB (either all, or only some MariaDB server versions - but that's a total guess).

Can you check if you are able to execute the following query against your MariaDB server while using the kodi sql user:
text:

SELECT routine_name
FROM information_schema.routines
WHERE routine_type = 'FUNCTION' and routine_schema = 'MyMusic76'

With a MySQL server 5.5.x, the above query returns the following:
text:

udfFirstNumberPos
udfNaturalSortFormat
udfSymbolShift

Please post any errors you see when executing the query.

Thanks for the reply and for digging in the logs.
I just verified it is indeed working correctly with #0527.

The user kodi has ALL PRIVILEGES on my sql server."

Checked the routine_name query:
text:

SELECT routine_name
FROM information_schema.routines
WHERE routine_type = 'FUNCTION' and routine_schema = 'MyMusic76'

Gave no results, 0 rows.

I dropped MyMusic76 and MyMusic77, and re-updated to #0601.
Upgrade seems to have worked fine this time.

text:

2020-06-22 11:43:13.395 T:1371     INFO <general>: WakeOnAccess [192.168.1.4] trigged by accessing : MySQL : MyMusic76
2020-06-22 11:43:13.396 T:1371     INFO <general>: WakeOnAccess success exit, server already running
2020-06-22 11:43:13.397 T:1371     INFO <general>: MYSQL: Connected to version 10.4.13-MariaDB-1:10.4.13+maria~bionic-log
2020-06-22 11:43:13.399 T:1371    ERROR <general>: Unable to open database: MyMusic76 [1049](Unknown database 'MyMusic76')
2020-06-22 11:43:13.401 T:1371     INFO <general>: Old database found - updating from version 75 to 76
2020-06-22 11:43:16.268 T:1371     INFO <general>: Attempting to update the database MyMusic76 from version 75 to 76
2020-06-22 11:43:17.357 T:1371     INFO <general>: UpdateTables - updating tables
2020-06-22 11:43:17.358 T:1371     INFO <general>: CreateAnalytics - creating indices
2020-06-22 11:43:24.207 T:1371     INFO <general>: create triggers
2020-06-22 11:43:24.276 T:1371     INFO <general>: Create native MySQL/MariaDB functions
2020-06-22 11:43:24.298 T:1371     INFO <general>: create song view
2020-06-22 11:43:24.302 T:1371     INFO <general>: create album view
2020-06-22 11:43:24.310 T:1371     INFO <general>: create artist view
2020-06-22 11:43:24.319 T:1371     INFO <general>: create albumartist view
2020-06-22 11:43:24.327 T:1371     INFO <general>: create songartist view
2020-06-22 11:43:24.391 T:1371     INFO <general>: Update to version 76 successful

Now when I run the query, it shows the correct result:
text:

SELECT routine_name
FROM information_schema.routines
WHERE routine_type = 'FUNCTION' and routine_schema = 'MyMusic76'

routine_name    
udfFirstNumberPos    
udfNaturalSortFormat    
udfSymbolShift    

Music library in Kodi working again in #0601.

After that I updated to #0617, and the database correctly upgraded itself to 77.
text:

2020-06-22 12:13:46.116 T:1377     INFO <general>: Update to version 77 successful

Now running #0617, and everything is working fine!

I have no idea what the exact cause was, but thanks for pointing me in the right direction.
Reply


Messages In This Thread
RE: LibreELEC Testbuilds for x86_64 (Kodi 19.0) - by wimb0 - 2020-06-22, 12:40
Logout Mark Read Team Forum Stats Members Help
LibreELEC Testbuilds for x86_64 (Kodi 19.0)3