[mythtv] CVS Patches: MythRemoteLineEdit, Edit Program Info
Chris Palmer
mythtv at zencow.com
Wed Mar 26 19:25:34 EST 2003
Edward Wildgoose wrote
> > A gotcha for other ppl playing with the database:
> > For some reason mysql will update starttime if you change the
> > recorded table unless you pass that into the sql query. I'm
> > not sure why it doesn't do that to endtime...
>
> There was a thread a few days back where this was discussed. It
> seems to be due to the use of the "timestamp" datatype for date
> fields. I'm quoting others here, but it seems that timestamp is an
> auto-updating field which updates itself when you touch the row (ie
> acts like a timestamp!). Certainly in MS SQL this is the way
> timestamps are used, but I haven't looked at the docs for mysql
>
> Mysql obviously assumes that there will only be one timestamp on a
> table, so it apparantly only updates the first one automatically,
> even if there are several.
The behavior is setup to automatcially update the first one, but
you can also get it to update any other timestamp fields by setting
them to NULL.
There's probably good reason to update the database to the DATETIME
type, but Isaac's reason for using the TIMESTAMP in the first place
was that it used less storage space.
There seemed to be a lot of agreement in the idea to use the DATETIME
type, but some testing would probably be in order. (Incidentally,
I modified all the TIMESTAMP fields in my mythconverg database to
the DATETIME type over a week ago and can't say I've seen any bad
results based on that change).
-Chris
More information about the mythtv-dev
mailing list