<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Sep 16, 2016 at 6:31 AM, Karl Newman <span dir="ltr"><<a href="mailto:newmank1@asme.org" target="_blank">newmank1@asme.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">On Fri, Sep 16, 2016 at 1:24 AM, Stuart Auchterlonie <span dir="ltr"><<a href="mailto:stuarta@squashedfrog.net" target="_blank">stuarta@squashedfrog.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On 16/09/16 07:02, Stephen Worthington wrote:<br>
> On Thu, 15 Sep 2016 20:34:44 -0700, you wrote:<br>
><br>
>> On Thu, Sep 15, 2016 at 6:04 PM, John P Poet <<a href="mailto:jppoet@gmail.com" target="_blank">jppoet@gmail.com</a>> wrote:<br>
>><br>
>>> On Thu, Sep 15, 2016 at 6:45 PM Karl Newman <<a href="mailto:newmank1@asme.org" target="_blank">newmank1@asme.org</a>> wrote<br>
>>><br>
>>>> After being prompted by a friend that I should check out (more) Coen<br>
>>>> brothers movies, I turned to Myth to seek them out. I played around with<br>
>>>> the People search but discovered that for now I really just wanted movies<br>
>>>> where one of the brothers was the director. So I tried linking in the<br>
>>>> people and credits tables and modified it to "<a href="http://person.name" rel="noreferrer" target="_blank">person.name</a> LIKE '%Coen'"<br>
>>>> and limiting it to director from credits.role, etc. When I saved the rule<br>
>>>> it locked up mythbackend (I was trying to create the rule using mythweb). I<br>
>>>> couldn't even kill -9 the mythbackend process, so I rebooted. This happened<br>
>>>> a couple more times with different variations so I decided to move to<br>
>>>> Mythfrontend. I started with the Tom Hanks example and put in 'Joel Coen'<br>
>>>> and used the Test function and it worked. Then I added "AND<br>
>>>> FIND_IN_SET('DIRECTOR', credits.role)>0" to the rule and the Test still<br>
>>>> worked. Then I added "<a href="http://person.name" rel="noreferrer" target="_blank">person.name</a> LIKE '%Coen'" and it locked up<br>
>>>> mythfrontend and I think also mythbackend, which was weird because I<br>
>>>> thought it was supposed to be isolated. Rebooted, then tried "<a href="http://person.name" rel="noreferrer" target="_blank">person.name</a><br>
>>>> = 'Joel Coen' OR <a href="http://person.name" rel="noreferrer" target="_blank">person.name</a> = 'Ethan Coen'" and it locked up<br>
>>>> mythfrontend again. I gave up and went to bed, thinking everything was<br>
>>>> still working but this morning discovered that all my recordings overnight<br>
>>>> had failed, even though mythbackend appeared to still be nominally working.<br>
>>>> A ps aux showed me that my nightly database backup was stalled, implying<br>
>>>> that mysql was frozen. The mysqld.err log file showed nothing leading up to<br>
>>>> the lockup. So, it appears that mucking with the <a href="http://person.name" rel="noreferrer" target="_blank">person.name</a> clause in<br>
>>>> the query gives MariaDB heartburn. For my purposes, I can probably solve<br>
>>>> this with two different rules (one for each brother) but I am curious why<br>
>>>> that query should make MariaDB lock up.<br>
>>>><br>
>>>> I welcome your answers (or speculation...)<br>
>>>><br>
>>>> Karl<br>
>>>><br>
>>><br>
>>> Since I only want the "Brian Cox" that hosts documentaries, I have this<br>
>>> rule:<br>
>>><br>
>>> <a href="http://people.name" rel="noreferrer" target="_blank">people.name</a> = 'Brian Cox' AND credits.person = people.person AND<br>
>>> credits.role = 'Host' AND program.chanid = credits.chanid AND<br>
>>> program.starttime = credits.starttime<br>
>>><br>
>>> For that to work, the 'Additional Tables' needs to have:<br>
>>><br>
>>> ,credits,people<br>
>>><br>
>><br>
>> Yep, that's pretty much the "Tom Hanks" example with a different name. I'm<br>
>> curious why tweaking the <a href="http://people.name" rel="noreferrer" target="_blank">people.name</a> clause locks it up though.<br>
>><br>
>> Karl<br>
><br>
> If you run mythbackend with the "-v database" option, it will log all<br>
> the SQL queries it does. That should show what the problem query is,<br>
> and you can then try that query from a MariaDB command prompt to work<br>
> out what the exact problem is.<br>
<br>
</div></div>I would also suggest that when it's locked up run<br>
<br>
mysql> show full processlist\G<br>
<br>
which will show the in progress queries.<br>
<br>
<br>
Regards<br>
<span><font color="#888888">Stuart</font></span><br></blockquote><div><br></div></div></div><div>Thanks for the suggestions. I'll play with it and see what I can find out.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Karl <br></div></font></span></div></div></div>
</blockquote></div><br>After some time away from this, I thought about it a little more and realized that when I used the "OR" to pick up both names I forgot to put parentheses around that sub-clause... So it was likely blowing up the query to many many results. I just tried it again with parens and it worked great. Thanks to all for the suggestions.<br><br></div><div class="gmail_extra">Karl<br></div></div>