[mythtv] Database schema upgrade 1215 and 1216 causes loss of data

Stuart Morgan stuart at tase.co.uk
Wed Apr 23 20:14:59 UTC 2008

On Wednesday 23 April 2008 20:58:27 mythtv at miwers.dk wrote:
> Since we're talking loss of data here (program titles, recording titles
> and such), someone really should revert or fix that change, so nobody
> else looses data over this. (good thing there's a DB backup, but still...)

We were very careful to give multiple, strongly worded warnings about the QT4 
port and as a result anyone experiencing loss of data was adequately warned. 
Of course we'll work to fix the problem, but no-one should lose data as a 
result, since 0.21 all schema updates are proceeded by an automatic backup.

> I made som tests and posted my results in the ticket.
> Skipping the varchar to varbinary conversion, and instead convert
> directly from varchar (latin1) to varchar (utf8) worked fine for me
> without loss of data.

Sounds a lot like your data was not stored correctly as UTF8 - how was your 
data inserted into the database? Mythfilldatabase would have done this 

> Is there a reason why it's converted to varbinary first?
> It seems like an unnecessary step to me...

It was necessary because we stored utf8() data in latin1 fields. MySQL can't 
handle this when the charset is changed and so we needed to switch to 
varbinary as a temporary middle step.
Stuart Morgan

More information about the mythtv-dev mailing list