<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 25, 2024 at 9:40 PM John Pilkington <<a href="mailto:johnpilk222@gmail.com">johnpilk222@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 25/01/2024 16:14, John Pilkington wrote:<br>
> On 24/01/2024 23:22, Gary Buhrmaster wrote:<br>
>> On Wed, Jan 24, 2024 at 10:46 PM John Pilkington <br>
>> <<a href="mailto:johnpilk222@gmail.com" target="_blank">johnpilk222@gmail.com</a>> wrote:<br>
>><br>
>>> Is there a simple fix?<br>
>><br>
>> Escape quote (backtick) the (now reserved) word `offset`.<br>
>><br>
>> That was what the MythTV code itself did<br>
>> to address the update.<br>
> <br>
> Thanks, Gary and Hika.<br>
> <br>
> I haven't yet got this working with MariaDB 10.6.12, with various random <br>
> changes in the field sequence and capitalisation.  Your suggested <br>
> changes in Fedora 38 (10.5) made it fail, but it still worked in el7 <br>
> (!).  As Gary mentioned when this first came up, it's a precomputed <br>
> query.  Issue 373<br>
> <br>
> Here's the current el7 trial version, with the suggested backticks.<br>
> <br>
> mariadb-server-5.5.68-1.el7.x86_64<br>
> <br>
> It works, at least with DVBradio.<br>
> <br>
> John<br>
> <br>
> <br>
> {{{<br>
> lag=4        #  In frames.  Best value might depend on recording source, <br>
> MythTV version and seektable history.<br>
> scope=2000   #  Sometimes h264 keyframes in the wild are much more <br>
> widely spaced than expected.<br>
>               #  This might only have been true for 'rebuilt' <br>
> seektables, but the large value should do no harm.<br>
> <br>
> for frame in $(cat revedlist$$)<br>
> do<br>
>      i=$((${frame} - ${lag}))<br>
>      j=$((${i}))<br>
>      k=$((${i} + ${scope}))<br>
>      echo  "select `offset`, mark from recordedseek<br>
>      where chanid=$chanid and starttime='$starttime' and type=9<br>
>      and mark >= ${j} and mark < ${k}  order by `offset` limit 3 ;" |<br>
>      mysql -N -u${DBUserName} -p${DBPassword} -h${DBLocalHostName} <br>
> ${DBName}<br>
> done > tmp0$$<br>
> <br>
> echo "Full results of DB read:"<br>
> cat tmp0$$<br>
> cat tmp0$$  | sed -n '1,${p;n;n;}' > tmp1$$  # select lines 1,4,7...<br>
> cat tmp0$$  | sed -n '2,${p;n;n;}' > tmp2$$  # 2,5,8...<br>
> cat tmp0$$  | sed -n '3,${p;n;n;}' > tmp3$$<br>
> rm tmp0$$<br>
> <br>
> echo<br>
> <br>
> }}}<br>
{{{<br>
Looking mor hopeful here, running the mysql commands in sequence (no <br>
pipe and with a smaller  effective value of the 'scope')<br>
<br>
<br>
john@Matts-HP-Compaq-dc5800-Microtower:~/Bashtests$ mysql -N -umythtv <br>
-pmythtv -hlocalhost mythconverg<br>
Reading table information for completion of table and column names<br>
You can turn off this feature to get a quicker startup with -A<br>
<br>
Welcome to the MariaDB monitor.  Commands end with ; or \g.<br>
Your MariaDB connection id is 408<br>
Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04<br>
<br>
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.<br>
<br>
Type 'help;' or '\h' for help. Type '\c' to clear the current input <br>
statement.<br>
<br>
MariaDB [mythconverg]> select `offset` , mark  from recordedseek where <br>
chanid=10002 and starttime=20190204190500 and type=9 and mark >= 8244 <br>
and mark < 8444 order by `offset` limit 3 ;<br>
+-----------+------+<br>
| 193649588 | 8265 |<br>
| 194136320 | 8289 |<br>
| 194649184 | 8313 |<br>
+-----------+------+<br>
3 rows in set (0.001 sec)<br>
<br>
MariaDB [mythconverg]> \q<br>
Bye<br>
<br>
}}}<br><br></blockquote><div><br></div><div>And when you put single quotes around the <i>starttime</i> value, does above query work as well? <br></div><div><br></div><div>Roland<br></div></div></div>