[mythtv-users] database error before every recording starts on 0.19-fixes svn revision 9709.
Michael T. Dean
mtdean at thirdcontact.com
Fri Apr 14 18:46:42 UTC 2006
On 04/14/2006 01:09 PM, Khanh Tran wrote:
> On 4/14/06, Michael T. Dean <mtdean at thirdcontact.com> wrote:
>
>> On 04/14/2006 09:19 AM, Khanh Tran wrote:
>>
>>> I recently went to svn 9709 and now I'm getting database errors when a
>>> recording starts:
>>>
>>> 2006-04-14 08:30:02.579 DB Error (Copy program data on record):
>>> Query was:
>>> REPLACE INTO recordedprogram SELECT * from program WHERE chanid = '2123' AND sta
>>> rttime = '2006-04-14T08:30:00';
>>> Driver error was [2/1136]:
>>> QMYSQL3: Unable to execute query
>>> Database error was:
>>> Column count doesn't match value count at row 1
>>>
>>> 2006-04-14 08:30:02.621 TVRec(1): Changing from None to RecordingOnly
>>>
>> Your subject says you're running 0.19-fixes and the error would occur
>> there if and only if you had previously run SVN head (somewhere between
>> r9668 but before r9686) and then went back to 0.19-fixes...
>>
>> If you have DBSchemaVer 1136, that's exactly what happened:
>>
>> mysql -umythtv -p mythconverg -e "SELECT * FROM settings WHERE value =
>> 'DBSchemaVer';"
>>
>> In SVN head, [9686] fixes the issue (
>> http://www.gossamer-threads.com/lists/mythtv/commits/197056#197056 ) .
>>
>> Are you absolutely sure /all/ your Myth systems (frontends and backends)
>> are using 0.19-fixes? At some point, you've run a non-fixes SVN head
>> version of Myth. Running different versions of Myth frontends/backends
>> and "downgrading" your Myth system are not supported.
>>
>> If you want to stay on 0.19-fixes, how old is your last 0.19-fixes
>> database backup?
>>
> I probably should have said I'm running 9707 from the fixes branch. I
> went back and forth on a couple revisions for a frontend-only, but
> only forward on the backend.
And it's this back and forth that's not supported. (Specifically, the
back part is never supported--only the forth. ;) When you ran a
frontend from SVN head, it upgraded your database for you. (Yes, the
frontend does a database upgrade, too, as do mythbackend and
mythtv-setup.) And, the database upgrade succeeded--thus the new
columns in your database.
> The output of my master backend shows the
> Current Schema is 1136 and the Newest Schema is 1123 as quoted below.
>
Because your database was upgraded, but the backend you're running uses
an older version of the database than the frontend that did the
upgrade. "Current Schema" means the value in the database and "Newest
Schema" means the value in your Myth libraries (i.e. the value the
application expects). Note that "Newest Schema" is less than "Current
Schema"...
> I'm assuming my database never upgraded?
It did, but the frontend you ran was SVN head (after r9668) before
r9686. Changeset [9686] fixed the problem you're having in SVN head and
not -fixes--because it's impossible for it to occur in -fixes on its
own. The only way it can occur in -fixes is if you've upgraded the
database using SVN head--at which point, running -fixes is no longer
supported.
> DBSchemaVer is 1136 in my database.
Thus proving your database schema was upgraded (i.e. 1136 is greater
than 1123--the version your backend thinks is the most current and, for
what it's worth, the current version for -fixes).
> Should I manually do "ALTER TABLE recordedprogram ADD
> listingsource INT NOT NULL default '0';"?
>
No. At this point you have exactly two "clean" options--anything else
requires manual hacking on your own part and for which you'll have to
figure out what to do and after which the results of the changes are
your responsibility (and should not be reported as bugs and if you post
problems in that situation, you should explicitly say what you've done
so I'll know to ignore the post because you're running an unsupported
configuration ;).
Your options:
a) Run SVN head (on /all/ Myth boxes and never go back to 0.19-fixes).
b) Use a backup from before your database was upgraded to SVN head's
newer schema version (i.e. where DbSchemaVer is 1123) to recreate the
mythconverg database (i.e. drop the existing database and use the backup
to create tables/data as they were when you made the backup). At this
point, you can run -fixes (but need to run it on /all/ Myth boxes at
/all/ times--i.e. no going back and forth).
Mike
More information about the mythtv-users
mailing list