Table './mythconverg/program' is marked as crashed

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
x_driver
Junior
Posts: 28
Joined: Tue Nov 24, 2015 9:15 pm
United States of America

Table './mythconverg/program' is marked as crashed

Post by x_driver »

Guys,

I seem to have some kind of database error that I haven't been able to fix. I've tried running various repair commands to fix the database but none have worked. mythTV actually works, but I don't have any EPG data and I don't think that mythfilldatabase is working because of the problem below.

Code: Select all

DBD::mysql::db do failed: Table './mythconverg/program' is marked as crashed and last (automatic?) repair failed at ./optimize_mythdb.pl line 42.

Code: Select all

mythconverg.program
warning  : Table is marked as crashed and last repair failed
warning  : 1 client is using or hasn't closed the table properly
warning  : Size of indexfile is: 2772992      Should be: 4096
error    : Can't read indexpage from filepos: -1
Error    : Incorrect key file for table './mythconverg/program.MYI'; try to repair it
error    : Corrupt

Code: Select all

mythtv-backend.service - MythTV Backend
   Loaded: loaded (/etc/systemd/system/mythtv-backend.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2017-09-10 10:04:01 MST; 53min ago
 Main PID: 6461 (mythbackend)
   CGroup: /system.slice/mythtv-backend.service
           └─6461 /usr/bin/mythbackend --syslog local7 --user mythtv

Sep 10 10:55:33 htpc mythbackend[6461]: mythbackend[6461]: E EIT mythdbcon.cpp:877 (prepare) Error preparing query: REPLACE INTO program (  chanid,         title,          subtitle,        description,   
Sep 10 10:55:33 htpc mythbackend[6461]: mythbackend[6461]: E EIT mythdbcon.cpp:879 (prepare) Driver error was [2/144]:
                                        QMYSQL3: Unable to prepare statement
                                        Database error was:
                                        Table './mythconverg/program' is marked as crashed and last (automatic?) repair failed
Sep 10 10:55:33 htpc mythbackend[6461]: mythbackend[6461]: E EIT mythdb.cpp:183 (DBError) DB Error (InsertDB):
                                        Query was:
                                        REPLACE INTO program (  chanid,         title,          subtitle,        description,   category,       category_type,   starttime,      endtime,   closecaptioned, 
                                        Bindings were:
                                        :AIRDATE="0000", :AUDIOPROP=0, :CATEGORY="", :CATTYPE="", :CC=false,
                                        :CHANID=1021,
                                        :DESCRIPTION="A comprehensive first look at overnight news events from the nation and the world includes weather, business, entertainment and sports reports.",
                                        :ENDTIME=2017-09-12T11:00:00Z, :EPISODE=0, :HASSUBTITLES=false, :HDTV=false,
                                        :INETREF="", :LSOURCE=1, :ORIGAIRDATE=NULL, :PARTNUMBER=0, :PARTTOTAL=0,
                                        :PREVSHOWN=false, :PROGRAMID="", :SEASON=0, :SERIESID="", :STARS=0,
                                        :STARTTIME=2017-09-12T10:30:00Z, :STEREO=false, :SUBTITLE="", :SUBTYPES=0,
                                        :SYNDICATENO="", :TITLE="Early Today", :TOTALEPISODES=0, :VIDEOPROP=0
                                        Driver error was [2/144]:
                                        QMYSQL: Unable to execute query
                                        Database error was:
                                        Table './mythconverg/program' is marked as crashed and last (automatic?) repair failed
Sep 10 10:55:33 htpc mythbackend[6461]: mythbackend[6461]: E EIT mythdbcon.cpp:877 (prepare) Error preparing query: SELECT title,          subtitle,      description,        category,       category_type,
Sep 10 10:55:33 htpc mythbackend[6461]: mythbackend[6461]: E EIT mythdbcon.cpp:879 (prepare) Driver error was [2/144]:
                                        QMYSQL3: Unable to prepare statement
                                        Database error was:
                                        Table './mythconverg/program' is marked as crashed and last (automatic?) repair failed
Sep 10 10:55:33 htpc mythbackend[6461]: mythbackend[6461]: E EIT mythdb.cpp:183 (DBError) DB Error (GetOverlappingPrograms 1):
                                        Query was:
                                        SELECT title,          subtitle,      description,        category,       category_type,        starttime,      endtime,        subtitletypes+0,audioprop+0,   video
                                        Bindings were:
                                        :CHANID=1021, :ETIME1=2017-09-12T10:30:00Z, :ETIME2=2017-09-12T10:30:00Z,
                                        :ETIME3=2017-09-12T10:30:00Z, :STIME1=2017-09-12T10:00:00Z,
                                        :STIME2=2017-09-12T10:00:00Z, :STIME3=2017-09-12T10:00:00Z
                                        Driver error was [2/144]:
                                        QMYSQL: Unable to execute query
                                        Database error was:
                                        Table './mythconverg/program' is marked as crashed and last (automatic?) repair failed
Sep 10 10:55:33 htpc mythbackend[6461]: mythbackend[6461]: E EIT mythdbcon.cpp:877 (prepare) Error preparing query: REPLACE INTO program (  chanid,         title,          subtitle,        description,   
Sep 10 10:55:33 htpc mythbackend[6461]: mythbackend[6461]: E EIT mythdbcon.cpp:879 (prepare) Driver error was [2/144]:
                                        QMYSQL3: Unable to prepare statement
                                        Database error was:
                                        Table './mythconverg/program' is marked as crashed and last (automatic?) repair failed
Sep 10 10:55:33 htpc mythbackend[6461]: mythbackend[6461]: E EIT mythdb.cpp:183 (DBError) DB Error (InsertDB):
                                        Query was:
                                        REPLACE INTO program (  chanid,         title,          subtitle,        description,   category,       category_type,   starttime,      endtime,   closecaptioned, 
                                        Bindings were:
                                        :AIRDATE="0000", :AUDIOPROP=0, :CATEGORY="", :CATTYPE="", :CC=false,
                                        :CHANID=1021,
                                        :DESCRIPTION="A comprehensive first look at overnight news events from the nation and the world includes weather, business, entertainment and sports reports.",
                                        :ENDTIME=2017-09-12T10:30:00Z, :EPISODE=0, :HASSUBTITLES=false, :HDTV=false,
                                        :INETREF="", :LSOURCE=1, :ORIGAIRDATE=NULL, :PARTNUMBER=0, :PARTTOTAL=0,
                                        :PREVSHOWN=false, :PROGRAMID="", :SEASON=0, :SERIESID="", :STARS=0,
                                        :STARTTIME=2017-09-12T10:00:00Z, :STEREO=false, :SUBTITLE="", :SUBTYPES=0,
                                        :SYNDICATENO="", :TITLE="Early Today", :TOTALEPISODES=0, :VIDEOPROP=0
lines 1-61
User avatar
pgbennett
Developer
Posts: 504
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Table './mythconverg/program' is marked as crashed

Post by pgbennett »

The data in that table is not important, because it gets refreshed with mythfilldatabase. I would try dropping and recreating it. Before dropping it you can get a create statement from mysql-workbench.

Here is the create statement for V29 or master which I got from mysql-workbench

https://pastebin.com/cqsf5yk2
x_driver
Junior
Posts: 28
Joined: Tue Nov 24, 2015 9:15 pm
United States of America

Re: Table './mythconverg/program' is marked as crashed

Post by x_driver »

Thank you for the response. I'm not very familiar with MySQL. Is "dropping" the table deleting it and then running mythfilldatabase or a different procedure?

Thanks again.
User avatar
pgbennett
Developer
Posts: 504
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Table './mythconverg/program' is marked as crashed

Post by pgbennett »

I would hate for you to attempt this if you are unfamiliar with SQL. Did you try running a backup and then restoring the database? See https://www.mythtv.org/wiki/Backup_your_database
Post Reply