Kodi Community Forum

Full Version: Empty Kodi Library - MariaDB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys

A number of weeks back I posted a thread about upgrading to 17.0 Beta 1 and my library being empty. Memphiz had a look and identified it as being an issue with MariaDB. No solution was found so since the thread died a death I have had reverted back to local Kodi DB meaning I have lost all my scraping/custom art/watch flags etc. I also have no central db for my other kodi boxes. I am really surprised other people have not come across this issue as well as I would imagine using a Synology to host the SQL DB is not uncommon. What sticks in my mind is that the issue happened after I upgraded to 17.0 Beta 1. No changes were made to my synology or MariaDB install which means it has to be something in the Kodi code?

Would anyone be willing to have another look into this for me? I would love to get it fixed

Thanks very much
I can't immediately offer any assistance without breaking my MySQL setup (and, probably, my server in the process).

FWIW, the commit you mention in the other thread (2cac3e3) narrows it down to something around this time:

https://github.com/xbmc/xbmc/commits/17....on?page=25

If you're in a position to build your own version, you could split the code to find the specific commit that breaks things (as you have a version that works from this commit, and a version that doesn't, which is in your first post on that thread). There can't be many commits in between; indeed, you may be able to simply inspect them on Github to look for anything that relates to database changes. If you have nightly builds and you know that it broke with the very next build, then you also know the day on which the "offending commit" was introduced (19/07?) as well. There appear to be a couple of database-related commits on that day (fair warning: I didn't read them in detail!).
Thanks Prof Yaffle

I have no experiencing building my own version but will give it a go. Is there any guides you can point me to?
On a Mac? Here: http://kodi.wiki/view/HOW-TO:Compile_Kodi_for_Mac_OS_X

Looking at the errors, it's all upgrade-related... have you tried dropping the existing db tables (take a backup first, obviously...) and seeing if it works on a clean installation? An export/import of the db contents should keep the data intact.
Hmm, I'll see if I can help root out this issue. I've been wanting to test the v17 builds myself, but every time I have tried I ended up with an empty library. I'm also running my database from MariaDB on a Synology 415+. Luckily, I am on vacation next week, which really just means I have a week at home to catch up on hobby projects. I'll just add chasing this bug down to my list of projects. ?

UPDATE: So, I exported my database on 16.1 to a single file.
-Upgraded to 17 and database was blank.
-Imported Library, still blank.
-Renamed advancedsettings.xml to .xml.bak and reloaded to revert to local sqlite3 database instance. Imported library and this time it worked.

So Kodi v17 definitely doesn't like my remote library setup. Next test is to create a MySQL server on one of my linux VMs and test again.

UPDATE 2: I tested importing the database with both MySQL server on Ubuntu 16.04 Server VM and MariaDB 10.1 on Ubuntu 16.04 Desktop VM. In both cases it worked fine, which leads me to conclude that there is some kind of incompatibility with recent database changes and the Synology implementation of MariaDB.
Hi guys

Just to update this. I took a backup of the SQL DB via phpmyadmin but didn’t test it first. I blew away all SQL tables as a test to see if Kodi would create new tables and it did no problem. I then went to restore my backup and realised it only contained older tables - DAM! I ended up rescanning the library from scratch and all is now well.

Note to myself - Always check backups before deleting Smile