DB messed up in GIT?
#1
Hi,
I'm compling xbmc from git and have a strange issue. My MySQL-DB seems to be not working anymore at all.
I can't play anything from the DB, because of wrong path:
Code:
16:37:34 T:3024092016 M:1505640448   DEBUG: DoWork - trying to extract thumb from video file 0/mnt/serien/Akte-X.dl/season.1/
16:37:35 T:3024092016 M:1505640448   ERROR: InputStream: Error opening, 0/mnt/serien/Akte-X.dl/season.1/
16:37:35 T:3003120496 M:1505386496   ERROR: GetDirectory - Error getting 0/mnt/serien/Akte-X.dl/season.1/
16:37:35 T:3034557296 M:1505386496   DEBUG: DoWork - trying to extract thumb from video file 1/mnt/serien/Akte-X.dl/season.1/
16:37:35 T:3034557296 M:1505386496   ERROR: InputStream: Error opening, 1/mnt/serien/Akte-X.dl/season.1/
16:37:35 T:3003120496 M:1505615872   ERROR: GetDirectory - Error getting 1/mnt/serien/Akte-X.dl/season.1/
(it's the number at the beginning.)
I took a look into the db, the path is correct:
Code:
|         1 |      1 | Gezeichnet | Eine junge FBI-Agentin wird einem anderen Agenten zugewiesen, um ihn zu �berwachen, und dadurch mitten in seine Untersuchungen des Paranormalen und der unerkl�rten Ph�nomene gezogen |      | 7.000000 | Chris Carter | 1993-09-10 | <thumb>http://thetvdb.com/banners/episodes/77398/240471.jpg</thumb> |      | NULL |      | Robert Mandel |      | 1    | 1    |      | -1   | -1   | -1   | /mnt/serien/Akte-X.dl/season.1/Akte-X.S01E01.avi | NULL | NULL | NULL | NULL
What's going on, is this a known issue?
complete log: http://paste2.org/p/1304242

thx
f
freaksworth is not connected to or in any other way affiliated with XBMC, Team XBMC, or the XBMC Foundation.
Reply
#2
Ditto
Reply
#3
Same here as on Windows... something about the DB/VFS abstraction changed and broke everything. It's no longer finding or playing anything.

File mode, this repeats for every directory I browse:
Code:
15:35:32 T:6244 M:4294967295   ERROR: InputStream: Error opening, 0/smb://Server/TV Shows/30 Rock/Season 1/
15:35:32 T:3976 M:4294967295 WARNING: XFILE::CFactoryDirectory::Create - Unsupported protocol(0/smb) in 0/smb://Server/TV Shows/30 Rock/Season 1/
15:35:32 T:7728 M:4294967295 WARNING: XFILE::CFileFactory::CreateLoader - Unsupported protocol(0/smb) in 0/smb://Server/TV Shows/30 Rock/Season 1/

Library mode, this repeats for every file in my library:
Code:
15:36:38 T:6268 M:4294967295   ERROR: SQL: Undefined MySQL error: Code (1054)
                                            Query: select * from movieview where c22='smb://Server/Movies/DVD/The Ring (2002).iso' limit 1
15:36:38 T:6268 M:4294967295   ERROR: CVideoDatabase::GetMoviesByWhere failed
Living Room: ASUS Chromebox / OpeneElec 5 / Kodi 14.2
Bedroom: Amazon FireTV Stick / Kodi 14.2
Home Office: Amazon FireTV Stick / Kodi 14.2
Windows Server: Intel Core i3-2100T / 8GB Ram / 48TB / MySQL / StableBit DrivePool on Server 2012 R2 Standard
Reply
#4
I think there are two issues:

The file abstraction/vfs implementation changed and is not working. (My first code block)

The library issue seems to stem from the fact that column c22 doesn't exist in the movieview view, but it exists in the movie table. (My second code block).

This is happening on both Windows and Linux platforms:
http://forum.xbmc.org/showthread.php?tid=97124
http://forum.xbmc.org/showthread.php?tid=97069
Living Room: ASUS Chromebox / OpeneElec 5 / Kodi 14.2
Bedroom: Amazon FireTV Stick / Kodi 14.2
Home Office: Amazon FireTV Stick / Kodi 14.2
Windows Server: Intel Core i3-2100T / 8GB Ram / 48TB / MySQL / StableBit DrivePool on Server 2012 R2 Standard
Reply
#5
This fixes the library issue, this will just add c22 to the movieview view. You must drop the existing view then run this script to recreate it:

Code:
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `xbmc_video`.`movieview` AS select `xbmc_video`.`movie`.`idMovie` AS `idMovie`,`xbmc_video`.`movie`.`idFile` AS `idFile`,`xbmc_video`.`movie`.`c00` AS `c00`,`xbmc_video`.`movie`.`c01` AS `c01`,`xbmc_video`.`movie`.`c02` AS `c02`,`xbmc_video`.`movie`.`c03` AS `c03`,`xbmc_video`.`movie`.`c04` AS `c04`,`xbmc_video`.`movie`.`c05` AS `c05`,`xbmc_video`.`movie`.`c06` AS `c06`,`xbmc_video`.`movie`.`c07` AS `c07`,`xbmc_video`.`movie`.`c08` AS `c08`,`xbmc_video`.`movie`.`c09` AS `c09`,`xbmc_video`.`movie`.`c10` AS `c10`,`xbmc_video`.`movie`.`c11` AS `c11`,`xbmc_video`.`movie`.`c12` AS `c12`,`xbmc_video`.`movie`.`c13` AS `c13`,`xbmc_video`.`movie`.`c14` AS `c14`,`xbmc_video`.`movie`.`c15` AS `c15`,`xbmc_video`.`movie`.`c16` AS `c16`,`xbmc_video`.`movie`.`c17` AS `c17`,`xbmc_video`.`movie`.`c18` AS `c18`,`xbmc_video`.`movie`.`c19` AS `c19`,`xbmc_video`.`movie`.`c20` AS `c20`,`xbmc_video`.`movie`.`c21` AS `c21`,`xbmc_video`.`movie`.`c22` AS `c22`,`xbmc_video`.`files`.`strFilename` AS `strFileName`,`xbmc_video`.`path`.`strPath` AS `strPath`,`xbmc_video`.`files`.`playCount` AS `playCount`,`xbmc_video`.`files`.`lastPlayed` AS `lastPlayed` from ((`xbmc_video`.`movie` join `xbmc_video`.`files` on((`xbmc_video`.`files`.`idFile` = `xbmc_video`.`movie`.`idFile`))) join `xbmc_video`.`path` on((`xbmc_video`.`path`.`idPath` = `xbmc_video`.`files`.`idPath`)))

This does NOT address the VFS errors, that's broken in code.
Living Room: ASUS Chromebox / OpeneElec 5 / Kodi 14.2
Bedroom: Amazon FireTV Stick / Kodi 14.2
Home Office: Amazon FireTV Stick / Kodi 14.2
Windows Server: Intel Core i3-2100T / 8GB Ram / 48TB / MySQL / StableBit DrivePool on Server 2012 R2 Standard
Reply
#6
VFS is not broken - they're both the exact same cause.

Looks like the view needs dropping + adding. Weird that it doesn't affect sqlite.

Thanks for the analysis.

EDIT: Right, SQLite views are always dynamic. MySQL views are created static and stay static. What a pain in the arse.

I've created a ticket: http://trac.xbmc.org/ticket/11340

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
jmarshall Wrote:VFS is not broken - they're both the exact same cause.

Looks like the view needs dropping + adding. Weird that it doesn't affect sqlite.

Ahh yes, I'm an idiot, Tongue. After I fixed the 'movieview' view and I verified that my movies were showing up, I went and tried to play a TV Show in the Video view and it kept throwing the same error. Of course it was, I never fixed 'episodeview'.

I'm also using MySQL WorkBench and if you right click on the view and
alter it, you don't need to drop the view and recreate it.

movieview:
Code:
CREATE ALGORITHM=UNDEFINED DEFINER=`xbmc`@`%` SQL SECURITY DEFINER VIEW `xbmc_video`.`movieview` AS select `xbmc_video`.`movie`.`idMovie` AS `idMovie`,`xbmc_video`.`movie`.`idFile` AS `idFile`,`xbmc_video`.`movie`.`c00` AS `c00`,`xbmc_video`.`movie`.`c01` AS `c01`,`xbmc_video`.`movie`.`c02` AS `c02`,`xbmc_video`.`movie`.`c03` AS `c03`,`xbmc_video`.`movie`.`c04` AS `c04`,`xbmc_video`.`movie`.`c05` AS `c05`,`xbmc_video`.`movie`.`c06` AS `c06`,`xbmc_video`.`movie`.`c07` AS `c07`,`xbmc_video`.`movie`.`c08` AS `c08`,`xbmc_video`.`movie`.`c09` AS `c09`,`xbmc_video`.`movie`.`c10` AS `c10`,`xbmc_video`.`movie`.`c11` AS `c11`,`xbmc_video`.`movie`.`c12` AS `c12`,`xbmc_video`.`movie`.`c13` AS `c13`,`xbmc_video`.`movie`.`c14` AS `c14`,`xbmc_video`.`movie`.`c15` AS `c15`,`xbmc_video`.`movie`.`c16` AS `c16`,`xbmc_video`.`movie`.`c17` AS `c17`,`xbmc_video`.`movie`.`c18` AS `c18`,`xbmc_video`.`movie`.`c19` AS `c19`,`xbmc_video`.`movie`.`c20` AS `c20`,`xbmc_video`.`movie`.`c21` AS `c21`,`xbmc_video`.`movie`.`c22` AS `c22`,`xbmc_video`.`files`.`strFilename` AS `strFileName`,`xbmc_video`.`path`.`strPath` AS `strPath`,`xbmc_video`.`files`.`playCount` AS `playCount`,`xbmc_video`.`files`.`lastPlayed` AS `lastPlayed` from ((`xbmc_video`.`movie` join `xbmc_video`.`files` on((`xbmc_video`.`files`.`idFile` = `xbmc_video`.`movie`.`idFile`))) join `xbmc_video`.`path` on((`xbmc_video`.`path`.`idPath` = `xbmc_video`.`files`.`idPath`)))

episodeview:
Code:
CREATE ALGORITHM=UNDEFINED DEFINER=`xbmc`@`%` SQL SECURITY DEFINER VIEW `xbmc_video`.`episodeview` AS select `xbmc_video`.`episode`.`idEpisode` AS `idEpisode`,`xbmc_video`.`episode`.`idFile` AS `idFile`,`xbmc_video`.`episode`.`c00` AS `c00`,`xbmc_video`.`episode`.`c01` AS `c01`,`xbmc_video`.`episode`.`c02` AS `c02`,`xbmc_video`.`episode`.`c03` AS `c03`,`xbmc_video`.`episode`.`c04` AS `c04`,`xbmc_video`.`episode`.`c05` AS `c05`,`xbmc_video`.`episode`.`c06` AS `c06`,`xbmc_video`.`episode`.`c07` AS `c07`,`xbmc_video`.`episode`.`c08` AS `c08`,`xbmc_video`.`episode`.`c09` AS `c09`,`xbmc_video`.`episode`.`c10` AS `c10`,`xbmc_video`.`episode`.`c11` AS `c11`,`xbmc_video`.`episode`.`c12` AS `c12`,`xbmc_video`.`episode`.`c13` AS `c13`,`xbmc_video`.`episode`.`c14` AS `c14`,`xbmc_video`.`episode`.`c15` AS `c15`,`xbmc_video`.`episode`.`c16` AS `c16`,`xbmc_video`.`episode`.`c17` AS `c17`,`xbmc_video`.`episode`.`c18` AS `c18`,`xbmc_video`.`episode`.`c19` AS `c19`,`xbmc_video`.`episode`.`c20` AS `c20`,`xbmc_video`.`episode`.`c21` AS `c21`,`xbmc_video`.`episode`.`c22` AS `c22`,`xbmc_video`.`files`.`strFilename` AS `strFileName`,`xbmc_video`.`path`.`strPath` AS `strPath`,`xbmc_video`.`files`.`playCount` AS `playCount`,`xbmc_video`.`files`.`lastPlayed` AS `lastPlayed`,`xbmc_video`.`tvshow`.`c00` AS `strTitle`,`xbmc_video`.`tvshow`.`c14` AS `strStudio`,`xbmc_video`.`tvshow`.`idShow` AS `idShow`,`xbmc_video`.`tvshow`.`c05` AS `premiered`,`xbmc_video`.`tvshow`.`c13` AS `mpaa` from ((((`xbmc_video`.`episode` join `xbmc_video`.`files` on((`xbmc_video`.`files`.`idFile` = `xbmc_video`.`episode`.`idFile`))) join `xbmc_video`.`tvshowlinkepisode` on((`xbmc_video`.`episode`.`idEpisode` = `xbmc_video`.`tvshowlinkepisode`.`idEpisode`))) join `xbmc_video`.`tvshow` on((`xbmc_video`.`tvshow`.`idShow` = `xbmc_video`.`tvshowlinkepisode`.`idShow`))) join `xbmc_video`.`path` on((`xbmc_video`.`files`.`idPath` = `xbmc_video`.`path`.`idPath`)))

musicvideoview:
Code:
CREATE ALGORITHM=UNDEFINED DEFINER=`xbmc`@`%` SQL SECURITY DEFINER VIEW `xbmc_video`.`musicvideoview` AS select `xbmc_video`.`musicvideo`.`idMVideo` AS `idMVideo`,`xbmc_video`.`musicvideo`.`idFile` AS `idFile`,`xbmc_video`.`musicvideo`.`c00` AS `c00`,`xbmc_video`.`musicvideo`.`c01` AS `c01`,`xbmc_video`.`musicvideo`.`c02` AS `c02`,`xbmc_video`.`musicvideo`.`c03` AS `c03`,`xbmc_video`.`musicvideo`.`c04` AS `c04`,`xbmc_video`.`musicvideo`.`c05` AS `c05`,`xbmc_video`.`musicvideo`.`c06` AS `c06`,`xbmc_video`.`musicvideo`.`c07` AS `c07`,`xbmc_video`.`musicvideo`.`c08` AS `c08`,`xbmc_video`.`musicvideo`.`c09` AS `c09`,`xbmc_video`.`musicvideo`.`c10` AS `c10`,`xbmc_video`.`musicvideo`.`c11` AS `c11`,`xbmc_video`.`musicvideo`.`c12` AS `c12`,`xbmc_video`.`musicvideo`.`c13` AS `c13`,`xbmc_video`.`musicvideo`.`c14` AS `c14`,`xbmc_video`.`musicvideo`.`c15` AS `c15`,`xbmc_video`.`musicvideo`.`c16` AS `c16`,`xbmc_video`.`musicvideo`.`c17` AS `c17`,`xbmc_video`.`musicvideo`.`c18` AS `c18`,`xbmc_video`.`musicvideo`.`c19` AS `c19`,`xbmc_video`.`musicvideo`.`c20` AS `c20`,`xbmc_video`.`musicvideo`.`c21` AS `c21`,`xbmc_video`.`musicvideo`.`c22` AS `c22`,`xbmc_video`.`files`.`strFilename` AS `strFileName`,`xbmc_video`.`path`.`strPath` AS `strPath`,`xbmc_video`.`files`.`playCount` AS `playCount`,`xbmc_video`.`files`.`lastPlayed` AS `lastPlayed` from ((`xbmc_video`.`musicvideo` join `xbmc_video`.`files` on((`xbmc_video`.`files`.`idFile` = `xbmc_video`.`musicvideo`.`idFile`))) join `xbmc_video`.`path` on((`xbmc_video`.`path`.`idPath` = `xbmc_video`.`files`.`idPath`)))

This solved all my problems, everything loads and plays fine again.
Living Room: ASUS Chromebox / OpeneElec 5 / Kodi 14.2
Bedroom: Amazon FireTV Stick / Kodi 14.2
Home Office: Amazon FireTV Stick / Kodi 14.2
Windows Server: Intel Core i3-2100T / 8GB Ram / 48TB / MySQL / StableBit DrivePool on Server 2012 R2 Standard
Reply
#8
Thanks for working this out.
freaksworth is not connected to or in any other way affiliated with XBMC, Team XBMC, or the XBMC Foundation.
Reply
#9
It goes without saying, The `root` part in the sql code needs to be modified to whatever mysql user that you use for xbmc.
Reply
#10
... happened again. /o\
freaksworth is not connected to or in any other way affiliated with XBMC, Team XBMC, or the XBMC Foundation.
Reply
#11
Updated to git of jun 15, same issue.

First tried to fix by dropping the views mentioned above and recreating. But now I dont even get anything displayed in movies? anyone have similiar problems?
Reply
#12
Yeah, I have the issue too, the db went dead, and this time there are no sql errors, last times there have been an error in creating db stuff in the log file, so I manually can see and understand whats wrong, perhaps its something more serious this time.
Reply
#13
yes, weird thing is that there were absolutely no errors, but when browsing the library you get the same 0/smb 1/smb 2/smb unsupported protocol errors.
Reply
#14
Drop the views and recreate them exactly as specified in this thread.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#15
jmarshall Wrote:Drop the views and recreate them exactly as specified in this thread.

I have done the alter operation on all 3 views and behaviour is still the same. ie. playcount number infront of c22. I tried both alter operation and drop view/recreate - no luck with either. Anything more I could do?

OK nvm, seems that c23 is a new column and this needs to be manually added to all the views.

movieview:
Code:
CREATE ALGORITHM=UNDEFINED DEFINER=`xbmc`@`%` SQL SECURITY DEFINER VIEW `movieview` AS select `movie`.`idMovie` AS `idMovie`,`movie`.`idFile` AS `idFile`,`movie`.`c00` AS `c00`,`movie`.`c01` AS `c01`,`movie`.`c02` AS `c02`,`movie`.`c03` AS `c03`,`movie`.`c04` AS `c04`,`movie`.`c05` AS `c05`,`movie`.`c06` AS `c06`,`movie`.`c07` AS `c07`,`movie`.`c08` AS `c08`,`movie`.`c09` AS `c09`,`movie`.`c10` AS `c10`,`movie`.`c11` AS `c11`,`movie`.`c12` AS `c12`,`movie`.`c13` AS `c13`,`movie`.`c14` AS `c14`,`movie`.`c15` AS `c15`,`movie`.`c16` AS `c16`,`movie`.`c17` AS `c17`,`movie`.`c18` AS `c18`,`movie`.`c19` AS `c19`,`movie`.`c20` AS `c20`,`movie`.`c21` AS `c21`,`movie`.`c22` AS `c22`,`movie`.`c23` AS `c23`,`files`.`strFilename` AS `strFileName`,`path`.`strPath` AS `strPath`,`files`.`playCount` AS `playCount`,`files`.`lastPlayed` AS `lastPlayed` from ((`movie` join `files` on((`files`.`idFile` = `movie`.`idFile`))) join `path` on((`path`.`idPath` = `files`.`idPath`)))

episodeview:
Code:
CREATE ALGORITHM=UNDEFINED DEFINER=`xbmc`@`%` SQL SECURITY DEFINER VIEW `episodeview` AS select `episode`.`idEpisode` AS `idEpisode`,`episode`.`idFile` AS `idFile`,`episode`.`c00` AS `c00`,`episode`.`c01` AS `c01`,`episode`.`c02` AS `c02`,`episode`.`c03` AS `c03`,`episode`.`c04` AS `c04`,`episode`.`c05` AS `c05`,`episode`.`c06` AS `c06`,`episode`.`c07` AS `c07`,`episode`.`c08` AS `c08`,`episode`.`c09` AS `c09`,`episode`.`c10` AS `c10`,`episode`.`c11` AS `c11`,`episode`.`c12` AS `c12`,`episode`.`c13` AS `c13`,`episode`.`c14` AS `c14`,`episode`.`c15` AS `c15`,`episode`.`c16` AS `c16`,`episode`.`c17` AS `c17`,`episode`.`c18` AS `c18`,`episode`.`c19` AS `c19`,`episode`.`c20` AS `c20`,`episode`.`c21` AS `c21`,`episode`.`c22` AS `c22`,`episode`.`c23` AS `c23`,`files`.`strFilename` AS `strFileName`,`path`.`strPath` AS `strPath`,`files`.`playCount` AS `playCount`,`files`.`lastPlayed` AS `lastPlayed`,`tvshow`.`c00` AS `strTitle`,`tvshow`.`c14` AS `strStudio`,`tvshow`.`idShow` AS `idShow`,`tvshow`.`c05` AS `premiered`,`tvshow`.`c13` AS `mpaa` from ((((`episode` join `files` on((`files`.`idFile` = `episode`.`idFile`))) join `tvshowlinkepisode` on((`episode`.`idEpisode` = `tvshowlinkepisode`.`idEpisode`))) join `tvshow` on((`tvshow`.`idShow` = `tvshowlinkepisode`.`idShow`))) join `path` on((`files`.`idPath` = `path`.`idPath`)))

tvshowview:
Code:
CREATE ALGORITHM=UNDEFINED DEFINER=`xbmc`@`%` SQL SECURITY DEFINER VIEW `tvshowview` AS select `tvshow`.`idShow` AS `idShow`,`tvshow`.`c00` AS `c00`,`tvshow`.`c01` AS `c01`,`tvshow`.`c02` AS `c02`,`tvshow`.`c03` AS `c03`,`tvshow`.`c04` AS `c04`,`tvshow`.`c05` AS `c05`,`tvshow`.`c06` AS `c06`,`tvshow`.`c07` AS `c07`,`tvshow`.`c08` AS `c08`,`tvshow`.`c09` AS `c09`,`tvshow`.`c10` AS `c10`,`tvshow`.`c11` AS `c11`,`tvshow`.`c12` AS `c12`,`tvshow`.`c13` AS `c13`,`tvshow`.`c14` AS `c14`,`tvshow`.`c15` AS `c15`,`tvshow`.`c16` AS `c16`,`tvshow`.`c17` AS `c17`,`tvshow`.`c18` AS `c18`,`tvshow`.`c19` AS `c19`,`tvshow`.`c20` AS `c20`,`tvshow`.`c21` AS `c21`,`tvshow`.`c22` AS `c22`,`tvshow`.`c23` AS `c23`,`path`.`strPath` AS `strPath`,nullif(count(`episode`.`c12`),0) AS `totalCount`,count(`files`.`playCount`) AS `watchedcount`,nullif(count(distinct `episode`.`c12`),0) AS `totalSeasons` from (((((`tvshow` left join `tvshowlinkpath` on((`tvshowlinkpath`.`idShow` = `tvshow`.`idShow`))) left join `path` on((`path`.`idPath` = `tvshowlinkpath`.`idPath`))) left join `tvshowlinkepisode` on((`tvshowlinkepisode`.`idShow` = `tvshow`.`idShow`))) left join `episode` on((`episode`.`idEpisode` = `tvshowlinkepisode`.`idEpisode`))) left join `files` on((`files`.`idFile` = `episode`.`idFile`))) group by `tvshow`.`idShow`
Reply

Logout Mark Read Team Forum Stats Members Help
DB messed up in GIT?0