[mythtv-commits] Ticket #3725: DB Warning from "REPLACE INTO recordedprogram" in ProgramInfo::StartedRecording
MythTV
mythtv at cvs.mythtv.org
Sat Jul 14 13:59:28 UTC 2007
#3725: DB Warning from "REPLACE INTO recordedprogram" in
ProgramInfo::StartedRecording
-----------------------+----------------------------------------------------
Reporter: anonymous | Owner: ijr
Type: patch | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: 0.20-fixes
Severity: medium | Mlocked: 0
-----------------------+----------------------------------------------------
When i was looking in the recordedprogram table i noticed that i had years
in the category_type field instead of text like series.
i tracked this to the "REPLACE INTO recordedprogram" query in
ProgramInfo::StartedRecording[[BR]]
For some reason mysql messes up the fields when using * to specify all the
fields.
Because this only generates a database warning the backed doesn't log
anything about the problem.
Executing the same query manually and turning on warnings results in this:
{{{
mysql> warnings;
Show warnings enabled.
mysql> REPLACE INTO recordedprogram
-> SELECT *
-> FROM program
-> where chanid=3130 and starttime = '2007-07-10 15:30:00';
Query OK, 2 rows affected, 1 warning (0.00 sec)
Records: 1 Duplicates: 1 Warnings: 0
Warning (Code 1366): Incorrect integer value: 'series' for column
'previouslyshown' at row 1
}}}
I don't understand why this sql query doesn't do what it's supposed
to.[[BR]]
it looks as if mysql doesn't match the field names in the select query
with the replace query properly.
I've attached a small patch against 0.20-fixes that instead of using *
specifies all fields for the query.
After this change recordings get inserted properly.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/3725>
MythTV <http://svn.mythtv.org/trac>
MythTV
More information about the mythtv-commits
mailing list