mysql dbase naming change post v57
#1
I understand that on dbase upgrade to v57 XBMC duplicates the dbase, renames it appending the version number to the name and then upgrades.

This is done in order to ensure backwards compatibilty.

I agree the process needs done but i disagree with how the naming works.

Currently i define my dbase name in advancedsettings.xml. For the sake of argument I create a mysql backup script and give it permissions to this database.

This will not work because the live dbase is now not named as i defined it and my backup user has no permissions to the new daatbase nor does it actually know what it is called without some scripting magic.

It seems to make sense that the client should just try to connect to videoXX (where XX is version number) but why would I want two separately maintained librarys?



Also every time the dbase changes version mysql for me grows by 250MB of essentially static backup data. I have no need for this backup data as in my opinion XBMC backups should be exported onto the filesystem.

In 10 versions time my mysql with contain 2.5GB of mysql data when i use 10% of that.

Also I now have to start trying to give my backup user wildcard permissions or global read permissions because the dbase name is changing.

Now i realize that the XBMC database is primarily for the use of XBMC but in real life is not solely the case.


It would make more sense for the currently live database was always named as defined in as.xml. If a old client connects to the dbases and it it too new to be used it should error and tell you on the GUI and try to connect to videoXX.
Having problems getting your TV shows recognized?

Try my extra TV show matching REGEX here
Reply
#2
Hi,

i totally agree with you. My xbmc user didn't even had permissions to copy and create the new database. Therefore i was using the sqlite fallback without noticing it.

I wrote a small patch to add a advancedsettings entry in the video and music database section:

Code:
<dbnameversion>false</dbnameversion>

Attached a small second patch, for correct closing of the database connection if an update failed. I was running into the "too many connections" error when an update failed.

http://gropp.org/xbmc/patches/dbnameversion.diff
http://gropp.org/xbmc/patches/dbclose.diff

Is there any chance to get it merged?

trackel
Reply
#3
trackel Wrote:Hi,

i totally agree with you. My xbmc user didn't even had permissions to copy and create the new database. Therefore i was using the sqlite fallback without noticing it.

I wrote a small patch to add a advancedsettings entry in the video and music database section:

Code:
<dbnameversion>false</dbnameversion>

Attached a small second patch, for correct closing of the database connection if an update failed. I was running into the "too many connections" error when an update failed.

http://gropp.org/xbmc/patches/dbnameversion.diff
http://gropp.org/xbmc/patches/dbclose.diff

Is there any chance to get it merged?

trackel

didn't you open 2 tickets with that? then wait until firnsy gets time to handle it...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#4
Hi,

no, i didn't open any ticket. I've read the post by xexe and had the exact problem yesterday, thats why i fixed it and shared my code.

trackel
Reply

Logout Mark Read Team Forum Stats Members Help
mysql dbase naming change post v570