<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>2012/12/13 on Yano&#39;s digital garage</title>
    <link>https://www.bravotouring.com/~yano/archives/2012/12/13/</link>
    <description>Recent content in 2012/12/13 on Yano&#39;s digital garage</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 13 Dec 2012 13:05:45 +0900</lastBuildDate>
    <atom:link href="https://www.bravotouring.com/~yano/archives/2012/12/13/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>epgrec:録画予約残骸削除</title>
      <link>https://www.bravotouring.com/~yano/diary/it/20121213epgrec.htm</link>
      <pubDate>Thu, 13 Dec 2012 13:05:45 +0900</pubDate>
      <guid>https://www.bravotouring.com/~yano/diary/it/20121213epgrec.htm</guid>
      <description>&lt;p&gt;メンテなどで電気的に止めたり、何らかの障害で録画に失敗したケースで録画予約情報が&lt;span class=&#34;Software&#34;&gt;epgrec&lt;/span&gt;の表示上残ってしまう事が多々ある。&lt;/p&gt;&#xA;&lt;p&gt;8日経過すると録画成功したものも含めて消されてしまうようだが、直近の予約番組がわかりづらいとまた止める判断をするのも一苦労なので、データベース上から綺麗サッパリ消してしまうことに。&#xA;&lt;blockquote class=&#34;Log&#34;&gt;yano@GT110b:~$ mysql -u root -p&lt;br/&gt;&#xA;Enter password: XXXXXXXX&lt;br/&gt;&#xA;Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br/&gt;&#xA;Your MySQL connection id is 136&lt;br/&gt;&#xA;Server version: 5.1.66-0ubuntu0.10.04.3 (Ubuntu)&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;Oracle is a registered trademark of Oracle Corporation and/or its&lt;br/&gt;&#xA;affiliates. Other names may be trademarks of their respective&lt;br/&gt;&#xA;owners.&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;Type &#39;help;&#39; or &#39;\h&#39; for help. Type &#39;\c&#39; to clear the current input statement.&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;mysql&gt; use epg;&lt;br/&gt;&#xA;mysql&gt; select id, complete from Recorder_reserveTbl where endtime &lt; now() and complete = 0;&lt;br/&gt;&#xA;+-----+----------+&lt;br/&gt;&#xA;| id  | complete |&lt;br/&gt;&#xA;+-----+----------+&lt;br/&gt;&#xA;| 302 |        0 |&lt;br/&gt;&#xA;| 304 |        0 |&lt;br/&gt;&#xA;+-----+----------+&lt;br/&gt;&#xA;2 rows in set (0.00 sec)&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;mysql&gt; update Recorder_reserveTbl set complete = 1 where endtime &lt; now() and complete = 0;&lt;br/&gt;&#xA;Query OK, 2 rows affected (0.04 sec)&lt;br/&gt;&#xA;Rows matched: 2  Changed: 2  Warnings: 0&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;mysql&gt; \q&lt;br/&gt;&#xA;Bye&lt;br/&gt;&#xA;yano@GT110b:~$&lt;/blockquote&gt;&#xA;SQL手順は&lt;span class=&#34;Path&#34;&gt;~/mysql_script/epg_cleanup.sql&lt;/span&gt;にファイル化しておいたので、今後はmysqlコマンド一撃でOK。&#xA;&lt;blockquote class=&#34;Log&#34;&gt;&#xA;yano@GT110b:~$ cat ~/mysql_script/epg_cleanup.sql&lt;br/&gt;&#xA;use epg;&lt;br/&gt;&#xA;select id, complete from Recorder_reserveTbl where endtime &lt; now() and complete = 0;&lt;br/&gt;&#xA;update Recorder_reserveTbl set complete = 1 where endtime &lt; now() and complete = 0;&lt;br/&gt;&#xA;yano@GT110b:~$ mysql -pXXXXXXXX &lt; &lt;span class=&#34;Path&#34;&gt;~/mysql_script/epg_cleanup.sql&lt;/span&gt;&lt;/blockquote&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
