xbmc icon indicating copy to clipboard operation
xbmc copied to clipboard

Database migration fails on MariaDB 10.5.21

Open thxwein opened this issue 2 years ago • 5 comments

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

After compiling the latest version of kodi and start this version, there are no movies and tv-series shown on startup. A look in the log shows this error: error : SQL: Can't copy data for table 'actor_link' Error: 1296 2024-01-22 18:42:39.703 T:732 error : Unable to copy old database MyVideos128 to new version MyVideos129

Expected Behavior

Here is a clear and concise description of what was expected to happen:

The Database migration should work without an error. And after start of kodi movies and tv series should be populated.

Actual Behavior

After start of kodi movies and tv-series are not populated.

Possible Fix

To Reproduce

Steps to reproduce the behavior:

  1. remove the database MyVideos129 from mariadb
  2. reboot kodi

Debuglog

The debuglog can be found here: https://paste.kodi.tv/gumolipahi.kodi

Screenshots

Here are some links or screenshots to help explain the problem:

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Your Environment

Used Operating system:

  • [ ] Android

  • [ ] iOS

  • [ ] tvOS

  • [x] Linux

  • [ ] macOS

  • [ ] Windows

  • [ ] Windows UWP

  • Operating system version/name:

  • Arch Linux rolling

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required. Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

thxwein avatar Jan 23 '24 09:01 thxwein

Not reproduced with MariaDB 10.3 or 11.2. Sounds like a problem in your installation. Maybe out of space or a permissions issue.

You should check the MariaDB log file where there is likely something interesting.

CrystalP avatar Jan 23 '24 15:01 CrystalP

When i scrape the movies and the tv-series in the new database everything works as expected. I can add and remove movies without any problems. I have not found any usefull error in the Mariadb log files. Because this is a self build NAS I should consider to upgrade the old Debian OS or at least upgrade the MariaDB Database. It is only when the MyVideodata-Base got upgraded i run into this problems.

thxwein avatar Jan 24 '24 08:01 thxwein

Running the db in docker works well too, you can control the upgrades independently from what your distro decides. Upgrading the DB would be a good idea, but backup first, due to the unknown nature of the problem. There could be some corruption in the database files somehow, who knows what would happen on db engine upgrade.

To experiment, you could try upgrading from an earlier database version (if you kept them, and backup your current v128 first). With Mariadb own command line tools you could also try dumping/restoring the actor_link to see what happens, or dump the entire v128 and restore it under another name, then have Kodi upgrade that copy.

CrystalP avatar Jan 24 '24 12:01 CrystalP

At one point I also had the problem that the database could no longer be updated. I don't know why this happened, it worked perfectly for many years. I then gave up and made an export from Kodi, then flattened the database, set it up again and imported everything again Extremely cumbersome but at least it worked. I hope the problem doesn't occur again

mkreisl avatar Feb 07 '24 18:02 mkreisl

@thxwein if troubleshooting the current db doesn't work, it's indeed an option to export the library, delete/rename the video databases so they don't get picked up for update and Kodi creates a new one, then run import. For best results do export/import with same version of Kodi.

I'll close the ticket in a week in the absence of answer. It's more of a support matter for the forums at this point anyway.

CrystalP avatar Feb 10 '24 22:02 CrystalP

no answer, closing.

CrystalP avatar Mar 01 '24 03:03 CrystalP