﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
3725	"DB Warning from ""REPLACE INTO recordedprogram"" in ProgramInfo::StartedRecording"	anonymous	danielk	"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."	patch	closed	minor	unknown	mythtv	0.20-fixes	medium	wontfix			0
