XBMC 11, MySQL and Music Party mode
#1
Hi,

I have a issue I can't solve, I have tried to search various forums but I can't find an answer so I hope someone in here can point me in the right direction.

I'm using XBMCbuntu 11 (I have recompiled XBMC from the SVN due to I wanted to support for Spotify, so the exact version is 11.0 Git:20120330-11b0bd4), I'm using MySql version 5.1.36 to store data, everything seems to works perfect. The databases is created and data is populated to the databases.

When I start Party mode in the Music section XBMC selects 10? (I can't recall the exact number) random numbers and start playing, so far so good, but when the first song ends and the next should be played XBMC throws an error (translated from Danish) :
“Party mode interrupted
Could not get songs from database.”

If I look in the Xbmc log file the following is written:

20:13:17 T:3040134912 DEBUG: GetRandomSong query = select * from songview WHERE ('1') and songview.idSong not in (1356,1818,4202,2838,1077,3507,674,4565,4713,513) order by idSong limit 1 offset 1634
20:13:18 T:3040134912 ERROR: SQL: Undefined MySQL error: Code (126)
Query: select * from songview WHERE ('1') and songview.idSong not in (1356,1818,4202,2838,1077,3507,674,4565,4713,513) order by idSong limit 1 offset 1634
20:13:18 T:3040134912 ERROR: GetRandomSong(WHERE ('1') and songview.idSong not in (1356,1818,4202,2838,1077,3507,674,4565,4713,513)) failed


If I manually execute the sql statement i get this error:

mysql> select * from songview WHERE ('1') and songview.idSong not in (1356,1818,4202,2838,1077,3507,674,4565,4713,513) order by idSong limit 1 offset 1634;
ERROR 126 (HY000): Incorrect key file for table '/tmp/#sql_7173_0.MYI'; try to repair it


But songview is a 'view' and shouldn't have a key..... right?

Can anybody help me out here?

//Christoffer
Reply
#2
Hi again,


I have played around with the SQL queries and found it I substitute the query:
select * from songview WHERE ('1') and songview.idSong not in (1356,1818,4202,2838,1077,3507,674,4565,4713,513) order by idSong limit 1 offset 1634;

with:
select * from songview WHERE ('1') and songview.idSong not in (1356,1818,4202,2838,1077,3507,674,4565,4713,513) limit 1 offset 1634;

it seems to work, but I don’t know if this is due to an error on my table, missing index or something else – Can someone comment on that?

//Christoffer
Reply
#3
SOLVED :o)

The reason why the SQL query failed when the "order by idSong" was that my mysql tmpdir hadn't got the required free disk space.
Everytime the sql query is executed an 40mb index file is created in the tmpdir. I change the “tmpdir = /....” in my my.cnf and everything is now working again

//Christoffer
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC 11, MySQL and Music Party mode0