v15 Crash when updating MySQL (MariaDB 10.0.21) [SOLVED]
#16
I think I will wrote a bug report, what do you think ?
Reply
#17
I'm in the process of submitting a PR to fix the segfault. I'd suggest you fix that in your local build (change the second %s to %d) then try again, this time you might get more debug information, although this might be a MariaDB issue (which isn't really supported as a db backend).
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#18
@mitch911: If you pull the latest Kodi (either from master or Isengard) and rebuild, the segfault should be fixed now, in which case there might be more useful information in the debug log when you try the migration again.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#19
OK got it. After your correction I get my error:
Code:
15:47:32 T:139826474481600  NOTICE: Running database version Addons19
15:47:32 T:139826474481600   DEBUG: Initialize, updating databases...
15:47:32 T:139826474481600  NOTICE: Running database version ViewModes6
15:47:32 T:139826474481600  NOTICE: Running database version Textures13
15:47:32 T:139826474481600  NOTICE: Running database version MyMusic52
15:47:32 T:139826474481600   ERROR: Unable to open database: kodi-videos93 [1049](Unknown database 'kodi-videos93')
15:47:32 T:139826474481600   ERROR: Unable to open database: kodi-videos92 [1049](Unknown database 'kodi-videos92')
15:47:32 T:139826474481600   ERROR: Unable to open database: kodi-videos91 [1049](Unknown database 'kodi-videos91')
15:47:32 T:139826474481600  NOTICE: Old database found - updating from version 90 to 93
15:47:32 T:139826474481600   ERROR: SQL: Can't copy schema for table 'kodi-videos90'
                                            Error: 1064
15:47:32 T:139826474481600   ERROR: Unable to copy old database kodi-videos90 to new version kodi-videos93
15:47:32 T:139826474481600  NOTICE: Running database version TV29
15:47:32 T:139826474481600  NOTICE: Running database version Epg10
15:47:32 T:139826474481600   DEBUG: Initialize, updating databases... DONE

I don't know why he can't copy schema from old database. But database is created...
I've try with GRANT OPTION on kodi user with no success.

When I try to import manually my old database, I've got an error from mysql:
Code:
ERROR 1356 (HY000) at line 1571: View 'kodi-videos93.episodeview' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

Try to find some help on Internet for import schema error with no success. For the error from mysql, I have no SQL skill...

Thanks for help Big Grin
Reply
#20
For some reason Kodi is trying to copy a table called "kodi-videos90" which doesn't (and won't) exist - this is actually the name of the source database.

Can you connect to your kodi-videos90 database and execute the following statement:
Code:
SHOW FULL TABLES WHERE Table_type = 'BASE TABLE'
What result do you get?

This is what I get with MySQL 5.5:
Image
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#21
Here what I have:
Code:
MariaDB [kodi-videos90]> SHOW FULL TABLES WHERE Table_type = 'BASE TABLE';
+-------------------------+------------+
| Tables_in_kodi-videos90 | Table_type |
+-------------------------+------------+
| actorlinkepisode        | BASE TABLE |
| actorlinkmovie          | BASE TABLE |
| actorlinktvshow         | BASE TABLE |
| actors                  | BASE TABLE |
| art                     | BASE TABLE |
| artistlinkmusicvideo    | BASE TABLE |
| bookmark                | BASE TABLE |
| country                 | BASE TABLE |
| countrylinkmovie        | BASE TABLE |
| directorlinkepisode     | BASE TABLE |
| directorlinkmovie       | BASE TABLE |
| directorlinkmusicvideo  | BASE TABLE |
| directorlinktvshow      | BASE TABLE |
| episode                 | BASE TABLE |
| files                   | BASE TABLE |
| genre                   | BASE TABLE |
| genrelinkmovie          | BASE TABLE |
| genrelinkmusicvideo     | BASE TABLE |
| genrelinktvshow         | BASE TABLE |
| movie                   | BASE TABLE |
| movielinktvshow         | BASE TABLE |
| musicvideo              | BASE TABLE |
| path                    | BASE TABLE |
| seasons                 | BASE TABLE |
| sets                    | BASE TABLE |
| settings                | BASE TABLE |
| stacktimes              | BASE TABLE |
| streamdetails           | BASE TABLE |
| studio                  | BASE TABLE |
| studiolinkmovie         | BASE TABLE |
| studiolinkmusicvideo    | BASE TABLE |
| studiolinktvshow        | BASE TABLE |
| tag                     | BASE TABLE |
| taglinks                | BASE TABLE |
| tvshow                  | BASE TABLE |
| tvshowlinkpath          | BASE TABLE |
| version                 | BASE TABLE |
| writerlinkepisode       | BASE TABLE |
| writerlinkmovie         | BASE TABLE |
+-------------------------+------------+
39 rows in set (0.00 sec)
Reply
#22
Then I'm not entirely sure why Kodi tried to copy a table called "kodi-videos90".

