[mythtv] follow-up to mythfilldatabase/MySQL 5.0 problem

toby cabot toby at caboteria.org
Thu Sep 8 20:52:21 UTC 2005

Hi Folks,

I've been using MythTV for a while now and it's worked great, so I'd
like to start by saying thanks!

I recently ran into the same problem with mythfilldatabase and mysql
5.0 that Mickey Chandler reported in July:

I monkeyed around with it and my hypothesis is that "repeat" is now a
mysql keyword so it can no longer be used as a column name.  This
patch, while ugly, at least fixes mythfilldatabase for me.  It just
changes the name of the repeat column to xrepeat in a couple of
mythfilldatabase's temp tables.


Index: libs/libmythtv/datadirect.cpp
--- libs/libmythtv/datadirect.cpp	(revision 7203)
+++ libs/libmythtv/datadirect.cpp	(working copy)
@@ -178,7 +178,7 @@
         query.prepare("INSERT INTO dd_schedule (programid,stationid,"
-                      "scheduletime,duration,repeat,stereo,subtitled,hdtv,"
+                      "scheduletime,duration,xrepeat,stereo,subtitled,hdtv,"
                       "closecaptioned,tvrating,partnumber,parttotal,endtime) "
@@ -418,7 +418,7 @@
                        "syndicatedepisodenumber, tvrating, mpaarating, "
                        "programid) "
                        "SELECT chanid, scheduletime, endtime, title, "
-                       "subtitle, description, year, stars, repeat, stereo, "
+                       "subtitle, description, year, stars, xrepeat, stereo, "
                        "subtitled, hdtv, closecaptioned, partnumber, "
                        "parttotal, seriesid, originalairdate, showtype, "
                        "category_type, colorcode, syndicatedepisodenumber, "
@@ -621,7 +621,7 @@
     createATempTable ("dd_v_station", table);
     table = "( programid char(12), stationid char(12), scheduletime datetime, "
-            "duration time, repeat bool, stereo bool, subtitled bool, "
+            "duration time, xrepeat bool, stereo bool, subtitled bool, "
             "hdtv bool, closecaptioned bool, tvrating char(5), partnumber int, "
             "parttotal int, endtime datetime, INDEX progidx (programid) )";
     createATempTable("dd_schedule", table); 
@@ -639,7 +639,7 @@
             "endtime datetime, title varchar(128), subtitle varchar(128), "
             "description text, category varchar(64), "
             "category_type varchar(64), airdate year, stars float unsigned, "
-            "previouslyshown tinyint, repeat bool, stereo bool, "
+            "previouslyshown tinyint, xrepeat bool, stereo bool, "
             "subtitled bool, hdtv bool,  closecaptioned bool, partnumber int, "
             "parttotal int, seriesid char(12), originalairdate date, "
             "showtype varchar(30), colorcode varchar(20), "

More information about the mythtv-dev mailing list