You can see what Kodi is doing, here.

Error 1064 is apparently caused by invalid SQL.

If you were to add:
Code:
CLog::Log(LOGDEBUG, "SQL: %s", sql);
to line 276 in xbmc/dbwrappers/mysqldataset.cpp, recompile your build and try the migration again, we should see the SQL statement that is causing the problem.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#23
OK done, here it is:
Code:
08:47:21 T:140409505155008   DEBUG: Initialize, updating databases...
08:47:21 T:140409505155008  NOTICE: Running database version ViewModes6
08:47:21 T:140409505155008  NOTICE: Running database version Textures13
08:47:21 T:140409505155008  NOTICE: Running database version MyMusic52
08:47:21 T:140409505155008   ERROR: Unable to open database: kodi-videos93 [1049](Unknown database 'kodi-videos93')
08:47:21 T:140409505155008   ERROR: Unable to open database: kodi-videos92 [1049](Unknown database 'kodi-videos92')
08:47:21 T:140409505155008   ERROR: Unable to open database: kodi-videos91 [1049](Unknown database 'kodi-videos91')
08:47:21 T:140409505155008  NOTICE: Old database found - updating from version 90 to 93
08:47:21 T:140409505155008   DEBUG: SQL: CREATE TABLE kodi-videos93.actorlinkepisode LIKE actorlinkepisode
08:47:21 T:140409505155008   ERROR: SQL: Can't copy schema for table 'kodi-videos90'
                                            Error: 1064
08:47:21 T:140409505155008   ERROR: Unable to copy old database kodi-videos90 to new version kodi-videos93
08:47:21 T:140409505155008  NOTICE: Running database version TV29
08:47:21 T:140409505155008  NOTICE: Running database version Epg10
08:47:21 T:140409505155008   DEBUG: Initialize, updating databases... DONE

Maybe it can help:
Code:
MariaDB [kodi-videos93]> CREATE TABLE kodi-videos93.actorlinkepisode LIKE actorlinkepisode;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-videos93.actorlinkepisode' at line 1
Reply
#24
OK, I've GOT IT !!!

Since I've got error on my system, every time I would delete new database, I have to do this:
Code:
MariaDB [none]> DROP DATABASE `kodi-videos93`;

If I don't use quote character, I've got this:
Code:
MariaDB [(none)]> drop database kodi-videos93;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-videos93' at line 1
Because MariaDB (or MySQL) consider dash an illegal character.

And when I run my request, got the same ! So I've try with quote:
Code:
MariaDB [kodi-videos93]> CREATE TABLE `kodi-videos93`.actorlinkepisode LIKE actorlinkepisode;
ERROR 1066 (42000): Not unique table/alias: 'actorlinkepisode'
And not the same error

So, maybe it's just this ^_^
Reply
#25
Sounds plausible - just rename your kodi-videos90 database to the standard MyVideos90 and stop using the <name> tag.

And the penny has finally dropped on this:
Code:
08:47:21 T:140409505155008   ERROR: SQL: Can't copy schema for table 'kodi-videos90'
                                            Error: 1064
There's a mistake in the source code, it's outputting the database name when it should be the table name - I'll submit a PR later today. Some extra MySQL logging might not go amiss too.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#26
(2015-08-16, 17:40)Milhouse Wrote: Sounds plausible - just rename your kodi-videos90 database to the standard MyVideos90 and stop using the <name> tag.

It's solved my problem. Everything working fine now !!
Thanks Milhouse
Reply
#27
Thanks for confirming. Definitely one more reason to advise against using the <name> tag - it almost always causes trouble! Smile
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply

Logout Mark Read Team Forum Stats Members Help
Crash when updating MySQL (MariaDB 10.0.21) [SOLVED]0